PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
inp::ParticleDeck Struct Reference

Structure to read and store particle related input data. More...

#include <particleDeck.h>

Collaboration diagram for inp::ParticleDeck:

Public Member Functions

 ParticleDeck ()
 Constructor.
 
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.
 

Data Fields

std::vector< inp::Zoned_zoneVec
 All zones.
 
std::vector< std::pair< std::string, size_t > > d_zoneToParticleORWallDeck
 Maps particle/wall to corresponding zone.
 
std::vector< inp::ParticleZoned_particleZones
 Particle in zones.
 
util::geometry::GeomData d_contGeomData
 Geometry of container in which all particles reside. Currently, we only support rectangle (2-d) and cuboid (3-d)
 
inp::PNeighborDeck d_pNeighDeck
 Neighbor search data.
 
bool d_gravityActive
 Gravity loading value.
 
util::Point d_gravity
 Gravity loading value.
 
std::vector< inp::PBCDatad_forceDeck
 Force loading deck.
 
std::vector< inp::PBCDatad_dispDeck
 Displacement loading deck.
 
inp::PICDeck d_icDeck
 Initial condition deck.
 
std::string d_testName
 Specify test name (if any)
 
size_t d_particleIdCompressiveTest
 if it is a compressive test, specify wall id and direction
 
size_t d_particleForceDirectionCompressiveTest
 if it is a compressive test, specify force direction on wall
 

Detailed Description

Structure to read and store particle related input data.

Definition at line 31 of file particleDeck.h.

Constructor & Destructor Documentation

◆ ParticleDeck()

inp::ParticleDeck::ParticleDeck ( )
inline

Constructor.

Definition at line 78 of file particleDeck.h.

81 d_gravityActive(false),
82 d_gravity(),
83 d_icDeck(),
84 d_testName(""),
bool d_gravityActive
Gravity loading value.
size_t d_particleForceDirectionCompressiveTest
if it is a compressive test, specify force direction on wall
size_t d_particleIdCompressiveTest
if it is a compressive test, specify wall id and direction
inp::PNeighborDeck d_pNeighDeck
Neighbor search data.
inp::PICDeck d_icDeck
Initial condition deck.
util::Point d_gravity
Gravity loading value.
std::string d_testName
Specify test name (if any)
util::geometry::GeomData d_contGeomData
Geometry of container in which all particles reside. Currently, we only support rectangle (2-d) and c...

Member Function Documentation

◆ print()

void inp::ParticleDeck::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)

Definition at line 141 of file particleDeck.h.

141{ std::cout << printStr(nt, lvl); }
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.

References printStr().

Here is the call graph for this function:

◆ printStr()

std::string inp::ParticleDeck::printStr ( int  nt = 0,
int  lvl = 0 
) const
inline

Returns the string containing printable information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)
Returns
string String containing printable information about the object

Definition at line 95 of file particleDeck.h.

95 {
96
97 auto tabS = util::io::getTabS(nt);
98 std::ostringstream oss;
99 oss << tabS << "------- ParticleDeck --------" << std::endl << std::endl;
100 oss << tabS << "Number of particle zones = " << d_particleZones.size() << std::endl;
101 oss << tabS << "Particle data:" << std::endl;
102 for (size_t i = 0; i < d_particleZones.size(); i++) {
103 oss << tabS << "Particle data for zone = " << i << std::endl;
104 oss << d_particleZones[i].printStr(nt + 1, lvl);
105 }
106 oss << tabS << "Container geometry details:" << std::endl;
107 oss << d_contGeomData.printStr(nt+1, lvl);
108 oss << tabS << "Neighbor data:" << std::endl;
109 oss << d_pNeighDeck.printStr(nt+1, lvl);
110 oss << tabS << "Gravity: Status = " << d_gravityActive
111 << ", force = " << d_gravity.printStr(0, 0) << std::endl;
112 oss << tabS << "Num of Force BC = " << d_forceDeck.size() << std::endl;
113 oss << tabS << "Force BC info:" << std::endl;
114 size_t bc_count = 0;
115 for (const auto &f: d_forceDeck) {
116 oss << tabS << " Force BC id = " << bc_count++ << std::endl;
117 oss << f.printStr(nt+2, lvl);
118 }
119 oss << tabS << "Num of Displacement BC = " << d_dispDeck.size() <<
120 std::endl;
121 oss << tabS << "Displacement BC info:" << std::endl;
122 bc_count = 0;
123 for (const auto &f: d_dispDeck) {
124 oss << tabS << " Displacement BC id = " << bc_count++ << std::endl;
125 oss << f.printStr(nt+2, lvl);
126 }
127 oss << tabS << "IC data:" << std::endl;
128 oss << d_icDeck.printStr(nt+1, lvl);
129 oss << tabS << "Test name = " << d_testName << std::endl;
130 oss << tabS << std::endl;
131
132 return oss.str();
133 }
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition pICDeck.h:50
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
std::vector< inp::ParticleZone > d_particleZones
Particle in zones.
std::vector< inp::PBCData > d_dispDeck
Displacement loading deck.
std::vector< inp::PBCData > d_forceDeck
Force loading deck.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition point.h:94
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.

