IBAMR  IBAMR version 0.19.
List of all members
IBTK::PETScVecUtilities Class Reference

Class PETScVecUtilities provides utility functions for PETSc Vec objects.

#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. More...
 
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. More...
 
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(). More...
 
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...
 
 PETScVecUtilities ()=delete
 Default constructor. More...
 
 PETScVecUtilities (const PETScVecUtilities &from)=delete
 Copy constructor. More...
 
PETScVecUtilitiesoperator= (const PETScVecUtilities &that)=delete
 Assignment operator. More...
 
static void copyToPatchLevelVec_cell (Vec &vec, int data_idx, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Implementation of copyToPatchLevelVec() for cell-centered data. More...
 
static void copyToPatchLevelVec_side (Vec &vec, int data_idx, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Implementation of copyToPatchLevelVec() for side-centered data. More...
 
static void copyFromPatchLevelVec_cell (Vec &vec, int data_idx, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Implementation of copyFromPatchLevelVec() for cell-centered data. More...
 
static void copyFromPatchLevelVec_side (Vec &vec, int data_idx, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Implementation of copyFromPatchLevelVec() for side-centered data. More...
 
static void constructPatchLevelDOFIndices_cell (std::vector< int > &num_dofs_proc, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Implementation of constructPatchLevelDOFIndices() for cell-centered data. More...
 
static void constructPatchLevelDOFIndices_side (std::vector< int > &num_dofs_proc, int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level)
 Implementation of constructPatchLevelDOFIndices() for side-centered data. More...
 
static void constructPatchLevelAO_cell (AO &ao, std::vector< int > &num_dofs_per_proc, const int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, const int ao_offset)
 Implementation of constructPatchLevelAO for cell-centered data. More...
 
static void constructPatchLevelAO_side (AO &ao, std::vector< int > &num_dofs_per_proc, const int dof_index_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, const int ao_offset)
 Implementation of constructPatchLevelAO for side-centered data. More...
 

Constructor & Destructor Documentation

◆ PETScVecUtilities() [1/2]

IBTK::PETScVecUtilities::PETScVecUtilities ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ PETScVecUtilities() [2/2]

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

Member Function Documentation

◆ copyToPatchLevelVec()

static void IBTK::PETScVecUtilities::copyToPatchLevelVec ( Vec &  vec,
int  data_idx,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
static

◆ copyFromPatchLevelVec()

static void IBTK::PETScVecUtilities::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 
)
static

◆ constructDataSynchSchedule()

static SAMRAI::tbox::Pointer<SAMRAI::xfer::RefineSchedule<NDIM> > IBTK::PETScVecUtilities::constructDataSynchSchedule ( int  data_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
static
Note
Synchronization is not required for all data centerings. For cases in which it is not needed, this method will return a nullptr pointer.

◆ constructGhostFillSchedule()

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

◆ constructPatchLevelDOFIndices()

static 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

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.

◆ constructPatchLevelAO()

static 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
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.

◆ operator=()

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

◆ copyToPatchLevelVec_cell()

static void IBTK::PETScVecUtilities::copyToPatchLevelVec_cell ( Vec &  vec,
int  data_idx,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
staticprivate

◆ copyToPatchLevelVec_side()

static void IBTK::PETScVecUtilities::copyToPatchLevelVec_side ( Vec &  vec,
int  data_idx,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
staticprivate

◆ copyFromPatchLevelVec_cell()

static void IBTK::PETScVecUtilities::copyFromPatchLevelVec_cell ( Vec &  vec,
int  data_idx,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
staticprivate

◆ copyFromPatchLevelVec_side()

static void IBTK::PETScVecUtilities::copyFromPatchLevelVec_side ( Vec &  vec,
int  data_idx,
int  dof_index_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > >  patch_level 
)
staticprivate

◆ constructPatchLevelDOFIndices_cell()

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

◆ constructPatchLevelDOFIndices_side()

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

◆ constructPatchLevelAO_cell()

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

◆ constructPatchLevelAO_side()

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

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