MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
Output.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2021-2025 MPM-Geomechanics Development Team
3
4#ifndef OUTPUT_H_
5#define OUTPUT_H_
6
7#include "Mesh/Mesh.h"
8#include "Particle/Particle.h"
9#include "Body/Body.h"
10#include "TerrainContact.h"
11
17namespace Output {
18
22
26
31 void writeGrid(Mesh* mesh, CellType cell_type_representation=CellType::CELLS, double time=0.0);
32
36 void writeParticles(vector<Particle*>* particles, double time=0.0);
37
41 void writeBody(Body* body, double time=0.0);
42
46
48 void writeSTLContact(TerrainContact* tc, double time);
49
53 void writeBodies(vector<Body*>* bodies, double time=0.0);
54
57 void configureResultFields(vector<string> fields);
58
61 void configureGridResultFields(vector<string> fields);
62
65 void configureSTLContactFields(vector<string> fields);
66
70 bool isFieldRequired(string field);
71
75 bool isGridFieldRequired(string field);
76
81 void writeResultInStep(int resultSteps, vector<Particle*>* particles, double iTime);
82
85 void writeGridInStep(int resultSteps, Mesh* mesh, double iTime);
86
89 void writeSTLContactInStep(int resultSteps, TerrainContact* tc, double iTime);
90
93 void writeInitialState(vector<Body*>* bodies, double iTime, Mesh* mesh, TerrainContact* tc);
94
98
102
106}
107
108#endif /* OUTPUT_H_ */
Represents a body in the space forming by a group of materials points and identified by a number.
Definition Body.h:15
Class representing a rectangular grid mesh.
Definition Mesh.h:26
Class to compute terrain contact.
Definition TerrainContact.h:11
Operations to write the results and the mesh for its visualization.
void writeBody(Body *body, double time=0.0)
Write the particles in a body.
void initFieldsKeyWords()
Initialize the keywords of the fields.
void writeSTLContact(TerrainContact *tc, double time)
Write the STL contact results.
CellType
Definition Output.h:21
@ CELLS
Definition Output.h:21
@ POINTS
Definition Output.h:21
void writeResultInStep(int resultSteps, vector< Particle * > *particles, double iTime)
Write results if the step is the step result.
void writeSTLContactInStep(int resultSteps, TerrainContact *tc, double iTime)
Write the STL contact results if the step is the step result.
void configureSTLContactFields(vector< string > fields)
Configures the stlContact fields to be written.
void farewellScreen()
Print final program screen.
void printElapsedTime()
Print elapsed time.
void writeInitialState(vector< Body * > *bodies, double iTime, Mesh *mesh, TerrainContact *tc)
Write the initial state of the simulation.
bool isGridFieldRequired(string field)
Verify is the field must be written.
void configureGridResultFields(vector< string > fields)
Configures the grid fields to be written.
bool isFieldRequired(string field)
Verify is the grid field must be written.
void writeGrid(Mesh *mesh, CellType cell_type_representation=CellType::CELLS, double time=0.0)
Write the grid mesh into a vtu file.
void writeGridInStep(int resultSteps, Mesh *mesh, double iTime)
Write grid results if the step is the step result.
void writeParticles(vector< Particle * > *particles, double time=0.0)
Write the particles of the model into a vtu file.
void writeResultsSeries()
Write the time series of the results.
void writeBodies(vector< Body * > *bodies, double time=0.0)
Write the particles forming bodies.
void welcomeScreen()
Print initial program screen.
void configureResultFields(vector< string > fields)
Configures the fields to be written.