References d_contGeomData, d_dispDeck, d_forceDeck, d_gravity, d_gravityActive, d_icDeck, d_particleZones, d_pNeighDeck, d_testName, util::io::getTabS(), inp::PICDeck::printStr(), inp::PNeighborDeck::printStr(), util::geometry::GeomData::printStr(), and util::Point::printStr().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ d_contGeomData

util::geometry::GeomData inp::ParticleDeck::d_contGeomData

Geometry of container in which all particles reside. Currently, we only support rectangle (2-d) and cuboid (3-d)

Definition at line 46 of file particleDeck.h.

Referenced by printStr().

◆ d_dispDeck

std::vector<inp::PBCData> inp::ParticleDeck::d_dispDeck

Displacement loading deck.

Definition at line 61 of file particleDeck.h.

Referenced by printStr().

◆ d_forceDeck

std::vector<inp::PBCData> inp::ParticleDeck::d_forceDeck

Force loading deck.

Definition at line 58 of file particleDeck.h.

Referenced by printStr().

◆ d_gravity

util::Point inp::ParticleDeck::d_gravity

Gravity loading value.

Definition at line 55 of file particleDeck.h.

Referenced by printStr().

◆ d_gravityActive

bool inp::ParticleDeck::d_gravityActive

Gravity loading value.

Definition at line 52 of file particleDeck.h.

Referenced by printStr().

◆ d_icDeck

inp::PICDeck inp::ParticleDeck::d_icDeck

Initial condition deck.

Definition at line 64 of file particleDeck.h.

Referenced by printStr().

◆ d_particleForceDirectionCompressiveTest

size_t inp::ParticleDeck::d_particleForceDirectionCompressiveTest

if it is a compressive test, specify force direction on wall

Definition at line 73 of file particleDeck.h.

◆ d_particleIdCompressiveTest

size_t inp::ParticleDeck::d_particleIdCompressiveTest

if it is a compressive test, specify wall id and direction

Definition at line 70 of file particleDeck.h.

◆ d_particleZones

std::vector<inp::ParticleZone> inp::ParticleDeck::d_particleZones

Particle in zones.

Definition at line 40 of file particleDeck.h.

Referenced by printStr().

◆ d_pNeighDeck

inp::PNeighborDeck inp::ParticleDeck::d_pNeighDeck

Neighbor search data.

Definition at line 49 of file particleDeck.h.

Referenced by printStr().

◆ d_testName

std::string inp::ParticleDeck::d_testName

Specify test name (if any)

Definition at line 67 of file particleDeck.h.

Referenced by printStr().

◆ d_zoneToParticleORWallDeck

std::vector<std::pair<std::string, size_t> > inp::ParticleDeck::d_zoneToParticleORWallDeck

Maps particle/wall to corresponding zone.

Definition at line 37 of file particleDeck.h.

◆ d_zoneVec

std::vector<inp::Zone> inp::ParticleDeck::d_zoneVec

All zones.

Definition at line 34 of file particleDeck.h.


The documentation for this struct was generated from the following file: