28 template <
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
63 typename TSchemeType::Pointer pScheme,
64 typename TLinearSolver::Pointer pNewLinearSolver,
65 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
66 typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver,
68 int MaxIterations = 30,
69 bool CalculateReactions =
false,
70 bool ReformDofSetAtEachStep =
false,
76 pNewConvergenceCriteria,
80 ReformDofSetAtEachStep,
88 "increase_factor": 2.0,
89 "reduction_factor": 0.5,
90 "max_piping_iterations": 50,
91 "desired_iterations": 4,
92 "max_radius_factor": 20.0,
93 "min_radius_factor": 0.5,
94 "search_neighbours_step": false,
95 "body_domain_sub_model_part_list": [],
96 "loads_sub_model_part_list": [],
97 "loads_variable_list" : [],
105 if (rParameters[
"loads_sub_model_part_list"].size() > 0) {
110 KRATOS_ERROR <<
"For each SubModelPart there must be a corresponding nodal Variable"
115 &(
model_part.GetSubModelPart(rParameters[
"loads_sub_model_part_list"][
i].GetString()));
137 double ReferenceDofsNorm = 0.0;
143 #pragma omp parallel reduction(+ : ReferenceDofsNorm)
151 if (itDof->IsFree()) {
152 const double&
temp = itDof->GetSolutionStepValue();
158 return sqrt(ReferenceDofsNorm);
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
GeoMechanicsNewtonRaphsonStrategy(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)
Default constructor.
Definition: geo_mechanics_newton_raphson_strategy.hpp:62
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
KRATOS_CLASS_POINTER_DEFINITION(GeoMechanicsNewtonRaphsonStrategy)
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
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
static void DivideInPartitions(const int NumTerms, const int NumThreads, PartitionVector &Partitions)
Divide an array of length NumTerms between NumThreads threads.
Definition: openmp_utils.h:158
static int ThisThread()
Wrapper for omp_get_thread_num().
Definition: openmp_utils.h:108
std::vector< int > PartitionVector
Vector type for the output of DivideInPartitions method.
Definition: openmp_utils.h:53
static int GetNumThreads()
Returns the current number of threads.
Definition: parallel_utilities.cpp:34
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
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
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
iterator begin()
Returns an iterator pointing to the beginning of the container.
Definition: pointer_vector_set.h:278
This is the base Newton Raphson strategy.
Definition: residualbased_newton_raphson_strategy.h:66
int Check() override
Function to perform expensive checks.
Definition: residualbased_newton_raphson_strategy.h:1048
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
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
bool mInitializeWasPerformed
The maximum number of iterations, 30 by default.
Definition: residualbased_newton_raphson_strategy.h:1263
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
bool MoveMeshFlag()
This function returns the flag that says if the mesh is moved.
Definition: solving_strategy.h:290
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
model_part
Definition: face_heat.py:14
int k
Definition: quadrature.py:595
float temp
Definition: rotating_cone.py:85
integer i
Definition: TensorModule.f:17