Skip to content

Commit 80a4cb5

Browse files
Merge pull request #891 from KratosMultiphysics/adding-old-stiffness-by-default
[Structural] Adding "use_old_stiffness_in_first_iteration" as true by default
2 parents d0df5d3 + 17eb70a commit 80a4cb5

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

kratos.gid/apps/Structural/write/writeProjectParameters.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ proc ::Structural::write::getOldParametersDict { } {
9393
set solverSettingsDict [dict merge $solverSettingsDict [write::getSolutionStrategyParametersDict STSolStrat STScheme STStratParams] ]
9494
set solverSettingsDict [dict merge $solverSettingsDict [write::getSolversParametersDict Structural] ]
9595

96+
if {[write::getValue STAnalysisType] ne "non_linear"} {
97+
dict unset solverSettingsDict use_old_stiffness_in_first_iteration
98+
}
9699
# Submodelpart lists
97100

98101
# There are some Conditions and nodalConditions that dont generate a submodelpart

kratos.gid/apps/Structural/xml/Strategies.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<parameter n="residual_relative_tolerance" pn="Residual relative tolerance" type="double" v="1e-4" parent="residual_criterion,and_criterion,or_criterion" help="Relative residual tolerance employed in the nonlinear iteration"/>
1414
<parameter n="residual_absolute_tolerance" pn="Residual absolute tolerance" type="double" v="1e-9" parent="residual_criterion,and_criterion,or_criterion" help="Absolute residual tolerance employed in the nonlinear iteration"/></parameter>
1515
<parameter n="max_iteration" pn="Maximum iterations" type="integer" v="10" help="This number will break the iterative loop when reached"/>
16+
<parameter n="use_old_stiffness_in_first_iteration" pn="Use old stiffness in 1st iteration" type="bool" v="false" values="false,true" />
1617
</parameter_list>
1718
<linearSolvers>
1819
<linearSolverItem n="linear_solver_settings" pn="Linear Solver" help="Default solver Super LU" filter="STSoluType {Static Quasi-static Dynamic formfinding}">
@@ -82,6 +83,7 @@
8283
<parameter n="residual_relative_tolerance" pn="Residual relative tolerance" type="double" v="1e-4" parent="residual_criterion,and_criterion,or_criterion" help="Relative residual tolerance employed in the nonlinear iteration"/>
8384
<parameter n="residual_absolute_tolerance" pn="Residual absolute tolerance" type="double" v="1e-9" parent="residual_criterion,and_criterion,or_criterion" help="Absolute residual tolerance employed in the nonlinear iteration"/></parameter>
8485
<parameter n="max_iteration" pn="Maximum iterations" type="integer" v="10" help="This number will break the iterative loop when reached"/>
86+
<parameter n="use_old_stiffness_in_first_iteration" pn="Use old stiffness in 1st iteration" type="bool" v="false" values="false,true"/>
8587
</parameter_list>
8688
<linearSolvers>
8789
<linearSolverItem n="linear_solver_settings" pn="Linear Solver" filter="STSoluType {Static Quasi-static Dynamic formfinding}">

kratos.gid/apps/Structural/xml/XmlController.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ proc ::Structural::xml::CustomTree { args } {
4848
if {[[customlib::GetBaseRoot] selectNodes "$xpath/value\[@n='print_mdpa'\]"] eq ""} {
4949
gid_groups_conds::addF $xpath value [list n print_mdpa pn "Print modelpart" values "true,false" v true state "\[checkStateByUniqueName STSoluType formfinding\]"]
5050
}
51+
52+
spdAux::SetValueOnTreeItem state {[HideIfUniqueName STAnalysisType linear]} STStratSection use_old_stiffness_in_first_iteration
53+
5154
}
5255

5356
proc ::Structural::xml::ProcCheckGeometryStructural {domNode args} {

0 commit comments

Comments
 (0)