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

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

#include </home/runner/work/IBAMR/IBAMR/include/ibamr/StaggeredStokesPETScVecUtilities.h>

Methods acting on SAMRAI::hier::PatchLevel and

SAMRAI::hier::Variable objects.

static void copyToPatchLevelVec (Vec &vec, int u_data_idx, int u_dof_index_idx, int p_data_idx, int p_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 u_data_idx, int u_dof_index_idx, int p_data_idx, int p_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 u_data_idx, int p_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 u_data_idx, int p_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 u_dof_index_idx, int p_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 u_dof_index_idx, int p_dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, int &u_ao_offset, int &p_ao_offset)
 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 StaggeredStokesPETScVecUtilities provides utility functions for PETSc Vec objects.

Member Function Documentation

◆ constructDataSynchSchedule()

Pointer< RefineSchedule< NDIM > > IBAMR::StaggeredStokesPETScVecUtilities::constructDataSynchSchedule ( int  u_data_idx,
int  p_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 IBAMR::StaggeredStokesPETScVecUtilities::constructPatchLevelAO ( AO &  ao,
std::vector< int > &  num_dofs_per_proc,
int  u_dof_index_idx,
int  p_dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level,
int &  u_ao_offset,
int &  p_ao_offset 
)
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 IBAMR::StaggeredStokesPETScVecUtilities::constructPatchLevelDOFIndices ( std::vector< int > &  num_dofs_per_proc,
int  u_dof_index_idx,
int  p_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: