10 #if !defined(KRATOS_PRINT_MESH_OUTPUT_MESHER_PROCESS_H_INCLUDED )
11 #define KRATOS_PRINT_MESH_OUTPUT_MESHER_PROCESS_H_INCLUDED
55 : mrModelPart(rModelPart),
56 mrRemesh(rRemeshingParameters)
89 std::cout<<
" [ PRINT IN/OUT MESHER: ("<<mFileName<<
") "<<std::endl;
97 std::cout<<
" PRINT IN/OUT MESHER ]; "<<std::endl;
119 std::string
Info()
const override
121 return "PrintMeshOutputMesherProcess";
127 rOStream <<
"PrintMeshOutputMesherProcess";
154 std::string mFileName;
163 void PrintPointsXYZ()
167 const int&
step = mrModelPart.GetProcessInfo()[STEP];
169 const unsigned int&
dimension = mrModelPart.GetProcessInfo()[SPACE_DIMENSION];
184 unsigned int NumberOfPoints;
185 if( mFileName ==
"input" ){
194 unsigned int base = 0;
195 for(
unsigned int pn=0;
pn<NumberOfPoints;
pn++)
201 Point += std::to_string(PointList[base]);
220 const int&
step = mrModelPart.GetProcessInfo()[STEP];
234 const int&
dimension = mrModelPart.GetProcessInfo()[SPACE_DIMENSION];
237 File <<
"mesh dimension 3 elemtype tetrahedra nnode 4 \n";
239 File <<
"mesh dimension 2 elemtype triangle nnode 3 \n";
254 void PrintNodes(std::ofstream& File)
259 File <<
"coordinates \n";
263 unsigned int NumberOfPoints;
264 if( mFileName ==
"input" ){
273 const unsigned int&
dimension = mrModelPart.GetProcessInfo()[SPACE_DIMENSION];
275 unsigned int base = 0;
276 for(
unsigned int pn=0;
pn<NumberOfPoints;
pn++)
278 std::string Point(std::to_string(
pn+1 ));
283 Point += std::to_string(PointList[base]);
294 File <<
"end coordinates \n";
301 void PrintElements(std::ofstream& File)
306 File <<
"elements \n";
310 unsigned int NumberOfElements;
311 if( mFileName ==
"input" ){
321 const unsigned int&
dimension = mrModelPart.GetProcessInfo()[SPACE_DIMENSION];
323 unsigned int nds = 3;
328 for(
unsigned int el=0;
el<NumberOfElements;
el++)
330 std::string
Element(std::to_string(
el+1 ));
332 for(
unsigned int pn=0;
pn<nds;
pn++)
345 File <<
"end elements \n";
386 rOStream << std::endl;
The base class for processes passed to the solution scheme.
Definition: mesher_process.hpp:37
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Definition: print_mesh_output_mesher_process.hpp:37
std::string Info() const override
Turn back information as a string.
Definition: print_mesh_output_mesher_process.hpp:119
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: print_mesh_output_mesher_process.hpp:72
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: print_mesh_output_mesher_process.hpp:131
PrintMeshOutputMesherProcess(ModelPart &rModelPart, MesherUtilities::MeshingParameters &rRemeshingParameters, std::string FileName, int EchoLevel)
Default constructor.
Definition: print_mesh_output_mesher_process.hpp:51
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: print_mesh_output_mesher_process.hpp:125
KRATOS_CLASS_POINTER_DEFINITION(PrintMeshOutputMesherProcess)
Pointer definition of Process.
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: print_mesh_output_mesher_process.hpp:84
virtual ~PrintMeshOutputMesherProcess()
Destructor.
Definition: print_mesh_output_mesher_process.hpp:64
#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
string FileName
Export to vtk.
Definition: GenerateWind.py:175
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
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int step
Definition: face_heat.py:88
pn
Definition: generate_droplet_dynamics.py:65
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
el
Definition: read_stl.py:25
integer i
Definition: TensorModule.f:17
int * GetElementList()
Definition: mesher_utilities.hpp:178
int & GetNumberOfPoints()
Definition: mesher_utilities.hpp:182
double * GetPointList()
Definition: mesher_utilities.hpp:177
int & GetNumberOfElements()
Definition: mesher_utilities.hpp:183
Definition: mesher_utilities.hpp:631
MeshContainer InMesh
Definition: mesher_utilities.hpp:674
MeshContainer OutMesh
Definition: mesher_utilities.hpp:675