41 Parameters default_parameters( R
"(
43 "model_part_name":"PLEASE_CHOOSE_MODEL_PART_NAME",
45 "stress_limit": 100.0e6
50 rParameters[
"model_part_name"];
55 mDimension = rParameters[
"dimension"].
GetInt();
56 mStressLimit = rParameters[
"stress_limit"].
GetDouble();
72 Condition::GeometryType& rGeom = rCondition.GetGeometry();
74 rCondition.Set(PERIODIC,true);
76 rGeom[0].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = rGeom[1].Id();
77 rGeom[1].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = rGeom[0].Id();
94 Condition::GeometryType& rGeom = rCondition.GetGeometry();
96 Matrix NodalStressMatrix(StressTensorSize, StressTensorSize);
97 noalias(NodalStressMatrix) = 0.5 * ( rGeom[0].FastGetSolutionStepValue(NODAL_CAUCHY_STRESS_TENSOR)
98 + rGeom[1].FastGetSolutionStepValue(NODAL_CAUCHY_STRESS_TENSOR) );
99 Vector PrincipalStresses(StressTensorSize);
100 noalias(PrincipalStresses) = SolidMechanicsMathUtilities<double>::EigenValuesDirectMethod(NodalStressMatrix);
103 if (PrincipalStresses[0] >= mStressLimit) {
104 rCondition.Set(PERIODIC,false);
105 rGeom[0].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = 0;
106 rGeom[1].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = 0;
108 GlobalPointersVector<Element>& rE = rGeom[0].GetValue(NEIGHBOUR_ELEMENTS);
109 for (unsigned int ie = 0; ie < rE.size(); ie++) {
112 rE[ie].Set(ACTIVE,true);
123 std::string
Info()
const override
125 return "PeriodicInterfaceProcess";
136 inline std::istream&
operator >> (std::istream& rIStream,
144 rOStream << std::endl;
PeriodicInterfaceProcess(ModelPart &model_part, Parameters rParameters)
Definition: periodic_interface_process.hpp:5
Base class for all Conditions.
Definition: condition.h:59
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
SizeType NumberOfConditions(IndexType ThisIndex=0) const
Definition: model_part.h:1218
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
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
Definition: periodic_interface_process.hpp:29
void ExecuteInitialize() override
Definition: periodic_interface_process.hpp:67
KRATOS_CLASS_POINTER_DEFINITION(PeriodicInterfaceProcess)
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:123
~PeriodicInterfaceProcess() override=default
PeriodicInterfaceProcess(const PeriodicInterfaceProcess &)=delete
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: periodic_interface_process.hpp:165
PeriodicInterfaceProcess(ModelPart &model_part, Parameters rParameters)
Definition: periodic_interface_process.hpp:35
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: periodic_interface_process.hpp:85
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: periodic_interface_process.hpp:171
The base class for all processes in Kratos.
Definition: process.h:49
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void SetFlag(const Flags &rFlag, const bool FlagValue, TContainerType &rContainer)
Sets a flag according to a given status over a given container.
Definition: variable_utils.h:900
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const PeriodicInterfaceProcess &rThis)
output stream function
Definition: periodic_interface_process.hpp:140
constexpr SizeType STRESS_TENSOR_SIZE_3D
Definition: geo_mechanics_application_constants.h:38
constexpr SizeType N_DIM_3D
Definition: geo_mechanics_application_constants.h:25
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
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
std::istream & operator>>(std::istream &rIStream, PeriodicInterfaceProcess &rThis)
input stream function
constexpr SizeType STRESS_TENSOR_SIZE_2D
Definition: geo_mechanics_application_constants.h:37
model_part
Definition: face_heat.py:14