IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IBTK::LibMeshSystemIBVectors Class Reference

Class LibMeshSystemIBVectors is a convenience class that manages access to libMesh vectors for the same system defined on multiple parts. It extends the base class LibMeshSystemVectors to provide access to vectors ghosted with both the Lagrangian partitioning (i.e., libMesh's computed partitioning, as in the base class) as well as the IB partitioning (i.e., the partitioning based on the distribution of SAMRAI data). More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/LibMeshSystemIBVectors.h>

Inheritance diagram for IBTK::LibMeshSystemIBVectors:
Inheritance graph
[legend]

Public Member Functions

 LibMeshSystemIBVectors (const std::vector< IBTK::FEDataManager * > &fe_data_managers, std::string system_name)
 
 LibMeshSystemIBVectors (const std::vector< IBTK::FEDataManager * > &fe_data_managers, const std::vector< bool > &part_mask, std::string system_name)
 
libMesh::PetscVector< double > & getIBGhosted (const std::string &vec_name, const unsigned int part)
 
std::vector< libMesh::PetscVector< double > * > getIBGhosted (const std::string &vec_name)
 
void reinit () override
 

Protected Member Functions

std::vector< std::unique_ptr< libMesh::PetscVector< double > > > & maybeAddIBGhosted (const std::string &vec_name)
 Add an IB ghosted vector.
 

Protected Attributes

std::vector< IBTK::FEDataManager * > d_fe_data_managers
 Pointers to IBTK::FEDataManager objects. These are needed to get IB ghosted vectors.
 
std::map< std::string, std::vector< std::unique_ptr< libMesh::PetscVector< double > > > > d_ib_ghosted_vectors
 Previously computed IB ghosted vectors.
 

Detailed Description

Class LibMeshSystemIBVectors is a convenience class that manages access to libMesh vectors for the same system defined on multiple parts. It extends the base class LibMeshSystemVectors to provide access to vectors ghosted with both the Lagrangian partitioning (i.e., libMesh's computed partitioning, as in the base class) as well as the IB partitioning (i.e., the partitioning based on the distribution of SAMRAI data).

This class stores information that depends on SAMRAI's parallel partitioning: LibMeshSystemIBVectors::reinit() should be called after regridding to clear this data.

Note
This class is intended for internal use in IBAMR. It is used in IBFEMethod and IBFESurfaceMethod.

Constructor & Destructor Documentation

◆ LibMeshSystemIBVectors() [1/2]

IBTK::LibMeshSystemIBVectors::LibMeshSystemIBVectors ( const std::vector< IBTK::FEDataManager * > &  fe_data_managers,
std::string  system_name 
)

Constructor.

Parameters
[in]fe_data_managersIBTK::FEDataManager objects for each part. These are used to get libMesh vectors with ghost regions corresponding to the Eulerian partitioning.
[in]system_nameName of the libMesh::System whose vectors we are accessing.

◆ LibMeshSystemIBVectors() [2/2]

IBTK::LibMeshSystemIBVectors::LibMeshSystemIBVectors ( const std::vector< IBTK::FEDataManager * > &  fe_data_managers,
const std::vector< bool > &  part_mask,
std::string  system_name 
)

Constructor, taking a mask argument indicating which systems actually exist.

Parameters
[in]fe_data_managersIBTK::FEDataManager objects for each part. These are used to get libMesh vectors with ghost regions corresponding to the Eulerian partitioning.
[in]part_maskA vector indicating on which parts the given system actually exists (for example, only some parts have fluid sources)
[in]system_nameName of the libMesh::System whose vectors we are accessing.

Member Function Documentation

◆ getIBGhosted() [1/2]

std::vector< libMesh::PetscVector< double > * > IBTK::LibMeshSystemIBVectors::getIBGhosted ( const std::string vec_name)

Get, for each part, the IB-ghosted vectors corresponding to the name vec_name These vectors are ghosted with values determined by IBTK::FEDataManager (i.e., based on SAMRAI's parallel partitioning).

Note
These vectors are managed by this object: the ghosted information will not be valid after a regrid.

◆ getIBGhosted() [2/2]

libMesh::PetscVector< double > & IBTK::LibMeshSystemIBVectors::getIBGhosted ( const std::string vec_name,
const unsigned int  part 
)

Get an IB-ghosted vector for a specific part.

Parameters
[in]vec_nameName of the vector.
[in]partPart number.

◆ reinit()

void IBTK::LibMeshSystemIBVectors::reinit ( )
override

Reinitialize the object. This method must be called after the Eulerian data is updated.


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