Karamelo  714599e9
Parallel Material Point Method Simulator
Domain Class Reference

Detailed Description

Stores the dimension and geometrical aspects of the simulation box.

Stores the simulation dimensions (i.e. 1D, 2D or 3D), the simulation box geometry, the list of the user defined geometric regions and solids, as well as the background grid if updated Lagrangian is used.

+ Inheritance diagram for Domain:

Public Member Functions

void add_region (vector< string >)
 Create a new region. More...
 
void add_solid (vector< string >)
 Create a new solid. More...
 
void create_domain (vector< string >)
 Deprecated function.
 
 Domain (class MPM *)
 Creator. More...
 
int find_region (string)
 Finds the ID of a region. More...
 
int find_solid (string)
 Finds the ID of a solid. More...
 
int inside (Eigen::Vector3d)
 
bool inside_subdomain (double, double, double)
 Checks if the set of coordinates lies in the simulation domain. More...
 
bool inside_subdomain_extended (double, double, double, double)
 Checks if the set of coordinates lies in this proc sub-domain. More...
 
void set_axisymmetric (vector< string >)
 Called when user calls axisymmetric() More...
 
void set_dimension (vector< string >)
 Called when user calls dimension() More...
 
void set_local_box ()
 Determine the boundaries of this proc subdomain. More...
 
virtual ~Domain ()
 Destructor. More...
 

Public Attributes

bool axisymmetric
 true if axisymmetric, false otherwise
 
double boxhi [3]
 Higher orthogonal box global bounds.
 
double boxlo [3]
 Lower orthogonal box global bounds.
 
bool created
 has the domain been created?
 
int dimension
 1 == 1D, 2 == 2d, 3 == 3d
 
class Gridgrid
 pointer to the common background grid (if using Updated Lagrangian)
 
tagint np_total
 total number of particles
 
RegionCreatorMap * region_map
 Map of all the known region types.
 
vector< class Region * > regions
 list of defined Regions
 
vector< class Solid * > solids
 list of defined Solids
 
double subhi [3]
 Higher sub-box bounds on this proc.
 
double sublo [3]
 Lower sub-box bounds on this proc.
 

Constructor & Destructor Documentation

◆ Domain()

Domain::Domain ( class MPM mpm)

Creator.

Initializes variables and generates the map of known region types (at compile time).

◆ ~Domain()

Domain::~Domain ( )
virtual

Destructor.

Destroys the lists of regions and solids (Domain::regions, Domain::solids) as well as the map of known region types.

Member Function Documentation

◆ add_region()

void Domain::add_region ( vector< string >  args)

Create a new region.

This function is the C++ equivalent to the region() user function.
Syntax: region(name, type, type specific arguments)
This function checks if the region name was already used.
If not, it creates an entry in the vector Domain::regions and calls Region::Region()

◆ add_solid()

void Domain::add_solid ( vector< string >  args)

Create a new solid.

This function is the C++ equivalent to the solid() user function.
This function checks if the solid name was already used.
If not, it creates an entry in the vector Domain::solids.

◆ find_region()

int Domain::find_region ( string  name)

Finds the ID of a region.

This function checks if 'name' is already used for a region.
If a region named 'name' exists, it returns its ID. It returns -1 otherwise.

◆ find_solid()

int Domain::find_solid ( string  name)

Finds the ID of a solid.

This function checks if 'name' is already used for a solid.
If a solid named 'name' exists, it returns its ID. It returns -1 otherwise.

◆ inside()

int Domain::inside ( Eigen::Vector3d  x)

inside = 1 if x,y,z is inside or on the boundary of the simulation domain. inside = 0 if x,y,z is outside and not on boundary of the simulation domain.

◆ inside_subdomain()

bool Domain::inside_subdomain ( double  x,
double  y,
double  z 
)

Checks if the set of coordinates lies in the simulation domain.

inside = 1 if x,y,z is inside or on the boundary of this proc domain. inside = 0 if x,y,z is outside and not on boundary of this proc domain.

◆ inside_subdomain_extended()

bool Domain::inside_subdomain_extended ( double  x,
double  y,
double  z,
double  h 
)

Checks if the set of coordinates lies in this proc sub-domain.

inside = 1 if x,y,z is inside or on the boundary of this proc domain, extended by h. inside = 0 if x,y,z is outside and not on boundary of this proc domain, extended by h.

◆ set_axisymmetric()

void Domain::set_axisymmetric ( vector< string >  args)

Called when user calls axisymmetric()

This function is the C++ equivalent to the axisymmetric() user function.
Syntax: axisymmetric(true) or axisymmetric(false)
Sets Domain::axisymmetric to true or false. Note that this variable is initialized as false.

◆ set_dimension()

void Domain::set_dimension ( vector< string >  args)

Called when user calls dimension()

This function is the C++ equivalent to the dimension() user function.
Syntax: dimension(N, xmin, xmax, ymin, ymax, zmin, zmax, h) N: 1 for 1D, 2 for 2D, 3 for 3D.n xmin, xmax: domain boundaries in x.
ymin, ymax: domain boundaries in y – Optional when N == 1.
zmin, zmax: domain boundaries in z – Optional when N == 2.
h: background grid cell size. Not optional if using Total Lagrangian, but value not used.

◆ set_local_box()

void Domain::set_local_box ( )

Determine the boundaries of this proc subdomain.

The boundaries of the domain attributed to this proc are stored in Domain::sublo and Domain::subhi variables.


The documentation for this class was generated from the following files: