8 #if !defined(KRATOS_PERIODIC_INTERFACE_PROCESS )
9 #define KRATOS_PERIODIC_INTERFACE_PROCESS
14 #include "custom_utilities/solid_mechanics_math_utilities.hpp"
41 "model_part_name":"PLEASE_CHOOSE_MODEL_PART_NAME",
43 "stress_limit": 100.0e6
48 rParameters[
"model_part_name"];
53 mDimension = rParameters[
"dimension"].
GetInt();
54 mStressLimit = rParameters[
"stress_limit"].
GetDouble();
80 #pragma omp parallel for
81 for(
int i = 0;
i < NCons;
i++)
83 ModelPart::ConditionsContainerType::iterator itCond = con_begin +
i;
86 itCond->Set(PERIODIC,
true);
88 rGeom[0].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = rGeom[1].
Id();
89 rGeom[1].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = rGeom[0].
Id();
95 #pragma omp parallel for
96 for(
int i = 0;
i < NElems;
i++)
98 ModelPart::ElementsContainerType::iterator itElem = el_begin +
i;
99 itElem->Set(ACTIVE,
false);
113 #pragma omp parallel for
114 for(
int i = 0;
i < NCons;
i++)
116 ModelPart::ConditionsContainerType::iterator itCond = con_begin +
i;
119 Matrix NodalStressMatrix(3,3);
120 noalias(NodalStressMatrix) = 0.5 * ( rGeom[0].FastGetSolutionStepValue(NODAL_EFFECTIVE_STRESS_TENSOR)
121 + rGeom[1].FastGetSolutionStepValue(NODAL_EFFECTIVE_STRESS_TENSOR) );
126 sqrt(0.25*(NodalStressMatrix(0,0)-NodalStressMatrix(1,1))*(NodalStressMatrix(0,0)-NodalStressMatrix(1,1)) +
127 NodalStressMatrix(0,1)*NodalStressMatrix(0,1));
129 sqrt(0.25*(NodalStressMatrix(0,0)-NodalStressMatrix(1,1))*(NodalStressMatrix(0,0)-NodalStressMatrix(1,1)) +
130 NodalStressMatrix(0,1)*NodalStressMatrix(0,1));
140 itCond->Set(PERIODIC,
false);
141 rGeom[0].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = 0;
142 rGeom[1].FastGetSolutionStepValue(PERIODIC_PAIR_INDEX) = 0;
145 for(
unsigned int ie = 0; ie < rE.
size(); ie++)
149 rE[ie].Set(ACTIVE,
true);
159 std::string
Info()
const override
161 return "PeriodicInterfaceProcess";
167 rOStream <<
"PeriodicInterfaceProcess";
202 inline std::ostream&
operator << (std::ostream& rOStream,
205 rThis.PrintInfo(rOStream);
206 rOStream << std::endl;
207 rThis.PrintData(rOStream);
PeriodicInterfaceProcess(ModelPart &model_part, Parameters rParameters)
Definition: periodic_interface_process.hpp:5
Geometry base class.
Definition: geometry.h:71
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometry.h:627
size_type size() const
Definition: global_pointers_vector.h:307
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
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:73
ModelPart & mr_model_part
Member Variables.
Definition: periodic_interface_process.hpp:181
KRATOS_CLASS_POINTER_DEFINITION(PeriodicInterfaceProcess)
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
void Execute() override
Execute method is used to execute the PeriodicInterfaceProcess algorithms.
Definition: periodic_interface_process.hpp:67
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:159
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: periodic_interface_process.hpp:165
PeriodicInterfaceProcess(ModelPart &model_part, Parameters rParameters)
Constructor.
Definition: periodic_interface_process.hpp:32
~PeriodicInterfaceProcess() override
Destructor.
Definition: periodic_interface_process.hpp:62
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: periodic_interface_process.hpp:106
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
static Vector EigenValuesDirectMethod(const Matrix &A)
Definition: solid_mechanics_math_utilities.hpp:243
#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::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
model_part
Definition: face_heat.py:14
PrincipalStresses
Definition: isotropic_damage_automatic_differentiation.py:221
integer i
Definition: TensorModule.f:17