15 #if !defined(KRATOS_POROMECHANICS_RAMM_ARC_LENGTH_NONLOCAL_STRATEGY)
16 #define KRATOS_POROMECHANICS_RAMM_ARC_LENGTH_NONLOCAL_STRATEGY
30 template<
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
76 typename TSchemeType::Pointer pScheme,
77 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
78 typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver,
80 int MaxIterations = 30,
81 bool CalculateReactions =
false,
82 bool ReformDofSetAtEachStep =
false,
85 pNewConvergenceCriteria, pNewBuilderAndSolver, rParameters, MaxIterations, CalculateReactions, ReformDofSetAtEachStep,
MoveMeshFlag)
157 KRATOS_INFO(
"Ramm's Arc Length Nonlocal Strategy") <<
"INITIAL ARC-LENGTH RADIUS: " <<
mRadius_0 << std::endl;
159 KRATOS_INFO(
"Ramm's Arc Length Nonlocal Strategy") <<
"ARC-LENGTH RADIUS: " <<
mRadius/
mRadius_0 <<
" X initial radius" << std::endl;
174 unsigned int iteration_number = 1;
176 bool is_converged =
false;
181 TSparseSpace::SetToZero(mA);
182 TSparseSpace::SetToZero(
mb);
183 TSparseSpace::SetToZero(mDxf);
194 noalias(mDxPred) = DLambda*mDxf;
196 this->
Update(rDofSet, mA, mDxPred,
mb);
202 if (is_converged ==
true)
207 TSparseSpace::SetToZero(
mb);
223 TSparseSpace::SetToZero(mA);
224 TSparseSpace::SetToZero(
mb);
225 TSparseSpace::SetToZero(mDxf);
232 TSparseSpace::SetToZero(mA);
233 TSparseSpace::SetToZero(
mb);
234 TSparseSpace::SetToZero(mDxb);
240 noalias(mDx) = mDxb + DLambda*mDxf;
249 is_converged =
false;
268 if (is_converged ==
true)
272 TSparseSpace::SetToZero(
mb);
360 TSparseSpace::SetToZero(mA);
361 TSparseSpace::SetToZero(
mb);
362 TSparseSpace::SetToZero(mDx);
373 unsigned int iteration_number = 0;
374 bool is_converged =
false;
375 double dofs_ratio = 1000.0;
376 double ReferenceDofsNorm;
384 iteration_number += 1;
390 TSparseSpace::SetToZero(mA);
391 TSparseSpace::SetToZero(
mb);
392 TSparseSpace::SetToZero(mDx);
406 dofs_ratio = NormDx/ReferenceDofsNorm;
407 KRATOS_INFO(
"Ramm's Arc Length Nonlocal Strategy") <<
"TEST ITERATION: " << iteration_number << std::endl;
408 KRATOS_INFO(
"Ramm's Arc Length Nonlocal Strategy") <<
" Dofs Ratio = " << dofs_ratio << std::endl;
410 if(dofs_ratio <= 1.0e-3)
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
Implicit solving strategy base class This is the base class from which we will derive all the implici...
Definition: implicit_solving_strategy.h:61
BaseType::TSystemVectorType TSystemVectorType
Definition: implicit_solving_strategy.h:72
Scheme< TSparseSpace, TDenseSpace > TSchemeType
Definition: implicit_solving_strategy.h:82
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > TBuilderAndSolverType
Definition: implicit_solving_strategy.h:84
BaseType::TSystemMatrixType TSystemMatrixType
Definition: implicit_solving_strategy.h:70
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
Definition: nonlocal_damage_2D_utilities.hpp:26
Definition: nonlocal_damage_3D_utilities.hpp:26
Definition: nonlocal_damage_utilities.hpp:36
virtual void SearchGaussPointsNeighbours(Parameters *pParameters, ModelPart &rModelPart)
Definition: nonlocal_damage_utilities.hpp:82
void CalculateNonlocalEquivalentStrain(Parameters *pParameters, const ProcessInfo &CurrentProcessInfo)
Definition: nonlocal_damage_utilities.hpp:89
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
bool GetBool() const
This method returns the boolean contained in the current Parameter.
Definition: kratos_parameters.cpp:675
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
Definition: poromechanics_newton_raphson_strategy.hpp:35
Parameters * mpParameters
Member Variables.
Definition: poromechanics_newton_raphson_strategy.hpp:165
double CalculateReferenceDofsNorm(DofsArrayType &rDofSet)
Definition: poromechanics_newton_raphson_strategy.hpp:240
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:33
KRATOS_CLASS_POINTER_DEFINITION(PoromechanicsRammArcLengthNonlocalStrategy)
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:39
BaseType::TSystemMatrixType TSystemMatrixType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:48
void Clear() override
Clears the internal storage.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:321
ResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver > Grandx2MotherType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:40
BaseType::DofsArrayType DofsArrayType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:47
BaseType::TSystemVectorType TSystemVectorType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:49
ConvergenceCriteria< TSparseSpace, TDenseSpace > TConvergenceCriteriaType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:43
unsigned int mMaxIterationNumber
Definition: residualbased_newton_raphson_strategy.h:1261
PoromechanicsNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver > GrandMotherType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:41
TSystemVectorPointerType mpb
The increment in the solution.
Definition: residualbased_newton_raphson_strategy.h:1237
~PoromechanicsRammArcLengthNonlocalStrategy() override
Destructor.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:94
NonlocalDamageUtilities * mpNonlocalDamageUtility
Member Variables.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:341
PoromechanicsRammArcLengthStrategy< TSparseSpace, TDenseSpace, TLinearSolver > MotherType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:42
TSystemMatrixPointerType mpA
The RHS vector of the system of equations.
Definition: residualbased_newton_raphson_strategy.h:1238
void InitializeSolutionStep() override
Performs all the required operations that should be done (for each step) before solving the solution ...
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:127
PoromechanicsRammArcLengthNonlocalStrategy(ModelPart &model_part, typename TSchemeType::Pointer pScheme, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver, Parameters &rParameters, int MaxIterations=30, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false)
Constructor.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:74
bool mCalculateReactionsFlag
Flag telling if it is needed or not to compute the reactions.
Definition: residualbased_newton_raphson_strategy.h:1253
void Initialize() override
Initialization of member variables and prior operations.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:98
BaseType::TBuilderAndSolverType TBuilderAndSolverType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:44
BaseType::TSchemeType TSchemeType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:45
Parameters * mpParameters
Member Variables.
Definition: poromechanics_newton_raphson_strategy.hpp:165
TSystemVectorPointerType mpDx
The pointer to the convergence criteria employed.
Definition: residualbased_newton_raphson_strategy.h:1236
TBuilderAndSolverType::Pointer mpBuilderAndSolver
The pointer to the time scheme employed.
Definition: residualbased_newton_raphson_strategy.h:1233
TSchemeType::Pointer mpScheme
Definition: residualbased_newton_raphson_strategy.h:1232
TSparseSpace SparseSpaceType
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:46
bool CheckConvergence() override
Name of the nodal variable associated to every SubModelPart.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:347
bool SolveSolutionStep() override
Solves the current step. This function returns true if a solution has been found, false otherwise.
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:153
bool mNonlocalDamageIsInitialized
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:342
TConvergenceCriteriaType::Pointer mpConvergenceCriteria
The pointer to the builder and solver employed.
Definition: residualbased_newton_raphson_strategy.h:1234
bool mInitializeWasPerformed
The maximum number of iterations, 30 by default.
Definition: residualbased_newton_raphson_strategy.h:1263
bool mSearchNeighboursAtEachStep
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:343
void FinalizeSolutionStep() override
Performs all the required operations that should be done (for each step) after solving the solution s...
Definition: poromechanics_ramm_arc_length_nonlocal_strategy.hpp:304
Definition: poromechanics_ramm_arc_length_strategy.hpp:30
double mDLambdaStep
Norm of the solution vector in equilibrium.
Definition: poromechanics_ramm_arc_length_strategy.hpp:458
TSystemVectorPointerType mpDxPred
Delta x of A*Dxb=b.
Definition: poromechanics_ramm_arc_length_strategy.hpp:447
double mNormxEquilibrium
Loading factor.
Definition: poromechanics_ramm_arc_length_strategy.hpp:457
void BuildWithDirichlet(TSystemMatrixType &mA, TSystemVectorType &mDx, TSystemVectorType &mb)
Definition: poromechanics_ramm_arc_length_strategy.hpp:494
void Clear() override
Clears the internal storage.
Definition: poromechanics_ramm_arc_length_strategy.hpp:373
TSystemVectorPointerType mpf
Member Variables.
Definition: poromechanics_ramm_arc_length_strategy.hpp:444
void InitializeSolutionStep() override
Performs all the required operations that should be done (for each step) before solving the solution ...
Definition: poromechanics_ramm_arc_length_strategy.hpp:149
TSystemVectorPointerType mpDxf
Vector of reference external forces.
Definition: poromechanics_ramm_arc_length_strategy.hpp:445
TSystemVectorPointerType mpDxStep
Delta x of prediction phase.
Definition: poromechanics_ramm_arc_length_strategy.hpp:448
virtual void Update(DofsArrayType &rDofSet, TSystemMatrixType &mA, TSystemVectorType &mDx, TSystemVectorType &mb)
Definition: poromechanics_ramm_arc_length_strategy.hpp:506
TSystemVectorPointerType mpDxb
Delta x of A*Dxf=f.
Definition: poromechanics_ramm_arc_length_strategy.hpp:446
double mRadius_0
Definition: poromechanics_ramm_arc_length_strategy.hpp:455
void Initialize() override
Initialization of member variables and prior operations.
Definition: poromechanics_ramm_arc_length_strategy.hpp:90
double mRadius
Used to limit the radius of the arc length strategy.
Definition: poromechanics_ramm_arc_length_strategy.hpp:455
void FinalizeSolutionStep() override
Performs all the required operations that should be done (for each step) after solving the solution s...
Definition: poromechanics_ramm_arc_length_strategy.hpp:314
double mLambda
Radius of the arc length strategy.
Definition: poromechanics_ramm_arc_length_strategy.hpp:456
This is the base Newton Raphson strategy.
Definition: residualbased_newton_raphson_strategy.h:66
unsigned int mMaxIterationNumber
Definition: residualbased_newton_raphson_strategy.h:1261
TSystemVectorPointerType mpb
The increment in the solution.
Definition: residualbased_newton_raphson_strategy.h:1237
TSystemMatrixPointerType mpA
The RHS vector of the system of equations.
Definition: residualbased_newton_raphson_strategy.h:1238
virtual void MaxIterationsExceeded()
This method prints information after reach the max number of iterations.
Definition: residualbased_newton_raphson_strategy.h:1340
bool mCalculateReactionsFlag
Flag telling if it is needed or not to compute the reactions.
Definition: residualbased_newton_raphson_strategy.h:1253
TSystemVectorPointerType mpDx
The pointer to the convergence criteria employed.
Definition: residualbased_newton_raphson_strategy.h:1236
TBuilderAndSolverType::Pointer mpBuilderAndSolver
The pointer to the time scheme employed.
Definition: residualbased_newton_raphson_strategy.h:1233
TSchemeType::Pointer mpScheme
Definition: residualbased_newton_raphson_strategy.h:1232
TConvergenceCriteriaType::Pointer mpConvergenceCriteria
The pointer to the builder and solver employed.
Definition: residualbased_newton_raphson_strategy.h:1234
bool mInitializeWasPerformed
The maximum number of iterations, 30 by default.
Definition: residualbased_newton_raphson_strategy.h:1263
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
TSparseSpace::MatrixType TSystemMatrixType
Definition: solving_strategy.h:71
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
TSparseSpace::VectorType TSystemVectorType
Definition: solving_strategy.h:73
virtual void MoveMesh()
This function is designed to move the mesh.
Definition: solving_strategy.h:330
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_INFO(label)
Definition: logger.h:250
double TwoNorm(SparseSpaceType &dummy, SparseSpaceType::VectorType &x)
Definition: add_strategies_to_python.cpp:164
ProcessInfo & GetProcessInfo(ModelPart &rModelPart)
Definition: add_model_part_to_python.cpp:54
double Dot(SparseSpaceType &dummy, SparseSpaceType::VectorType &rX, SparseSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:85
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
model_part
Definition: face_heat.py:14
double precision function mb(a)
Definition: TensorModule.f:849