Skip to content

Commit 78b5a69

Browse files
committed
Changed predict of quasistatic UPw scheme, such that it does not predict displacements based on its derivatives (only water pressure)
1 parent 6ccec00 commit 78b5a69

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

applications/GeoMechanicsApplication/custom_strategies/schemes/generalized_newmark_scheme.hpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,21 @@ class GeneralizedNewmarkScheme : public GeoMechanicsTimeIntegrationScheme<TSpars
192192
}
193193
}
194194

195-
private:
196195
void PredictVariables(const ModelPart& rModelPart)
197196
{
198197
block_for_each(rModelPart.Nodes(), [this](Node& rNode) { PredictVariablesForNode(rNode); });
199198
}
200199

201-
void PredictVariablesForNode(Node& rNode)
200+
virtual void PredictVariablesForNode(Node& rNode)
202201
{
203-
for (const auto& r_first_order_scalar_variable : this->GetFirstOrderScalarVariables()) {
204-
if (!rNode.SolutionStepsDataHas(r_first_order_scalar_variable.instance)) continue;
205-
PredictFirstOrderScalarVariableForNode(rNode, r_first_order_scalar_variable);
206-
}
207-
208202
for (const auto& r_second_order_vector_variable : this->GetSecondOrderVectorVariables()) {
209203
if (!rNode.SolutionStepsDataHas(r_second_order_vector_variable.instance)) continue;
210-
PredictSecondOrderVectorVariableForNode(rNode, r_second_order_vector_variable);
204+
this->PredictSecondOrderVectorVariableForNode(rNode, r_second_order_vector_variable);
205+
}
206+
207+
for (const auto& r_first_order_scalar_variable : this->GetFirstOrderScalarVariables()) {
208+
if (!rNode.SolutionStepsDataHas(r_first_order_scalar_variable.instance)) continue;
209+
this->PredictFirstOrderScalarVariableForNode(rNode, r_first_order_scalar_variable);
211210
}
212211
}
213212

applications/GeoMechanicsApplication/custom_strategies/schemes/newmark_quasistatic_U_Pw_scheme.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ class NewmarkQuasistaticUPwScheme : public GeneralizedNewmarkScheme<TSparseSpace
5454
KRATOS_CATCH("")
5555
}
5656

57+
void PredictVariablesForNode(Node& rNode) override
58+
{
59+
for (const auto& r_first_order_scalar_variable : this->GetFirstOrderScalarVariables()) {
60+
if (!rNode.SolutionStepsDataHas(r_first_order_scalar_variable.instance)) continue;
61+
this->PredictFirstOrderScalarVariableForNode(rNode, r_first_order_scalar_variable);
62+
}
63+
}
5764
}; // Class NewmarkQuasistaticUPwScheme
5865

5966
} // namespace Kratos

0 commit comments

Comments
 (0)