13 #if !defined(KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY)
14 #define KRATOS_RESIDUALBASED_NEWTON_RAPHSON_STRATEGY
60 template <
class TSparseSpace,
140 if (p_builder_and_solver !=
nullptr) {
148 KRATOS_WARNING(
"ResidualBasedNewtonRaphsonStrategy") <<
"BuilderAndSolver is not initialized. Please assign one before settings flags" << std::endl;
169 typename TSchemeType::Pointer pScheme,
170 typename TLinearSolver::Pointer pNewLinearSolver,
171 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
172 int MaxIterations = 30,
173 bool CalculateReactions =
false,
174 bool ReformDofSetAtEachStep =
false,
224 typename TSchemeType::Pointer pScheme,
225 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
226 typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver,
227 int MaxIterations = 30,
228 bool CalculateReactions =
false,
229 bool ReformDofSetAtEachStep =
false,
282 typename TLinearSolver::Pointer pNewLinearSolver,
285 int MaxIterations = 30,
286 bool CalculateReactions = false,
287 bool ReformDofSetAtEachStep = false,
293 KRATOS_WARNING(
"ResidualBasedNewtonRaphsonStrategy") <<
"This constructor is deprecated, please use the constructor without linear solver" << std::endl;
299 auto p_linear_solver = p_builder_and_solver->GetLinearSystemSolver();
300 KRATOS_ERROR_IF(p_linear_solver != pNewLinearSolver) <<
"Inconsistent linear solver in strategy and builder and solver. Considering the linear solver assigned to builder and solver :\n" << p_linear_solver->Info() <<
"\n instead of:\n" << pNewLinearSolver->Info() << std::endl;
315 typename TSchemeType::Pointer pScheme,
316 typename TLinearSolver::Pointer pNewLinearSolver,
317 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
362 typename TSchemeType::Pointer pScheme,
363 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
364 typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver,
413 typename TLinearSolver::Pointer pNewLinearSolver,
421 KRATOS_WARNING(
"ResidualBasedNewtonRaphsonStrategy") <<
"This constructor is deprecated, please use the constructor without linear solver" << std::endl;
427 auto p_linear_solver = p_builder_and_solver->GetLinearSystemSolver();
428 KRATOS_ERROR_IF(p_linear_solver != pNewLinearSolver) <<
"Inconsistent linear solver in strategy and builder and solver. Considering the linear solver assigned to builder and solver :\n" << p_linear_solver->Info() <<
"\n instead of:\n" << pNewLinearSolver->Info() << std::endl;
444 if (p_builder_and_solver !=
nullptr) {
445 p_builder_and_solver->Clear();
613 typename SolvingStrategyType::Pointer
Create(
618 return Kratos::make_shared<ClassType>(rModelPart, ThisParameters);
644 const int local_number_of_constraints = r_constraints_array.size();
645 const int global_number_of_constraints = r_comm.SumAll(local_number_of_constraints);
646 if(global_number_of_constraints != 0) {
653 rConstraint.
Apply(r_process_info);
658 TSparseSpace::SetToZero(rDx);
679 typename TSchemeType::Pointer p_scheme =
GetScheme();
683 if (p_scheme->SchemeIsInitialized() ==
false)
687 if (p_scheme->ElementsAreInitialized() ==
false)
691 if (p_scheme->ConditionsAreInitialized() ==
false)
695 if (p_convergence_criteria->IsInitialized() ==
false)
713 if (p_builder_and_solver !=
nullptr) {
714 p_builder_and_solver->SetDofSetIsInitializedFlag(
false);
715 p_builder_and_solver->Clear();
728 if (p_scheme !=
nullptr) {
750 TSparseSpace::SetToZero(rb);
786 typename TSchemeType::Pointer p_scheme =
GetScheme();
797 p_builder_and_solver->SetUpDofSet(p_scheme, r_model_part);
799 << setup_dofs_time << std::endl;
803 p_builder_and_solver->SetUpSystem(r_model_part);
805 << setup_system_time << std::endl;
809 p_builder_and_solver->ResizeAndInitializeVectors(p_scheme,
mpA,
mpDx,
mpb,
812 << system_matrix_resize_time << std::endl;
816 << system_construction_time << std::endl;
823 p_builder_and_solver->InitializeSolutionStep(r_model_part, rA, rDx, rb);
826 p_scheme->InitializeSolutionStep(r_model_part, rA, rDx, rb);
831 TSparseSpace::SetToZero(rb);
832 p_builder_and_solver->BuildRHS(p_scheme, r_model_part, rb);
835 mpConvergenceCriteria->InitializeSolutionStep(r_model_part, p_builder_and_solver->GetDofSet(), rA, rDx, rb);
838 TSparseSpace::SetToZero(rb);
854 typename TSchemeType::Pointer p_scheme =
GetScheme();
866 p_scheme->FinalizeSolutionStep(r_model_part, rA, rDx, rb);
867 p_builder_and_solver->FinalizeSolutionStep(r_model_part, rA, rDx, rb);
868 mpConvergenceCriteria->FinalizeSolutionStep(r_model_part, p_builder_and_solver->GetDofSet(), rA, rDx, rb);
888 typename TSchemeType::Pointer p_scheme =
GetScheme();
890 auto& r_dof_set = p_builder_and_solver->GetDofSet();
897 unsigned int iteration_number = 1;
898 r_model_part.
GetProcessInfo()[NL_ITERATION_NUMBER] = iteration_number;
899 bool residual_is_updated =
false;
900 p_scheme->InitializeNonLinIteration(r_model_part, rA, rDx, rb);
906 TSparseSpace::SetToZero(rA);
907 TSparseSpace::SetToZero(rDx);
908 TSparseSpace::SetToZero(rb);
911 p_builder_and_solver->BuildAndSolveLinearizedOnPreviousIteration(p_scheme, r_model_part, rA, rDx, rb,
BaseType::MoveMeshFlag());
913 p_builder_and_solver->BuildAndSolve(p_scheme, r_model_part, rA, rDx, rb);
916 TSparseSpace::SetToZero(rDx);
917 TSparseSpace::SetToZero(rb);
919 p_builder_and_solver->BuildRHSAndSolve(p_scheme, r_model_part, rA, rDx, rb);
928 p_scheme->FinalizeNonLinIteration(r_model_part, rA, rDx, rb);
933 TSparseSpace::SetToZero(rb);
935 p_builder_and_solver->BuildRHS(p_scheme, r_model_part, rb);
942 while (is_converged ==
false &&
946 r_model_part.
GetProcessInfo()[NL_ITERATION_NUMBER] = iteration_number;
948 p_scheme->InitializeNonLinIteration(r_model_part, rA, rDx, rb);
962 TSparseSpace::SetToZero(rA);
963 TSparseSpace::SetToZero(rDx);
964 TSparseSpace::SetToZero(rb);
966 p_builder_and_solver->BuildAndSolve(p_scheme, r_model_part, rA, rDx, rb);
970 TSparseSpace::SetToZero(rDx);
971 TSparseSpace::SetToZero(rb);
973 p_builder_and_solver->BuildRHSAndSolve(p_scheme, r_model_part, rA, rDx, rb);
978 TSparseSpace::SetToZero(rDx);
979 TSparseSpace::SetToZero(rb);
981 p_builder_and_solver->BuildRHSAndSolve(p_scheme, r_model_part, rA, rDx, rb);
986 KRATOS_WARNING(
"NO DOFS") <<
"ATTENTION: no free DOFs!! " << std::endl;
995 p_scheme->FinalizeNonLinIteration(r_model_part, rA, rDx, rb);
998 residual_is_updated =
false;
1000 if (is_converged ==
true)
1004 TSparseSpace::SetToZero(rb);
1006 p_builder_and_solver->BuildRHS(p_scheme, r_model_part, rb);
1007 residual_is_updated =
true;
1019 <<
"Convergence achieved after " << iteration_number <<
" / "
1025 if (residual_is_updated ==
false)
1039 p_builder_and_solver->CalculateReactions(p_scheme, r_model_part, rA, rDx, rb);
1041 return is_converged;
1073 "name" : "newton_raphson_strategy",
1074 "use_old_stiffness_in_first_iteration": false,
1075 "max_iteration" : 10,
1076 "reform_dofs_at_each_step" : false,
1077 "compute_reactions" : false,
1078 "builder_and_solver_settings" : {},
1079 "convergence_criteria_settings" : {},
1080 "linear_solver_settings" : {},
1081 "scheme_settings" : {}
1087 return default_parameters;
1096 return "newton_raphson_strategy";
1174 return "ResidualBasedNewtonRaphsonStrategy";
1284 typename TSchemeType::Pointer p_scheme =
GetScheme();
1298 virtual void EchoInfo(
const unsigned int IterationNumber)
1306 KRATOS_INFO(
"Dx") <<
"Solution obtained = " << rDx << std::endl;
1307 KRATOS_INFO(
"RHS") <<
"RHS = " << rb << std::endl;
1311 KRATOS_INFO(
"LHS") <<
"SystemMatrix = " << rA << std::endl;
1312 KRATOS_INFO(
"Dx") <<
"Solution obtained = " << rDx << std::endl;
1313 KRATOS_INFO(
"RHS") <<
"RHS = " << rb << std::endl;
1317 std::stringstream matrix_market_name;
1321 std::stringstream matrix_market_vectname;
1325 std::stringstream matrix_market_dxname;
1329 std::stringstream dof_data_name;
1332 <<
"_" << IterationNumber <<
"_rank_"<< rank <<
".csv";
1343 <<
"ATTENTION: max iterations ( " << mMaxIterationNumber
1344 <<
" ) exceeded!" << std::endl;
1360 if (ThisParameters[
"convergence_criteria_settings"].
Has(
"name")) {
1361 KRATOS_ERROR <<
"IMPLEMENTATION PENDING IN CONSTRUCTOR WITH PARAMETERS" << std::endl;
1365 if (ThisParameters[
"scheme_settings"].
Has(
"name")) {
1366 KRATOS_ERROR <<
"IMPLEMENTATION PENDING IN CONSTRUCTOR WITH PARAMETERS" << std::endl;
1370 if (ThisParameters[
"builder_and_solver_settings"].
Has(
"name")) {
1371 KRATOS_ERROR <<
"IMPLEMENTATION PENDING IN CONSTRUCTOR WITH PARAMETERS" << std::endl;
1380 out <<
"EquationId,NodeId,VariableName,IsFixed,Value,coordx,coordy,coordz" << std::endl;
1383 out << rdof.EquationId() <<
"," << rdof.Id() <<
"," << rdof.GetVariable().Name() <<
"," << rdof.IsFixed() <<
","
1384 << rdof.GetSolutionStepValue() <<
"," <<
"," << coords[0] <<
"," << coords[1] <<
"," << coords[2]<<
"\n";
Current class provides an implementation for the base builder and solving operations.
Definition: builder_and_solver.h:64
Definition: builtin_timer.h:26
virtual const DataCommunicator & GetDataCommunicator() const
Definition: communicator.cpp:340
virtual int MyPID() const
Definition: communicator.cpp:91
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
Serial (do-nothing) version of a wrapper class for MPI communication.
Definition: data_communicator.h:318
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
void SetRebuildLevel(int Level) override
This sets the build level.
Definition: implicit_solving_strategy.h:207
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: implicit_solving_strategy.h:283
int mRebuildLevel
Definition: implicit_solving_strategy.h:263
bool mStiffnessMatrixIsBuilt
The current rebuild level.
Definition: implicit_solving_strategy.h:264
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: implicit_solving_strategy.h:76
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > TBuilderAndSolverType
Definition: implicit_solving_strategy.h:84
BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
Definition: implicit_solving_strategy.h:74
BaseType::TSystemMatrixType TSystemMatrixType
Definition: implicit_solving_strategy.h:70
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: implicit_solving_strategy.h:169
A class that implements the interface for different master-slave constraints to be applied on a syste...
Definition: master_slave_constraint.h:76
virtual void ResetSlaveDofs(const ProcessInfo &rCurrentProcessInfo)
This method resets the values of the slave dofs.
Definition: master_slave_constraint.h:373
virtual void Apply(const ProcessInfo &rCurrentProcessInfo)
This method directly applies the master/slave relationship.
Definition: master_slave_constraint.h:382
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MasterSlaveConstraintContainerType & MasterSlaveConstraints(IndexType ThisIndex=0)
Definition: model_part.h:654
Communicator & GetCommunicator()
Definition: model_part.h:1821
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
void RecursivelyAddMissingParameters(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing contain at least all parameters...
Definition: kratos_parameters.cpp:1457
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
Current class provides an implementation for standard builder and solving operations.
Definition: residualbased_block_builder_and_solver.h:82
This is the base Newton Raphson strategy.
Definition: residualbased_newton_raphson_strategy.h:66
ResidualBasedNewtonRaphsonStrategy(ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, Parameters Settings)
Definition: residualbased_newton_raphson_strategy.h:313
ResidualBasedNewtonRaphsonStrategy(ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver, Parameters Settings)
Constructor specifying the builder and solver and using Parameters.
Definition: residualbased_newton_raphson_strategy.h:360
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: residualbased_newton_raphson_strategy.h:97
void SetMaxIterationNumber(unsigned int MaxIterationNumber)
This method sets the flag mMaxIterationNumber.
Definition: residualbased_newton_raphson_strategy.h:575
bool mUseOldStiffnessInFirstIteration
Flag telling if a full update of the database will be performed at the first iteration.
Definition: residualbased_newton_raphson_strategy.h:1259
TSystemVectorType & GetSystemVector() override
This method returns the RHS vector.
Definition: residualbased_newton_raphson_strategy.h:1127
ResidualBasedNewtonRaphsonStrategy(ModelPart &rModelPart)
Default constructor. (with parameters)
Definition: residualbased_newton_raphson_strategy.h:119
void SetKeepSystemConstantDuringIterations(bool Value)
Set method for the flag mKeepSystemConstantDuringIterations.
Definition: residualbased_newton_raphson_strategy.h:1149
TSparseSpace SparseSpaceType
Definition: residualbased_newton_raphson_strategy.h:85
std::string Info() const override
Turn back information as a string.
Definition: residualbased_newton_raphson_strategy.h:1172
TBuilderAndSolverType::Pointer GetBuilderAndSolver()
Get method for the builder and solver.
Definition: residualbased_newton_raphson_strategy.h:493
virtual void UpdateDatabase(TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb, const bool MoveMesh)
Here the database is updated.
Definition: residualbased_newton_raphson_strategy.h:1278
int Check() override
Function to perform expensive checks.
Definition: residualbased_newton_raphson_strategy.h:1048
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: residualbased_newton_raphson_strategy.h:1178
KRATOS_CLASS_POINTER_DEFINITION(ResidualBasedNewtonRaphsonStrategy)
TSystemMatrixType & GetSystemMatrix() override
This method returns the LHS matrix.
Definition: residualbased_newton_raphson_strategy.h:1116
ResidualBasedNewtonRaphsonStrategy(ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver, int MaxIterations=30, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false)
Constructor specifying the builder and solver.
Definition: residualbased_newton_raphson_strategy.h:222
ResidualBasedNewtonRaphsonStrategy(ModelPart &rModelPart, typename TSchemeType::Pointer pScheme, typename TLinearSolver::Pointer pNewLinearSolver, typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria, int MaxIterations=30, bool CalculateReactions=false, bool ReformDofSetAtEachStep=false, bool MoveMeshFlag=false)
Definition: residualbased_newton_raphson_strategy.h:167
BaseType::TDataType TDataType
Definition: residualbased_newton_raphson_strategy.h:83
ConvergenceCriteria< TSparseSpace, TDenseSpace > TConvergenceCriteriaType
Definition: residualbased_newton_raphson_strategy.h:70
bool mKeepSystemConstantDuringIterations
Flag to set as initialized the strategy.
Definition: residualbased_newton_raphson_strategy.h:1265
unsigned int mMaxIterationNumber
Definition: residualbased_newton_raphson_strategy.h:1261
TSchemeType::Pointer GetScheme()
Get method for the time scheme.
Definition: residualbased_newton_raphson_strategy.h:475
BaseType::TSystemVectorType TSystemVectorType
Definition: residualbased_newton_raphson_strategy.h:93
TSystemVectorPointerType mpb
The increment in the solution.
Definition: residualbased_newton_raphson_strategy.h:1237
bool GetInitializePerformedFlag()
This method gets the flag mInitializeWasPerformed.
Definition: residualbased_newton_raphson_strategy.h:511
ImplicitSolvingStrategy< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: residualbased_newton_raphson_strategy.h:77
bool GetReformDofSetAtEachStepFlag()
This method returns the flag mReformDofSetAtEachStep.
Definition: residualbased_newton_raphson_strategy.h:566
unsigned int GetMaxIterationNumber()
This method gets the flag mMaxIterationNumber.
Definition: residualbased_newton_raphson_strategy.h:584
bool GetCalculateReactionsFlag()
This method returns the flag mCalculateReactionsFlag.
Definition: residualbased_newton_raphson_strategy.h:529
SolvingStrategy< TSparseSpace, TDenseSpace > SolvingStrategyType
Definition: residualbased_newton_raphson_strategy.h:75
ResidualBasedNewtonRaphsonStrategy(ModelPart &rModelPart, Parameters ThisParameters)
Default constructor. (with parameters)
Definition: residualbased_newton_raphson_strategy.h:129
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
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: residualbased_newton_raphson_strategy.h:1069
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
bool SolveSolutionStep() override
Solves the current step. This function returns true if a solution has been found, false otherwise.
Definition: residualbased_newton_raphson_strategy.h:884
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: residualbased_newton_raphson_strategy.h:1094
void SetUseOldStiffnessInFirstIterationFlag(bool UseOldStiffnessInFirstIterationFlag)
This method sets the flag mFullUpdateFlag.
Definition: residualbased_newton_raphson_strategy.h:538
BaseType::TSchemeType TSchemeType
Definition: residualbased_newton_raphson_strategy.h:87
TSystemVectorType & GetSolutionVector() override
This method returns the solution vector.
Definition: residualbased_newton_raphson_strategy.h:1138
void Initialize() override
Initialization of member variables and prior operations.
Definition: residualbased_newton_raphson_strategy.h:672
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: residualbased_newton_raphson_strategy.h:1184
TSchemeType::Pointer mpScheme
Definition: residualbased_newton_raphson_strategy.h:1232
ResidualBasedNewtonRaphsonStrategy()
Default constructor.
Definition: residualbased_newton_raphson_strategy.h:110
void Predict() override
Operation to predict the solution ... if it is not called a trivial predictor is used in which the va...
Definition: residualbased_newton_raphson_strategy.h:625
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: residualbased_newton_raphson_strategy.h:1351
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
ResidualBasedNewtonRaphsonStrategy< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
Definition: residualbased_newton_raphson_strategy.h:79
void SetReformDofSetAtEachStepFlag(bool Flag)
This method sets the flag mReformDofSetAtEachStep.
Definition: residualbased_newton_raphson_strategy.h:556
BaseType::TBuilderAndSolverType TBuilderAndSolverType
Definition: residualbased_newton_raphson_strategy.h:81
void SetEchoLevel(int Level) override
It sets the level of echo for the solving strategy.
Definition: residualbased_newton_raphson_strategy.h:599
BaseType::TSystemMatrixType TSystemMatrixType
Definition: residualbased_newton_raphson_strategy.h:91
bool GetKeepSystemConstantDuringIterations()
Get method for the flag mKeepSystemConstantDuringIterations.
Definition: residualbased_newton_raphson_strategy.h:1158
bool IsConverged() override
This should be considered as a "post solution" convergence check which is useful for coupled analysis...
Definition: residualbased_newton_raphson_strategy.h:740
ResidualBasedNewtonRaphsonStrategy(const ResidualBasedNewtonRaphsonStrategy &Other)
Definition: residualbased_newton_raphson_strategy.h:1409
void SetCalculateReactionsFlag(bool CalculateReactionsFlag)
This method sets the flag mCalculateReactionsFlag.
Definition: residualbased_newton_raphson_strategy.h:520
void Clear() override
Clears the internal storage.
Definition: residualbased_newton_raphson_strategy.h:707
virtual void EchoInfo(const unsigned int IterationNumber)
This method returns the components of the system of equations depending of the echo level.
Definition: residualbased_newton_raphson_strategy.h:1298
void WriteDofInfo(std::string FileName, const TSystemVectorType &rDX)
Definition: residualbased_newton_raphson_strategy.h:1375
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
void SetScheme(typename TSchemeType::Pointer pScheme)
Set method for the time scheme.
Definition: residualbased_newton_raphson_strategy.h:466
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: residualbased_newton_raphson_strategy.h:101
void FinalizeSolutionStep() override
Performs all the required operations that should be done (for each step) after solving the solution s...
Definition: residualbased_newton_raphson_strategy.h:848
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: residualbased_newton_raphson_strategy.h:95
~ResidualBasedNewtonRaphsonStrategy() override
Destructor.
Definition: residualbased_newton_raphson_strategy.h:437
bool mReformDofSetAtEachStep
The LHS matrix of the system of equations.
Definition: residualbased_newton_raphson_strategy.h:1247
void CalculateOutputData() override
This operations should be called before printing the results when non trivial results (e....
Definition: residualbased_newton_raphson_strategy.h:766
void SetBuilderAndSolver(typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver)
Set method for the builder and solver.
Definition: residualbased_newton_raphson_strategy.h:484
bool GetUseOldStiffnessInFirstIterationFlag()
This method returns the flag mFullUpdateFlag.
Definition: residualbased_newton_raphson_strategy.h:547
BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
Definition: residualbased_newton_raphson_strategy.h:99
BaseType::DofsArrayType DofsArrayType
Definition: residualbased_newton_raphson_strategy.h:89
void SetInitializePerformedFlag(bool InitializePerformedFlag=true)
This method sets the flag mInitializeWasPerformed.
Definition: residualbased_newton_raphson_strategy.h:502
SolvingStrategyType::Pointer Create(ModelPart &rModelPart, Parameters ThisParameters) const override
Create method.
Definition: residualbased_newton_raphson_strategy.h:613
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
TSparseSpace::VectorPointerType TSystemVectorPointerType
Definition: solving_strategy.h:77
TDenseSpace::MatrixType LocalSystemMatrixType
Definition: solving_strategy.h:79
TSparseSpace::DataType TDataType
Definition: solving_strategy.h:69
ModelPart & GetModelPart()
Operations to get the pointer to the model.
Definition: solving_strategy.h:350
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: solving_strategy.h:507
int GetEchoLevel()
This returns the level of echo for the solving strategy.
Definition: solving_strategy.h:271
TSparseSpace::MatrixType TSystemMatrixType
Definition: solving_strategy.h:71
virtual int Check()
Function to perform expensive checks.
Definition: solving_strategy.h:377
TSparseSpace::MatrixPointerType TSystemMatrixPointerType
Definition: solving_strategy.h:75
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
int mEchoLevel
Definition: solving_strategy.h:485
TSparseSpace::VectorType TSystemVectorType
Definition: solving_strategy.h:73
virtual void MoveMesh()
This function is designed to move the mesh.
Definition: solving_strategy.h:330
TDenseSpace::VectorType LocalSystemVectorType
Definition: solving_strategy.h:81
static void Clear(MatrixPointerType &pA)
Definition: ublas_space.h:578
static IndexType Size(VectorType const &rV)
return size of vector rV
Definition: ublas_space.h:190
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_INFO(label)
Definition: logger.h:250
#define KRATOS_INFO_IF(label, conditional)
Definition: logger.h:251
#define KRATOS_WARNING(label)
Definition: logger.h:265
string FileName
Export to vtk.
Definition: GenerateWind.py:175
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
TSpaceType::VectorPointerType CreateEmptyVectorPointer(TSpaceType &dummy)
Definition: add_strategies_to_python.cpp:187
TSpaceType::MatrixPointerType CreateEmptyMatrixPointer(TSpaceType &dummy)
Definition: add_strategies_to_python.cpp:181
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
bool WriteMatrixMarketVector(const char *FileName, VectorType &V)
Definition: matrix_market_interface.h:539
bool WriteMatrixMarketMatrix(const char *FileName, CompressedMatrixType &M, bool Symmetric)
Definition: matrix_market_interface.h:308
namespace KRATOS_DEPRECATED_MESSAGE("Please use std::filesystem directly") filesystem
Definition: kratos_filesystem.h:33
out
Definition: isotropic_damage_automatic_differentiation.py:200
double precision function mb(a)
Definition: TensorModule.f:849