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

User-input data for particle neighbor search. More...

#include <pBCData.h>

Collaboration diagram for inp::PBCData:

Public Member Functions

 PBCData ()
 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::string d_selectionType
 Method for applying force e.g.
 
bool d_isRegionActive
 Flag that indicates if region-based application of boundary condition is active. So cases of 'region', 'region_with_include_list', 'region_with_exclude_list', and 'region_with_include_list_with_exclude_list' will have region-based application of boundary condition.
 
util::geometry::GeomData d_regionGeomData
 Region geometry (if any)
 
std::vector< size_t > d_pList
 List of particles (if any)
 
std::vector< size_t > d_pNotList
 List of particles to not include (if any)
 
std::string d_timeFnType
 Name of the formula with respect to time.
 
std::string d_spatialFnType
 Name of the formula of with respect to spatial coordinate.
 
std::vector< size_t > d_direction
 List of dofs on which this bc will be applied.
 
std::vector< double > d_timeFnParams
 List of parameters for function wrt time.
 
std::vector< double > d_spatialFnParams
 List of parameters for function wrt spatial coordinate.
 
bool d_isDisplacementZero
 Specify if this bc corresponds to zero displacement condition.
 

Detailed Description

User-input data for particle neighbor search.

Definition at line 24 of file pBCData.h.

Constructor & Destructor Documentation

◆ PBCData()

inp::PBCData::PBCData ( )
inline

Constructor.

Definition at line 100 of file pBCData.h.

100 :
util::geometry::GeomData d_regionGeomData
Region geometry (if any)
Definition pBCData.h:45
bool d_isDisplacementZero
Specify if this bc corresponds to zero displacement condition.
Definition pBCData.h:95
bool d_isRegionActive
Flag that indicates if region-based application of boundary condition is active. So cases of 'region'...
Definition pBCData.h:42

Member Function Documentation

◆ print()

void inp::PBCData::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 147 of file pBCData.h.

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

References printStr().

Here is the call graph for this function:

◆ printStr()

std::string inp::PBCData::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 110 of file pBCData.h.

110 {
111
112 auto tabS = util::io::getTabS(nt);
113 std::ostringstream oss;
114 oss << tabS << "------- PBCData --------" << std::endl << std::endl;
115 oss << tabS << "Selection type = " << d_selectionType << std::endl;
116 oss << tabS << "Is region active = " << d_isRegionActive << std::endl;
117 if (d_regionGeomData.d_geom_p != nullptr) {
118 oss << tabS << "Region geometry info: " << std::endl;
119 oss << d_regionGeomData.printStr(nt+1, lvl);
120 }
121 if (!d_pList.empty())
122 oss << tabS << "Particle list = ["
123 << util::io::printStr<size_t>(d_pList, 0) << "]" << std::endl;
124 if (!d_pNotList.empty())
125 oss << tabS << "Particle excluded list = ["
126 << util::io::printStr<size_t>(d_pNotList, 0) << "]" << std::endl;
127 oss << tabS << "Time function type = " << d_timeFnType << std::endl;
128 oss << tabS << "Time function parameters = ["
129 << util::io::printStr<double>(d_timeFnParams, 0) << "]" << std::endl;
130 oss << tabS << "Spatial function type = " << d_spatialFnType << std::endl;
131 oss << tabS << "Spatial function parameters = ["
132 << util::io::printStr<double>(d_spatialFnParams, 0) << "]" << std::endl;
133 oss << tabS << "Direction = [" << util::io::printStr<size_t>(d_direction, 0)
134 << "]" << std::endl;
135 oss << tabS << "Is displacement zero = " << d_isDisplacementZero << std::endl;
136 oss << tabS << std::endl;
137
138 return oss.str();
139 }
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
std::string d_timeFnType
Name of the formula with respect to time.
Definition pBCData.h:64
std::vector< size_t > d_pList
List of particles (if any)
Definition pBCData.h:48
std::vector< double > d_spatialFnParams
List of parameters for function wrt spatial coordinate.
Definition pBCData.h:92
std::string d_selectionType
Method for applying force e.g.
Definition pBCData.h:35
std::string d_spatialFnType
Name of the formula of with respect to spatial coordinate.
Definition pBCData.h:77
std::vector< size_t > d_pNotList
List of particles to not include (if any)
Definition pBCData.h:51
std::vector< double > d_timeFnParams
List of parameters for function wrt time.
Definition pBCData.h:89
std::vector< size_t > d_direction
List of dofs on which this bc will be applied.
Definition pBCData.h:86
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
std::shared_ptr< util::geometry::GeomObject > d_geom_p
Zone geometry.

