IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IBAMR::IMPInitializer Class Reference

Class IMPInitializer is a concrete LInitStrategy that initializes the configuration of one or more Lagrangian structures that are described using the immersed material point method from FE meshes.

#include <ibamr/IMPInitializer.h>

Inheritance diagram for IBAMR::IMPInitializer:
Inheritance graph
[legend]

Public Member Functions

 IMPInitializer (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg)
 Constructor. More...
 
 ~IMPInitializer ()
 Destructor. More...
 
void registerMesh (libMesh::MeshBase *mesh, int level_number=IBTK::invalid_level_number)
 Register a Mesh object with the IB initializer object. More...
 
void registerLSiloDataWriter (SAMRAI::tbox::Pointer< IBTK::LSiloDataWriter > silo_writer)
 Register a Silo data writer with the IB initializer object. More...
 
bool getLevelHasLagrangianData (int level_number, bool can_be_refined) const override
 Determine whether there are any Lagrangian nodes on the specified patch level. More...
 
bool getIsAllLagrangianDataInDomain (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy) const override
 
unsigned int computeGlobalNodeCountOnPatchLevel (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time) override
 
unsigned int computeLocalNodeCountOnPatchLevel (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time) override
 Determine the number of local nodes on the specified patch level. More...
 
void initializeStructureIndexingOnPatchLevel (std::map< int, std::string > &strct_id_to_strct_name_map, std::map< int, std::pair< int, int > > &strct_id_to_lag_idx_range_map, int level_number, double init_data_time, bool can_be_refined, bool initial_time, IBTK::LDataManager *l_data_manager) override
 Initialize the structure indexing information on the patch level. More...
 
unsigned int initializeDataOnPatchLevel (int lag_node_index_idx, unsigned int global_index_offset, unsigned int local_index_offset, SAMRAI::tbox::Pointer< IBTK::LData > X_data, SAMRAI::tbox::Pointer< IBTK::LData > U_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time, IBTK::LDataManager *l_data_manager) override
 Initialize the LNode and LData data needed to specify the configuration of the curvilinear mesh on the patch level. More...
 
void tagCellsForInitialRefinement (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double error_data_time, int tag_index) override
 Tag cells for initial refinement. More...
 
void writeVertexFile (std::string filename, int mesh_no, int level_number=IBTK::invalid_level_number)
 Write vertex position in a file. More...
 
virtual void init ()
 Initialize structure specific configurations. More...
 
virtual unsigned int initializeMassDataOnPatchLevel (unsigned int global_index_offset, unsigned int local_index_offset, SAMRAI::tbox::Pointer< LData > M_data, SAMRAI::tbox::Pointer< LData > K_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time, LDataManager *l_data_manager)
 Initialize the LData needed to specify the mass and spring constant data required by the penalty IB method. More...
 
virtual unsigned int initializeDirectorDataOnPatchLevel (unsigned int global_index_offset, unsigned int local_index_offset, SAMRAI::tbox::Pointer< LData > D_data, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, int level_number, double init_data_time, bool can_be_refined, bool initial_time, LDataManager *l_data_manager)
 Initialize the LData needed to specify director vectors required by some material models. More...
 

Private Member Functions

 IMPInitializer ()=delete
 Default constructor. More...
 
 IMPInitializer (const IMPInitializer &from)=delete
 Copy constructor. More...
 
IMPInitializeroperator= (const IMPInitializer &that)=delete
 Assignment operator. More...
 
void initializeLSiloDataWriter (int level_number)
 Configure the Lagrangian Silo data writer to plot the data associated with the specified level of the locally refined Cartesian grid. More...
 
void getPatchVertices (std::vector< std::pair< int, int > > &point_indices, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM > > patch, int level_number, bool can_be_refined) const
 Determine the indices of any vertices initially located within the specified patch. More...
 
int getCanonicalLagrangianIndex (const std::pair< int, int > &point_index, int level_number) const
 
const libMesh::Point & getVertexPosn (const std::pair< int, int > &point_index, int level_number) const
 
void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db)
 

Private Attributes

std::string d_object_name
 
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > d_hierarchy
 
SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > d_gridding_alg
 
std::vector< boold_level_is_initialized
 
std::vector< std::vector< libMesh::MeshBase * > > d_meshes
 
std::vector< std::vector< int > > d_num_vertex
 
