PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
meshDeck.h
Go to the documentation of this file.
1/*
2 * -------------------------------------------
3 * Copyright (c) 2021 - 2024 Prashant K. Jha
4 * -------------------------------------------
5 * PeriDEM https://github.com/prashjha/PeriDEM
6 *
7 * Distributed under the Boost Software License, Version 1.0. (See accompanying
8 * file LICENSE)
9 */
10
11#ifndef INP_MESHDECK_H
12#define INP_MESHDECK_H
13
14#include "util/io.h"
16#include <string>
17
18namespace inp {
19
26struct MeshDeck {
27
29 size_t d_dim;
30
43
49
55
57 std::string d_filename;
58
61
63 double d_h;
64
70
74 std::string d_createMeshInfo;
75
80
87
95 std::string printStr(int nt = 0, int lvl = 0) const {
96
98 std::ostringstream oss;
99 oss << tabS << "------- MeshDeck --------" << std::endl << std::endl;
100 oss << tabS << "Dimension = " << d_dim << std::endl;
101 oss << tabS << "Populate element-node connectivity data = " << d_populateElementNodeConnectivity << std::endl;
102 oss << tabS << "Order of quad approximation = " << d_quadOrder << std::endl;
103 oss << tabS << "Spatial discretization type = " << d_spatialDiscretization
104 << std::endl;
105 oss << tabS << "Filename = " << d_filename << std::endl;
106 oss << tabS << "Compute mesh size = " << d_computeMeshSize << std::endl;
107 oss << tabS << "Mesh size = " << d_h << std::endl;
108 oss << tabS << "Create mesh = " << d_createMesh << std::endl;
109 oss << tabS << "Create mesh info = " << d_createMeshInfo << std::endl;
110 oss << tabS << "Create mesh geometry details: " << std::endl;
112 oss << tabS << std::endl;
113
114 return oss.str();
115 }
116
123 void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); }
124};
125
128} // namespace inp
129
130#endif // INP_MESHDECK_H
Collection of methods and database related to input.
Definition mesh.h:20
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
Structure to read and store mesh related input data.
Definition meshDeck.h:26
std::string d_spatialDiscretization
Tag for spatial discretization.
Definition meshDeck.h:42
bool d_computeMeshSize
Flag which indicates if mesh size is to be computed.
Definition meshDeck.h:60
double d_h
Mesh size.
Definition meshDeck.h:63
size_t d_quadOrder
Order of quadrature approximation for strain and stress computation (default is 1)
Definition meshDeck.h:54
bool d_createMesh
Specify if we create mesh using in-built gmsh or in-built routine for uniform discretization of recta...
Definition meshDeck.h:69
void print(int nt=0, int lvl=0) const
Prints the information about the object.
Definition meshDeck.h:123
std::string d_createMeshInfo
Information that will be used when creating a mesh using in-built routines.
Definition meshDeck.h:74
size_t d_dim
Dimension.
Definition meshDeck.h:29
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition meshDeck.h:95
MeshDeck()
Constructor.
Definition meshDeck.h:84
bool d_populateElementNodeConnectivity
Flag to indicate if we should populate element-node connectivity data in meshes.
Definition meshDeck.h:48
std::string d_filename
Filename to read mesh data.
Definition meshDeck.h:57
util::geometry::GeomData d_createMeshGeomData
Information that will be used when creating a mesh using in-built routines.
Definition meshDeck.h:79
Input data for geometrical objects.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.