PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
zoneDeck.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_P_ZONEDECK_H
12#define INP_P_ZONEDECK_H
13
15#include "inp/decks/meshDeck.h"
17#include <memory>
18
19namespace inp {
20
27struct Zone {
28
31
33 size_t d_zoneId;
34
39
48
56 std::string printStr(int nt = 0, int lvl = 0) const {
57
58 auto tabS = util::io::getTabS(nt);
59 std::ostringstream oss;
60 oss << tabS << "------- Zone --------" << std::endl << std::endl;
61 oss << tabS << "Zone id = " << d_zoneId << std::endl;
62 oss << tabS << "Zone geometry data: " << std::endl;
63 oss << d_zoneGeomData.printStr(nt+1, lvl);
64
65 return oss.str();
66 }
67
74 void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); }
75};
76
79
82
88
91
94
97
104 std::string d_genMethod;
105
116
118 std::string d_particleFile;
119
122
125
128
131
134
143
163
185
193 std::string printStr(int nt = 0, int lvl = 0) const {
194
195 auto tabS = util::io::getTabS(nt);
196 std::ostringstream oss;
197 oss << tabS << "------- ParticleZone --------" << std::endl << std::endl;
198 oss << tabS << "Zone info: " << std::endl;
199 oss << d_zone.printStr(nt+1, lvl);
200 oss << tabS << "Particle type = " << d_particleDescription << std::endl;
201 oss << tabS << "Generation method = " << d_genMethod << std::endl;
202 oss << tabS << "Bdry nodes tol = " << d_nearBdNodesTol << std::endl;
203 oss << tabS << "Mesh flag = " << d_meshFlag << std::endl;
204 oss << tabS << "All dofs constrained = " << d_allDofsConstrained << std::endl;
205 oss << tabS << "d_createParticleUsingParticleZoneGeomObject = " << d_createParticleUsingParticleZoneGeomObject << std::endl;
206 oss << tabS << "Particle geometry details: " << std::endl;
207 oss << d_particleGeomData.printStr(nt+1, lvl);
208 oss << tabS << "Reference rarticle geometry details: " << std::endl;
209 oss << d_refParticleGeomData.printStr(nt+1, lvl);
210 oss << d_matDeck.printStr(nt+1, lvl);
211 oss << d_meshDeck.printStr(nt+1, lvl);
212 oss << std::endl;
213
214 return oss.str();
215 }
216
223 void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); }
224};
225
226} // namespace inp
227
228#endif // INP_P_ZONEDECK_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 material related data.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Structure to read and store mesh related input data.
Definition meshDeck.h:26
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition meshDeck.h:95
User-input data for particle zone.
Definition zoneDeck.h:78
inp::MeshDeck d_meshDeck
Store mesh information.
Definition zoneDeck.h:124
bool d_allDofsConstrained
Specify if all dofs are constrained.
Definition zoneDeck.h:130
void print(int nt=0, int lvl=0) const
Prints the information about the object.
Definition zoneDeck.h:223
util::geometry::GeomData d_refParticleGeomData
Geometry of details of reference particle.
Definition zoneDeck.h:96
std::string d_particleDescription
Particle information. E.g., "rigid". If nothing specific is available, value will be empty string.
Definition zoneDeck.h:87
inp::Zone d_zone
Zone data.
Definition zoneDeck.h:81
util::geometry::GeomData d_particleGeomData
Geometry of details of particle.
Definition zoneDeck.h:93
bool d_meshFlag
Specify if we mesh particle (intended to handle rigid wall in future)
Definition zoneDeck.h:127
inp::MaterialDeck d_matDeck
Store material information.
Definition zoneDeck.h:121
ParticleZone(const ParticleZone &pz)
Copy constructor.
Definition zoneDeck.h:169
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition zoneDeck.h:193
bool d_createParticleUsingParticleZoneGeomObject
Specify if the particle should be created using the particle geometry in the zone data and mesh file....
Definition zoneDeck.h:142
bool d_isWall
Is this particle actually a wall?
Definition zoneDeck.h:90
ParticleZone()
Constructor.
Definition zoneDeck.h:147
std::string d_particleFileDataType
Specify what data to be expected in the particle file e.g.
Definition zoneDeck.h:115
double d_nearBdNodesTol
Specify how deep we search for nodes near boundary for contact calculations.
Definition zoneDeck.h:133
std::string d_particleFile
Read particle from a file.
Definition zoneDeck.h:118
std::string d_genMethod
Particle generation method.
Definition zoneDeck.h:104
User-input data for zones.
Definition zoneDeck.h:27
Zone()
Constructor.
Definition zoneDeck.h:38
Zone(const Zone &z)
Constructor.
Definition zoneDeck.h:45
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition zoneDeck.h:56
size_t d_zoneId
Specify zone to which this particle belongs to.
Definition zoneDeck.h:33
util::geometry::GeomData d_zoneGeomData
Zone geometry data.
Definition zoneDeck.h:30
void print(int nt=0, int lvl=0) const
Prints the information about the object.
Definition zoneDeck.h:74
Input data for geometrical objects.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.