std::vector< std::vector< int > > d_vertex_offset
 
std::vector< std::vector< std::vector< libMesh::Point > > > d_vertex_posn
 
std::vector< std::vector< std::vector< double > > > d_vertex_wgt
 
std::vector< std::vector< std::vector< libMesh::subdomain_id_type > > > d_vertex_subdomain_id
 
SAMRAI::tbox::Pointer< IBTK::LSiloDataWriterd_silo_writer
 

Constructor & Destructor Documentation

◆ IMPInitializer() [1/3]

IBAMR::IMPInitializer::IMPInitializer ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > >  gridding_alg 
)

◆ ~IMPInitializer()

IBAMR::IMPInitializer::~IMPInitializer ( )

◆ IMPInitializer() [2/3]

IBAMR::IMPInitializer::IMPInitializer ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ IMPInitializer() [3/3]

IBAMR::IMPInitializer::IMPInitializer ( const IMPInitializer from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ registerMesh()

void IBAMR::IMPInitializer::registerMesh ( libMesh::MeshBase *  mesh,
int  level_number = IBTK::invalid_level_number 
)

◆ registerLSiloDataWriter()

void IBAMR::IMPInitializer::registerLSiloDataWriter ( SAMRAI::tbox::Pointer< IBTK::LSiloDataWriter silo_writer)

◆ getLevelHasLagrangianData()

bool IBAMR::IMPInitializer::getLevelHasLagrangianData ( int  level_number,
bool  can_be_refined 
) const
overridevirtual
Returns
A boolean value indicating whether Lagrangian data is associated with the given level in the patch hierarchy.

Implements IBTK::LInitStrategy.

◆ getIsAllLagrangianDataInDomain()

bool IBAMR::IMPInitializer::getIsAllLagrangianDataInDomain ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy) const
overridevirtual
Returns
A boolean value indicating whether or not all Lagrangian data is within the computational domain specified by the patch hierarchy.

Implements IBTK::LInitStrategy.

◆ computeGlobalNodeCountOnPatchLevel()

unsigned int IBAMR::IMPInitializer::computeGlobalNodeCountOnPatchLevel ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time 
)
overridevirtual
Returns
Determine the number of global nodes on the patch level.
The number of global nodes on the specified level.

Implements IBTK::LInitStrategy.

◆ computeLocalNodeCountOnPatchLevel()

unsigned int IBAMR::IMPInitializer::computeLocalNodeCountOnPatchLevel ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time 
)
overridevirtual
Returns
The number of local nodes on the specified level.

Implements IBTK::LInitStrategy.

◆ initializeStructureIndexingOnPatchLevel()

void IBAMR::IMPInitializer::initializeStructureIndexingOnPatchLevel ( std::map< int, std::string > &  strct_id_to_strct_name_map,
std::map< int, std::pair< int, int > > &  strct_id_to_lag_idx_range_map,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time,
IBTK::LDataManager l_data_manager 
)
overridevirtual

Reimplemented from IBTK::LInitStrategy.

◆ initializeDataOnPatchLevel()

unsigned int IBAMR::IMPInitializer::initializeDataOnPatchLevel ( int  lag_node_index_idx,
unsigned int  global_index_offset,
unsigned int  local_index_offset,
SAMRAI::tbox::Pointer< IBTK::LData X_data,
SAMRAI::tbox::Pointer< IBTK::LData U_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time,
IBTK::LDataManager l_data_manager 
)
overridevirtual
Returns
The number of local nodes initialized on the patch level.

Implements IBTK::LInitStrategy.

◆ tagCellsForInitialRefinement()

void IBAMR::IMPInitializer::tagCellsForInitialRefinement ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  error_data_time,
int  tag_index 
)
overridevirtual

When the patch hierarchy is being constructed at the initial simulation time, it is necessary to instruct the gridding algorithm where to place local refinement in order to accommodate portions of the curvilinear mesh that will reside in any yet-to-be-constructed level(s) of the patch hierarchy.

Reimplemented from IBTK::LInitStrategy.

◆ writeVertexFile()

void IBAMR::IMPInitializer::writeVertexFile ( std::string  filename,
int  mesh_no,
int  level_number = IBTK::invalid_level_number 
)
Parameters
filenameName of the file to which position of the vertices is to be written.
mesh_noIntegral order in which various meshes are registered with the class on level level_number. Indexing starts from 0.
level_numberLevel on which the mesh resides. -1 indicates finest grid level.

