10 #if !defined(KRATOS_INLET_MESHER_PROCESS_H_INCLUDED )
11 #define KRATOS_INLET_MESHER_PROCESS_H_INCLUDED
57 : mrModelPart(rModelPart),
58 mrRemesh(rRemeshingParameters)
89 std::cout<<
" [ INLET MANAGEMENT PROCESS: "<<std::endl;
92 std::cout<<
" ModelPart Supplied do not corresponds to the Meshing Domain: ("<<mrModelPart.
Name()<<
" != "<<mrRemesh.
SubModelPartName<<
")"<<std::endl;
94 this->SetInletLayer();
97 std::cout<<
" INLET MANAGEMENT PROCESS ]; "<<std::endl;
118 std::string
Info()
const override
120 return "InletMesherProcess";
126 rOStream <<
"InletMesherProcess";
170 double critical_distance = 4.0*mrRemesh.
Refine->CriticalRadius;
176 for(ModelPart::NodesContainerType::iterator i_node = mrModelPart.NodesBegin() ; i_node != mrModelPart.NodesEnd() ; ++i_node)
178 if(i_node->Is(INLET) ){
180 double distance =
norm_2(i_node->FastGetSolutionStepValue(DISPLACEMENT));
182 if( distance > critical_distance ){
185 NodeType::Pointer pnode = i_node->Clone();
187 pnode->SetId(NodeId);
188 pnode->Coordinates() = pnode->GetInitialPosition();
190 pnode->Set(INLET,
true);
192 i_node->Set(INLET,
false);
196 for(Node::DofsContainerType::iterator i_dof = Dofs.begin(); i_dof != Dofs.end(); ++i_dof)
204 noalias(i_node->FastGetSolutionStepValue(VELOCITY,1)) = i_node->FastGetSolutionStepValue(VELOCITY);
208 InletNodes.push_back(pnode);
218 if( InletNodes.size() !=0 )
219 mrModelPart.AddNodes(InletNodes.begin(), InletNodes.end());
272 rOStream << std::endl;
Base class for all Conditions.
Definition: condition.h:59
Geometry base class.
Definition: geometry.h:71
Insert a new Inlet Layer when the previous one has gone away.
Definition: inlet_mesher_process.hpp:36
virtual ~InletMesherProcess()
Destructor.
Definition: inlet_mesher_process.hpp:65
void PrintData(std::ostream &rOStream) const override
Print object's data.s.
Definition: inlet_mesher_process.hpp:130
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: inlet_mesher_process.hpp:124
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: inlet_mesher_process.hpp:84
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: inlet_mesher_process.hpp:73
std::string Info() const override
Turn back information as a string.
Definition: inlet_mesher_process.hpp:118
InletMesherProcess(ModelPart &rModelPart, MesherUtilities::MeshingParameters &rRemeshingParameters, int EchoLevel)
Default constructor.
Definition: inlet_mesher_process.hpp:54
ModelPart::PropertiesType PropertiesType
Definition: inlet_mesher_process.hpp:46
KRATOS_CLASS_POINTER_DEFINITION(InletMesherProcess)
Pointer definition of Process.
ModelPart::NodeType NodeType
Definition: inlet_mesher_process.hpp:44
ConditionType::GeometryType GeometryType
Definition: inlet_mesher_process.hpp:47
ModelPart::ConditionType ConditionType
Definition: inlet_mesher_process.hpp:45
The base class for processes passed to the solution scheme.
Definition: mesher_process.hpp:37
static unsigned int GetMaxNodeId(ModelPart &rModelPart)
Definition: mesher_utilities.hpp:1408
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
std::string & Name()
Definition: model_part.h:1811
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
This class defines the node.
Definition: node.h:65
std::vector< std::unique_ptr< Dof< double > >> DofsContainerType
The DoF container type definition.
Definition: node.h:92
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
#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
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
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
Definition: mesher_utilities.hpp:631
RefiningParameters::Pointer Refine
Definition: mesher_utilities.hpp:684
std::string SubModelPartName
Definition: mesher_utilities.hpp:642