10 #if !defined(KRATOS_CLEAR_POINT_CONTACT_CONDITIONS_PROCESS_H_INCLUDED )
11 #define KRATOS_CLEAR_POINT_CONTACT_CONDITIONS_PROCESS_H_INCLUDED
77 : mrModelPart(rModelPart)
106 this->ClearPointContactConditions();
131 this->ClearPointContactForces();
134 this->ClearPointContactNormals();
154 std::string
Info()
const override
156 return "ClearPointContactConditionsProcess";
162 rOStream <<
"ClearPointContactConditionsProcess";
239 void ClearPointContactForces()
247 for(ModelPart::NodesContainerType::ptr_iterator nd = rNodes.ptr_begin(); nd != rNodes.ptr_end(); ++nd)
249 if( (*nd)->Is(BOUNDARY) && (*nd)->IsNot(CONTACT) ){
251 ContactForce.
clear();
263 void ClearPointContactNormals()
271 for(ModelPart::NodesContainerType::ptr_iterator nd = rNodes.ptr_begin(); nd != rNodes.ptr_end(); ++nd)
273 if( (*nd)->Is(BOUNDARY) && (*nd)->IsNot(CONTACT) ){
274 array_1d<double, 3> & ContactNormal = (*nd)->FastGetSolutionStepValue(CONTACT_NORMAL);
275 ContactNormal.clear();
287 void ClearPointContactConditions()
292 std::string ModelPartName;
297 if(i_mp->Is(SOLID) && i_mp->Is(ACTIVE))
298 ModelPartName = i_mp->Name();
301 ClearPointContactConditions(mrModelPart.GetSubModelPart(ModelPartName));
304 ClearPointContactConditions(mrModelPart);
313 void ClearPointContactConditions(ModelPart& rModelPart)
322 if( mEchoLevel > 1 ){
323 std::cout<<
" ["<<rModelPart.Name()<<
" :: CONDITIONS [OLD:"<<rModelPart.NumberOfConditions();
328 for(ModelPart::ConditionsContainerType::iterator ic = rModelPart.ConditionsBegin(); ic!= rModelPart.ConditionsEnd(); ic++)
330 if( !(ic->Is(CONTACT) && ic->GetGeometry().size() == 1) ){
331 PreservedConditions.
push_back(*(ic.base()));
335 rModelPart.Conditions().swap(PreservedConditions);
340 if( mEchoLevel > 1 ){
341 std::cout<<
" / NEW:"<<rModelPart.NumberOfConditions()<<
"] "<<std::endl;
394 rOStream << std::endl;
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::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
SubModelPartsContainerType::iterator SubModelPartIterator
Iterator over the sub model parts of this model part.
Definition: model_part.h:258
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
The base class for all processes in Kratos.
Definition: process.h:49
BOOST_UBLAS_INLINE void clear()
Definition: array_1d.h:325
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
ModelPart::ConditionsContainerType ConditionsContainerType
Definition: find_conditions_neighbours_process.h:45
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
ModelPart::ElementsContainerType ElementsContainerType
Definition: clear_contact_conditions_mesher_process.hpp:43
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432