IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
List of all members
IBTK::PETScVecUtilities Class Reference

Class PETScVecUtilities provides utility functions for PETSc Vec objects. More...

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

Methods acting on SAMRAI::hier::PatchLevel and

SAMRAI::hier::Variable objects.

static void copyToPatchLevelVec (Vec &vec, int data_idx, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Copy data to a parallel PETSc Vec on the provided SAMRAI::hier::PatchLevel.
 
static void copyFromPatchLevelVec (Vec &vec, int data_idx, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > data_synch_sched, SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > ghost_fill_sched)
 Copy data from a parallel PETSc Vec on the provided SAMRAI::hier::PatchLevel.
 
static SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > constructDataSynchSchedule (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Construct a RefineSchedule to synchronize shared values that can be used in conjunction with copyFromPatchLevelVec(). More...
 
static SAMRAI::tbox::Pointer< SAMRAI::xfer::RefineSchedule< NDIM > > constructGhostFillSchedule (int data_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Construct a RefineSchedule to fill ghost cell values that can be used in conjunction with copyFromPatchLevelVec().
 
static void constructPatchLevelDOFIndices (std::vector< int > &num_dofs_per_proc, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Assign a DOF index to each unique degree of freedom on a SAMRAI::hier::PatchLevel. More...
 
static void constructPatchLevelAO (AO &ao, std::vector< int > &num_dofs_per_proc, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, const int ao_offset=0)
 Create an application ordering object (AO) that creates a mapping between global PETSc indices and mapping of SAMRAI data indices for patch data index dof_index_idx to a nonnegative integer $ (i,j,k,d):-> p $ on a SAMRAI::hier::PatchLevel. More...
 

Detailed Description

Class PETScVecUtilities provides utility functions for PETSc Vec objects.

Member Function Documentation

◆ constructDataSynchSchedule()

Pointer< RefineSchedule< NDIM > > IBTK::PETScVecUtilities::constructDataSynchSchedule ( int  data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
static

Construct a RefineSchedule to synchronize shared values that can be used in conjunction with copyFromPatchLevelVec().

Note
Synchronization is not required for all data centerings. For cases in which it is not needed, this method will return a NULL pointer.

◆ constructPatchLevelAO()

void IBTK::PETScVecUtilities::constructPatchLevelAO ( AO &  ao,
std::vector< int > &  num_dofs_per_proc,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level,
const int  ao_offset = 0 
)
static

Create an application ordering object (AO) that creates a mapping between global PETSc indices and mapping of SAMRAI data indices for patch data index dof_index_idx to a nonnegative integer $ (i,j,k,d):-> p $ on a SAMRAI::hier::PatchLevel.

See also
IndexUtilities::mapIndexToInteger() for details on the integer mapping of SAMRAI data indices.
Parameters
ao_offsetAn integer offset used for integer mapping of SAMRAI data indices.

◆ constructPatchLevelDOFIndices()

void IBTK::PETScVecUtilities::constructPatchLevelDOFIndices ( std::vector< int > &  num_dofs_per_proc,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
static

Assign a DOF index to each unique degree of freedom on a SAMRAI::hier::PatchLevel.

The DOF indices generated by this method are compatible with the parallel PETSc Vec objects generated by constructPatchLevelVec().

Note
DOF indices are not assigned to ghost cell values by this method.

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