References d_direction, util::geometry::GeomData::d_geom_p, d_isDisplacementZero, d_isRegionActive, d_pList, d_pNotList, d_regionGeomData, d_selectionType, d_spatialFnParams, d_spatialFnType, d_timeFnParams, d_timeFnType, util::io::getTabS(), and util::geometry::GeomData::printStr().

Referenced by print().

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

Field Documentation

◆ d_direction

std::vector<size_t> inp::PBCData::d_direction

List of dofs on which this bc will be applied.

E.g. if bc is only applied on x-component, d_direction will be 1. If bc is applied on x- and y-component, d_direction will be vector with elements 1 and 2.

Definition at line 86 of file pBCData.h.

Referenced by printStr().

◆ d_isDisplacementZero

bool inp::PBCData::d_isDisplacementZero

Specify if this bc corresponds to zero displacement condition.

Definition at line 95 of file pBCData.h.

Referenced by printStr().

◆ d_isRegionActive

bool inp::PBCData::d_isRegionActive

Flag that indicates if region-based application of boundary condition is active. So cases of 'region', 'region_with_include_list', 'region_with_exclude_list', and 'region_with_include_list_with_exclude_list' will have region-based application of boundary condition.

Definition at line 42 of file pBCData.h.

Referenced by loading::ParticleFLoading::needToComputeDof(), loading::ParticleULoading::needToComputeDof(), and printStr().

◆ d_pList

◆ d_pNotList

std::vector<size_t> inp::PBCData::d_pNotList

◆ d_regionGeomData

util::geometry::GeomData inp::PBCData::d_regionGeomData

Region geometry (if any)

Definition at line 45 of file pBCData.h.

Referenced by loading::ParticleFLoading::needToComputeDof(), loading::ParticleULoading::needToComputeDof(), and printStr().

◆ d_selectionType

std::string inp::PBCData::d_selectionType

Method for applying force e.g.

  • particle: provides global id of particle to which force should be applied
  • wall: provides global id of wall to which force should be applied
  • region: provides area within which all nodes of any particle will get this force

Definition at line 35 of file pBCData.h.

Referenced by loading::ParticleFLoading::needToComputeDof(), loading::ParticleULoading::needToComputeDof(), loading::ParticleFLoading::needToProcessParticle(), loading::ParticleULoading::needToProcessParticle(), and printStr().

◆ d_spatialFnParams

std::vector<double> inp::PBCData::d_spatialFnParams

List of parameters for function wrt spatial coordinate.

Definition at line 92 of file pBCData.h.

Referenced by printStr().

◆ d_spatialFnType

std::string inp::PBCData::d_spatialFnType

Name of the formula of with respect to spatial coordinate.

List of allowed values are:

  • "" (none)
  • constant
  • hat_x
  • hat_y
  • sin
  • rotation

Definition at line 77 of file pBCData.h.

Referenced by printStr().

◆ d_timeFnParams

std::vector<double> inp::PBCData::d_timeFnParams

List of parameters for function wrt time.

Definition at line 89 of file pBCData.h.

Referenced by printStr().

◆ d_timeFnType

std::string inp::PBCData::d_timeFnType

Name of the formula with respect to time.

List of allowed values are:

  • "" (none)
  • constant
  • linear
  • linear_step
  • linear_slow_fast
  • rotation

Definition at line 64 of file pBCData.h.

Referenced by printStr().


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