69 template<
class TSparseSpace,
173 typename TSchemeType::Pointer pScheme,
174 typename TLinearSolver::Pointer pNewLinearSolver,
175 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
177 bool CalculateReactions =
false,
178 bool ReformDofSetAtEachStep =
false,
182 : BaseType(rModelPart, pScheme, pNewLinearSolver, pNewConvergenceCriteria, MaxIterations, CalculateReactions, ReformDofSetAtEachStep, MoveMeshFlag)
188 ThisParameters.ValidateAndAssignDefaults(default_parameters);
207 typename TSchemeType::Pointer pScheme,
208 typename TLinearSolver::Pointer pNewLinearSolver,
209 typename TConvergenceCriteriaType::Pointer pNewConvergenceCriteria,
210 typename TBuilderAndSolverType::Pointer pNewBuilderAndSolver,
212 bool CalculateReactions =
false,
213 bool ReformDofSetAtEachStep =
false,
217 : BaseType(rModelPart, pScheme, pNewLinearSolver, pNewConvergenceCriteria, pNewBuilderAndSolver, MaxIterations, CalculateReactions, ReformDofSetAtEachStep, MoveMeshFlag )
223 ThisParameters.ValidateAndAssignDefaults(default_parameters);
248 typename SolvingStrategyType::Pointer
Create(
253 return Kratos::make_shared<ClassType>(rModelPart, ThisParameters);
264 "name" : "line_search_contact_strategy"
270 return default_parameters;
279 return "line_search_contact_strategy";
295 std::string
Info()
const override
297 return "LineSearchContactStrategy";
357 typename TSchemeType::Pointer pScheme = this->
GetScheme();
368 TSparseSpace::SetToZero(
b);
376 TSparseSpace::SetToZero(
b);
384 TSparseSpace::SetToZero(
b);
391 double XminDisp = 1
e-3;
392 double XmaxDisp = 1.0;
393 double XminLM = 1
e-3;
420 for(
auto itDoF = rNode.
GetDofs().begin() ; itDoF != rNode.
GetDofs().end() ; itDoF++) {
421 const int j = (**itDoF).EquationId();
422 const std::size_t CurrVar = (**itDoF).GetVariable().Key();
424 if ((CurrVar == DISPLACEMENT_X) || (CurrVar == DISPLACEMENT_Y) || (CurrVar == DISPLACEMENT_Z)) {
448 NodesArrayType& r_nodes_array = StrategyBaseType::GetModelPart().Nodes();
450 for(
auto itDoF = rNode.
GetDofs().begin() ; itDoF != rNode.
GetDofs().end() ; itDoF++) {
451 const int j = (**itDoF).EquationId();
452 const std::size_t CurrVar = (**itDoF).GetVariable().Key();
454 if ((CurrVar == DISPLACEMENT_X) || (CurrVar == DISPLACEMENT_Y) || (CurrVar == DISPLACEMENT_Z)) {
455 AtomicAdd(normDisp, b[j] * b[j]);
457 AtomicAdd(normLM, b[j] * b[j]);
462 normDisp = std::sqrt(normDisp);
463 normLM = std::sqrt(normLM);
490 const double parabole_a = 2 * rf + 2 * ro - 4 * rh;
491 const double parabole_b = 4 * rh - rf - 3 * ro;
493 if( parabole_a > 0.0)
495 Xmax = -0.5 * parabole_b/parabole_a;
516 BaseType::AssignSettings(ThisParameters);
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
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
BaseType::NodesArrayType NodesArrayType
Definition: implicit_solving_strategy.h:92
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: implicit_solving_strategy.h:76
BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
Definition: implicit_solving_strategy.h:74
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: implicit_solving_strategy.h:80
BaseType::ConditionsArrayType ConditionsArrayType
Definition: implicit_solving_strategy.h:96
BaseType::TSystemMatrixType TSystemMatrixType
Definition: implicit_solving_strategy.h:70
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: implicit_solving_strategy.h:78
BaseType::TDataType TDataType
Definition: implicit_solving_strategy.h:68
Short class definition.
Definition: line_search_strategy.h:84
BaseType::TSystemMatrixType TSystemMatrixType
Definition: line_search_strategy.h:109
BaseType::TSystemVectorType TSystemVectorType
Definition: line_search_strategy.h:111
TSparseSpace SparseSpaceType
Definition: line_search_strategy.h:101
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: line_search_strategy.h:306
BaseType::DofsArrayType DofsArrayType
Definition: line_search_strategy.h:107
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: line_search_strategy.h:113
BaseType::TSchemeType TSchemeType
Definition: line_search_strategy.h:103
BaseType::TBuilderAndSolverType TBuilderAndSolverType
Definition: line_search_strategy.h:97
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: line_search_strategy.h:115
BaseType::TDataType TDataType
Definition: line_search_strategy.h:99
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: line_search_strategy.h:118
BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
Definition: line_search_strategy.h:117
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
DofsContainerType & GetDofs()
Definition: node.h:694
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
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
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
TSchemeType::Pointer GetScheme()
Get method for the time scheme.
Definition: residualbased_newton_raphson_strategy.h:475
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
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
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: solving_strategy.h:507
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
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
void UnaliasedAdd(TSpaceType &dummy, typename TSpaceType::VectorType &x, const double A, const typename TSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:170
void Assign(const Expression &rExpression, const IndexType EntityIndex, const IndexType EntityDataBeginIndex, TDataType &rValue, std::index_sequence< TIndex... >)
Definition: variable_expression_data_io.cpp:41
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
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
A
Definition: sensitivityMatrix.py:70
e
Definition: run_cpp_mpi_tests.py:31