25 template <
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
57 typename TSchemeType::Pointer pScheme,
58 typename TLinearSolver::Pointer pNewLinearSolver,
59 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
60 typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver,
62 int MaxIterations = 30,
63 bool CalculateReactions =
false,
64 bool ReformDofSetAtEachStep =
false,
70 pNewConvergenceCriteria,
75 ReformDofSetAtEachStep,
106 TSparseSpace::SetToZero(mA);
107 TSparseSpace::SetToZero(mDx);
108 TSparseSpace::SetToZero(
mb);
118 TSparseSpace::SetToZero(mf);
131 KRATOS_INFO(
"Ramm's Arc Length Strategy") <<
"Strategy Initialized" << std::endl;
157 <<
"ARC-LENGTH RADIUS: " <<
mRadius /
mRadius_0 <<
" X initial radius" << std::endl;
172 unsigned int iteration_number = 1;
178 TSparseSpace::SetToZero(mA);
179 TSparseSpace::SetToZero(
mb);
180 TSparseSpace::SetToZero(mDxf);
191 noalias(mDxPred) = DLambda * mDxf;
193 this->
Update(rDofSet, mA, mDxPred,
mb);
202 TSparseSpace::SetToZero(
mb);
217 TSparseSpace::SetToZero(mA);
218 TSparseSpace::SetToZero(
mb);
219 TSparseSpace::SetToZero(mDxf);
226 TSparseSpace::SetToZero(mA);
227 TSparseSpace::SetToZero(
mb);
228 TSparseSpace::SetToZero(mDxb);
234 noalias(mDx) = mDxb + DLambda * mDxf;
242 is_converged =
false;
261 TSparseSpace::SetToZero(
mb);
311 std::cout <<
"************ NO CONVERGENCE: restoring equilibrium path ************" << std::endl;
523 double& rvalue = itNode->FastGetSolutionStepValue(var);
529 const component_type& varx =
531 const component_type& vary =
533 const component_type& varz =
543 double& rvaluex = itNode->FastGetSolutionStepValue(varx);
545 double& rvaluey = itNode->FastGetSolutionStepValue(vary);
547 double& rvaluez = itNode->FastGetSolutionStepValue(varz);
553 <<
"One variable of the applied loads has a non supported type. Variable: " << VariableName
Current class provides an implementation for the base builder and solving operations.
Definition: builder_and_solver.h:64
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
Definition: geo_mechanics_newton_raphson_strategy.hpp:31
std::vector< std::string > mVariableNames
List of every SubModelPart associated to an external load.
Definition: geo_mechanics_newton_raphson_strategy.hpp:124
double CalculateReferenceDofsNorm(DofsArrayType &rDofSet)
Definition: geo_mechanics_newton_raphson_strategy.hpp:135
std::vector< ModelPart * > mSubModelPartList
Member Variables.
Definition: geo_mechanics_newton_raphson_strategy.hpp:123
int Check() override
Name of the nodal variable associated to every SubModelPart.
Definition: geo_mechanics_newton_raphson_strategy.hpp:126
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:28
double mLambda_old
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:420
bool mInitializeArcLengthWasPerformed
This is used to calculate the radius of the next step.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:415
TSystemVectorPointerType mpf
Member Variables.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:407
double mNormxEquilibrium
Loading factor.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:421
double mRadius
Used to limit the radius of the arc length strategy.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:419
unsigned int mMaxIterationNumber
Definition: residualbased_newton_raphson_strategy.h:1261
void SaveInitializeSystemVector(TSystemVectorPointerType &pv)
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:446
TSystemVectorPointerType mpDxf
Vector of reference external forces.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:408
double mRadius_0
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:419
void BuildWithDirichlet(TSystemMatrixType &mA, TSystemVectorType &mDx, TSystemVectorType &mb)
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:459
TSystemVectorPointerType mpb
The increment in the solution.
Definition: residualbased_newton_raphson_strategy.h:1237
TSystemVectorPointerType mpDxb
Delta x of A*Dxf=f.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:409
void UpdateExternalLoads()
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:506
bool SolveSolutionStep() override
Solves the current step. This function returns true if a solution has been found, false otherwise.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:153
double mDLambdaStep
Norm of the solution vector in equilibrium.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:422
void InitializeSystemVector(TSystemVectorPointerType &pv)
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:433
void Clear() override
Clears the internal storage.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:341
TSystemVectorPointerType mpDxPred
Delta x of A*Dxb=b.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:410
void InitializeSolutionStep() override
Performs all the required operations that should be done (for each step) before solving the solution ...
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:138
int Check() override
Delta lambda of the current step.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:424
TSystemMatrixPointerType mpA
The RHS vector of the system of equations.
Definition: residualbased_newton_raphson_strategy.h:1238
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
double mMaxRadiusFactor
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:417
double mLambda
Radius of the arc length strategy.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:420
TSchemeType::Pointer mpScheme
Definition: residualbased_newton_raphson_strategy.h:1232
GeoMechanicsRammArcLengthStrategy(ModelPart &model_part, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver, Parameters &rParameters, int MaxIterations=30, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false)
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:56
TSystemVectorPointerType mpDxStep
Delta x of prediction phase.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:411
KRATOS_CLASS_POINTER_DEFINITION(GeoMechanicsRammArcLengthStrategy)
virtual void UpdateLoads()
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:392
void ClearStep()
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:482
void FinalizeSolutionStep() override
Performs all the required operations that should be done (for each step) after solving the solution s...
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:289
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
virtual void Update(DofsArrayType &rDofSet, TSystemMatrixType &mA, TSystemVectorType &mDx, TSystemVectorType &mb)
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:469
double mMinRadiusFactor
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:418
unsigned int mDesiredIterations
Delta x of the current step.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:413
bool mReformDofSetAtEachStep
The LHS matrix of the system of equations.
Definition: residualbased_newton_raphson_strategy.h:1247
void Initialize() override
Initialization of member variables and prior operations.
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:83
typename BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:42
typename BaseType::TSystemVectorType TSystemVectorType
Definition: geo_mechanics_ramm_arc_length_strategy.hpp:41
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
BaseType::DofsArrayType DofsArrayType
Definition: implicit_solving_strategy.h:90
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: implicit_solving_strategy.h:76
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > TBuilderAndSolverType
Definition: implicit_solving_strategy.h:84
BaseType::TSystemMatrixType TSystemMatrixType
Definition: implicit_solving_strategy.h:70
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
static const TComponentType & Get(const std::string &rName)
Retrieves a component with the specified name.
Definition: kratos_components.h:114
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
static void PartitionedIterators(TVector &rVector, typename TVector::iterator &rBegin, typename TVector::iterator &rEnd)
Generate a partition for an std::vector-like array, providing iterators to the begin and end position...
Definition: openmp_utils.h:179
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
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
This is the base Newton Raphson strategy.
Definition: residualbased_newton_raphson_strategy.h:66
TSparseSpace SparseSpaceType
Definition: residualbased_newton_raphson_strategy.h:85
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
void Initialize() override
Initialization of member variables and prior operations.
Definition: residualbased_newton_raphson_strategy.h:672
TSchemeType::Pointer mpScheme
Definition: residualbased_newton_raphson_strategy.h:1232
void InitializeSolutionStep() override
Performs all the required operations that should be done (for each step) before solving the solution ...
Definition: residualbased_newton_raphson_strategy.h:781
void Clear() override
Clears the internal storage.
Definition: residualbased_newton_raphson_strategy.h:707
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 mReformDofSetAtEachStep
The LHS matrix of the system of equations.
Definition: residualbased_newton_raphson_strategy.h:1247
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
Solving strategy base class This is the base class from which we will derive all the strategies (impl...
Definition: solving_strategy.h:64
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
virtual void MoveMesh()
This function is designed to move the mesh.
Definition: solving_strategy.h:330
static void Resize(MatrixType &rA, SizeType m, SizeType n)
Definition: ublas_space.h:558
static void Clear(MatrixPointerType &pA)
Definition: ublas_space.h:578
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_INFO(label)
Definition: logger.h:250
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
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
v
Definition: generate_convection_diffusion_explicit_element.py:114
integer i
Definition: TensorModule.f:17
double precision function mb(a)
Definition: TensorModule.f:849