◆ operator=()

IMPInitializer& IBAMR::IMPInitializer::operator= ( const IMPInitializer that)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ initializeLSiloDataWriter()

void IBAMR::IMPInitializer::initializeLSiloDataWriter ( int  level_number)
private

◆ getPatchVertices()

void IBAMR::IMPInitializer::getPatchVertices ( std::vector< std::pair< int, int > > &  point_indices,
SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM > >  patch,
int  level_number,
bool  can_be_refined 
) const
private

◆ getCanonicalLagrangianIndex()

int IBAMR::IMPInitializer::getCanonicalLagrangianIndex ( const std::pair< int, int > &  point_index,
int  level_number 
) const
private
Returns
The canonical Lagrangian index of the specified vertex.

◆ getVertexPosn()

const libMesh::Point& IBAMR::IMPInitializer::getVertexPosn ( const std::pair< int, int > &  point_index,
int  level_number 
) const
private
Returns
The initial position of the specified vertex.

◆ getFromInput()

void IBAMR::IMPInitializer::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
private

Read input values, indicated above, from given database.

When assertion checking is active, the database pointer must be non-null.

◆ init()

virtual void IBTK::LInitStrategy::init ( )
inlinevirtualinherited
Note
A default empty implementation is provided.

Reimplemented in IBAMR::IBRedundantInitializer, and IBAMR::IBStandardInitializer.

◆ initializeMassDataOnPatchLevel()

virtual unsigned int IBTK::LInitStrategy::initializeMassDataOnPatchLevel ( unsigned int  global_index_offset,
unsigned int  local_index_offset,
SAMRAI::tbox::Pointer< LData M_data,
SAMRAI::tbox::Pointer< LData K_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time,
LDataManager l_data_manager 
)
virtualinherited
Returns
The number of local nodes initialized on the patch level.
Note
A default empty implementation is provided when support for massive boundaries is not required.

Reimplemented in IBAMR::IBRedundantInitializer.

◆ initializeDirectorDataOnPatchLevel()

virtual unsigned int IBTK::LInitStrategy::initializeDirectorDataOnPatchLevel ( unsigned int  global_index_offset,
unsigned int  local_index_offset,
SAMRAI::tbox::Pointer< LData D_data,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
int  level_number,
double  init_data_time,
bool  can_be_refined,
bool  initial_time,
LDataManager l_data_manager 
)
virtualinherited
Returns
The number of local nodes initialized on the patch level.
Note
A default empty implementation is provided when support for directors is not required.

Reimplemented in IBAMR::IBRedundantInitializer.

Member Data Documentation

◆ d_object_name

std::string IBAMR::IMPInitializer::d_object_name
private

◆ d_hierarchy

SAMRAI::tbox::Pointer<SAMRAI::hier::PatchHierarchy<NDIM> > IBAMR::IMPInitializer::d_hierarchy
private

◆ d_gridding_alg

SAMRAI::tbox::Pointer<SAMRAI::mesh::GriddingAlgorithm<NDIM> > IBAMR::IMPInitializer::d_gridding_alg
private

◆ d_level_is_initialized

std::vector<bool> IBAMR::IMPInitializer::d_level_is_initialized
private

◆ d_meshes

std::vector<std::vector<libMesh::MeshBase*> > IBAMR::IMPInitializer::d_meshes
private

◆ d_num_vertex

std::vector<std::vector<int> > IBAMR::IMPInitializer::d_num_vertex
private

◆ d_vertex_offset

std::vector<std::vector<int> > IBAMR::IMPInitializer::d_vertex_offset
private

◆ d_vertex_posn

std::vector<std::vector<std::vector<libMesh::Point> > > IBAMR::IMPInitializer::d_vertex_posn
private

◆ d_vertex_wgt

std::vector<std::vector<std::vector<double> > > IBAMR::IMPInitializer::d_vertex_wgt
private

◆ d_vertex_subdomain_id

std::vector<std::vector<std::vector<libMesh::subdomain_id_type> > > IBAMR::IMPInitializer::d_vertex_subdomain_id
private

◆ d_silo_writer

SAMRAI::tbox::Pointer<IBTK::LSiloDataWriter> IBAMR::IMPInitializer::d_silo_writer
private

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