![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Structure to read and store mesh related input data. More...
#include <meshDeck.h>
Public Member Functions | |
| MeshDeck (const json &j=json({})) | |
| Constructor. | |
| MeshDeck (std::string filename, double h_meshing=-1.) | |
| Constructor for programmatic use (optional meshing size for tests). | |
| void | readFromJson (const json &j) |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing printable information about the object. | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the object. | |
Static Public Member Functions | |
| static json | getExampleJson (const json &given=json::object()) |
| Returns example JSON object for ModelDeck configuration. | |
| static json | getExampleJson (const std::string &)=delete |
| Rejects a value given where a set of named values is expected. | |
| static json | getExampleJson (const char *)=delete |
| Rejects a value given where a set of named values is expected. | |
| static const std::vector< Field< MeshDeck > > & | fields () |
| Reads from json object. | |
| static const std::vector< Field< MeshDeck > > & | createMeshFields () |
| The fields of the CreateMesh sub-block. | |
Data Fields | |
| std::string | d_filename |
| Filename to read mesh data. | |
| double | d_hMeshing |
| Target spacing for in-built meshers only (Gmsh uniform / uniform rectangle grid). | |
| bool | d_createMesh |
| Specify if we create mesh using in-built gmsh or in-built routine for uniform discretization of rectangle/cuboid. | |
| std::string | d_createMeshInfo |
| Selector for in-built mesh creation (e.g. uniform rectangle, gmsh_builtin_mesh for built-in geometries meshed in-process with Gmsh). | |
| bool | d_writeMeshFile |
| If true (default), Gmsh-based create-mesh paths write a .msh file; set false for in-memory only. | |
| std::vector< std::vector< double > > | d_voidRegions |
Axis-aligned boxes emptied from an in-built uniform grid (CreateMesh.Void_Regions: [xlo,ylo,zlo,xhi,yhi,zhi]). | |
Structure to read and store mesh related input data.
Definition at line 28 of file meshDeck.h.
Constructor.
Definition at line 66 of file meshDeck.h.
|
inline |
Constructor for programmatic use (optional meshing size for tests).
Definition at line 73 of file meshDeck.h.
The fields of the CreateMesh sub-block.
The sub-block has a table of its own. Its members are members of this deck, so the two tables write into the same object.
Definition at line 163 of file meshDeck.h.
References d_createMesh, d_createMeshInfo, d_hMeshing, d_writeMeshFile, and inp::field().
Referenced by getExampleJson(), printStr(), and readFromJson().
Reads from json object.
The fields of the block itself
Definition at line 147 of file meshDeck.h.
References d_filename, and inp::field().
Referenced by printStr(), and readFromJson().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A file name passed on its own would convert to a JSON string and be read as a set with no keys, so such a call is rejected when compiling.
Returns example JSON object for ModelDeck configuration.
Definition at line 81 of file meshDeck.h.
References inp::applyGiven(), inp::checkNames(), and createMeshFields().
Referenced by inp::ParticleDeck::getParticleMeshExampleJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testMeshDeck().
|
staticdelete |
Rejects a value given where a set of named values is expected.
A file name passed on its own would convert to a JSON string and be read as a set with no keys, so such a call is rejected when compiling.
|
inline |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 244 of file meshDeck.h.
References printStr().
|
inline |
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 223 of file meshDeck.h.
References createMeshFields(), d_voidRegions, fields(), util::io::getTabS(), and inp::printFields().
Referenced by print().
|
inline |
Definition at line 178 of file meshDeck.h.
References createMeshFields(), d_createMesh, d_filename, d_hMeshing, d_voidRegions, fields(), and inp::readFields().
Referenced by anonymous_namespace{testDeckRoundTrip.cpp}::testMeshDeck().
| bool inp::MeshDeck::d_createMesh |
Specify if we create mesh using in-built gmsh or in-built routine for uniform discretization of rectangle/cuboid.
Definition at line 46 of file meshDeck.h.
Referenced by createMeshFields(), mesh_gen::createParticleMesh(), and readFromJson().
| std::string inp::MeshDeck::d_createMeshInfo |
Selector for in-built mesh creation (e.g. uniform rectangle, gmsh_builtin_mesh for built-in geometries meshed in-process with Gmsh).
Definition at line 52 of file meshDeck.h.
Referenced by createMeshFields(), and mesh_gen::createParticleMesh().
| std::string inp::MeshDeck::d_filename |
Filename to read mesh data.
Definition at line 31 of file meshDeck.h.
Referenced by anonymous_namespace{testMeshGen.cpp}::builtinMeshCheckForGeometry(), mesh_gen::createParticleMesh(), fields(), mesh::Mesh::loadFromTetraElements3D(), mesh::Mesh::loadFromTriangleElements2D(), anonymous_namespace{particleMesh.cpp}::maybeWriteMeshFile(), and readFromJson().
| double inp::MeshDeck::d_hMeshing |
Target spacing for in-built meshers only (Gmsh uniform / uniform rectangle grid).
Read from CreateMesh.Mesh_Size in JSON. It drives mesh generation only; the characteristic length stored on mesh::Mesh is always computed from the generated nodes (same as for meshes read from file).
Definition at line 40 of file meshDeck.h.
Referenced by anonymous_namespace{testMeshGen.cpp}::builtinMeshCheckForGeometry(), createMeshFields(), mesh_gen::createParticleMesh(), and readFromJson().
| std::vector<std::vector<double> > inp::MeshDeck::d_voidRegions |
Axis-aligned boxes emptied from an in-built uniform grid (CreateMesh.Void_Regions: [xlo,ylo,zlo,xhi,yhi,zhi]).
Definition at line 61 of file meshDeck.h.
Referenced by mesh_gen::createParticleMesh(), printStr(), and readFromJson().
| bool inp::MeshDeck::d_writeMeshFile |
If true (default), Gmsh-based create-mesh paths write a .msh file; set false for in-memory only.
Definition at line 55 of file meshDeck.h.
Referenced by createMeshFields(), mesh_gen::createParticleMesh(), and anonymous_namespace{particleMesh.cpp}::maybeWriteMeshFile().