Karamelo  714599e9
Parallel Material Point Method Simulator
Grid Class Reference

Detailed Description

This class holds all the variables and independent functions related the background grid(s).

This class does not have as members functions related to the Particle to Grid (P2G) and Grid to Particle (G2P) steps of the MPM algorithm. This is due to the necessity to access the mass, velocity, body forces and stresses of particles held in the Solid class. Instead, these functions are members of the Solid Class since this class stores a pointer to the grid it uses. Either a local grid, as used in the Total Lagrangian MPM, or the global grid, as used in the Updated Lagrangian MPM. This class has Pointers as parent in order to be accessible from anywhere within the MPM class.

+ Inheritance diagram for Grid:

Public Member Functions

void grow (int)
 Allocate memory for the vectors used for local nodes or resize them.
 
void grow_ghosts (int)
 Allocate memory for the vectors used for ghost nodes or resize them.
 
void init (double *, double *)
 Create the array of nodes. Give them their position, tag, and type.
 
void reduce_ghost_nodes (bool only_v=false)
 Reduce the force and velocities of all the ghost nodes from that computed on each CPU. If only_v is true, it reduces only the velocities.
 
void reduce_mass_ghost_nodes ()
 Reduce the mass of all the ghost nodes from that computed on each CPU.
 
void reduce_regularized_variables ()
 Reduce the pressure interpolated at the grid nodes.
 
void update_grid_positions ()
 Determine the new position of the grid nodes.
 
void update_grid_velocities ()
 Determine the temporary grid velocities \(\tilde{v}_{n}\).
 

Public Attributes

double cellsize
 size of the square cells forming the grid
 
map< int, vector< tagint > > dest_nshared
 for each CPU, list the tags of shared nodes
 
vector< Eigen::Vector3d > f
 nodes' internal forces
 
map< int, int > map_ntag
 map_ntag[ntag[i]] = i;
 
vector< int > mask
 nodes' group mask
 
vector< double > mass
 nodes' current mass
 
vector< Eigen::Vector3d > mb
 nodes' external forces times the mass
 
int ncells
 number of cells
 
bigint nnodes
 total number of nodes in the domain
 
bigint nnodes_ghost
 number of ghost nodes (in this CPU)
 
bigint nnodes_local
 number of nodes (in this CPU)
 
vector< int > nowner
 which CPU owns each node (universe->me for local nodes, other CPU for ghost nodes
 
int nshared
 number of nodes that are shared (ghosts in other CPUs)
 
vector< tagint > ntag
 unique identifier for nodes in the system.
 
vector< array< int, 3 > > ntype
 node type in x, y, and z directions (False for an edge, True otherwise)
 
int nx
 number of nodes along x on this CPU
 
int nx_global
 number of nodes along x on all CPUs
 
int ny
 number of nodes along y on this CPU
 
int ny_global
 number of nodes along y on all CPUs
 
int nz
 number of nodes along z on this CPU
 
int nz_global
 number of nodes along z on all CPUs
 
map< int, vector< tagint > > origin_nshared
 for each CPU, list the tags of ghost nodes
 
MPI_Datatype Pointtype
 MPI type for struct Point.
 
vector< bool > rigid
 are the nodes in the area of influence of a rigid body?
 
vector< tagint > shared
 tag of all shared nodes
 
vector< Eigen::Vector3d > v
 nodes' velocity at time t
 
vector< Eigen::Vector3d > v_update
 nodes' velocity at time t+dt
 
vector< Eigen::Vector3d > x
 nodes' current position
 
vector< Eigen::Vector3d > x0
 nodes' position in the reference coordinate system
 

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