Chombo + EB  3.2
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
PetscCompGrid Class Referenceabstract

#include <PetscCompGrid.H>

Inheritance diagram for PetscCompGrid:
Inheritance graph
[legend]

Public Member Functions

virtual ~PetscCompGrid ()
 Destructor. More...
 
 PetscCompGrid (int a_dof)
 Base class constructor. Called by all subclass constructors. More...
 
virtual void define (const ProblemDomain &a_cdomain, Vector< DisjointBoxLayout > &a_grids, Vector< int > &a_refratios, BCHolder a_bc, const RealVect &a_cdx, int a_numLevels=-1, int a_ibase=0)
 
virtual void clean ()
 
Mat getMatrix () const
 
Mat getPMatrix () const
 
void setMatlab (bool b=true)
 
void setRepartition (bool b=true)
 
void setVerbose (int a_v)
 
void setAverageFineSolutionToCoarse (bool b=true)
 
PetscErrorCode createMatrix (int a_makePmat=0)
 
PetscErrorCode putChomboInPetsc (const Vector< LevelData< FArrayBox > * > &rhs, Vec b) const
 
PetscErrorCode putPetscInChombo (Vec b, Vector< LevelData< FArrayBox > * > &rhs) const
 
virtual IntVect getGhostVect () const =0
 
virtual void addExtraCovered (GID_type, int, const DataIndex &, BaseFab< PetscInt > &)
 

Public Attributes

Vector< RefCountedPtr< LevelData< BaseFab< PetscInt > > > > m_GIDs
 
PetscInt m_gid0
 
PetscInt m_nlocrealpatches
 
PetscInt m_patchid0
 
int m_num_extra_nnz
 
PetscBool m_repartition
 

Protected Member Functions

virtual void createOpStencil (IntVect, int, const DataIndex &, StencilTensor &)=0
 
virtual void applyBCs (IntVect, int, const DataIndex &, Box, StencilTensor &)
 
virtual void InterpToFine (IntVect, int, const DataIndex &, StencilTensor &)
 
virtual void InterpToCoarse (IntVect, int, const DataIndex &, StencilTensor &)
 
IntVect getCFStencil (const ProblemDomain &a_cdom, const IntVect a_ivc)
 
PetscErrorCode AddStencilToMat (IntVect, int, const DataIndex &, StencilTensor &, Mat)
 
void NodeDefine (StencilNode &a_node, IntVect a_iv, int a_lev, Real a_val)
 
void setCFCoverMaps (int a_nlev)
 
void setCoverMaps (int a_nlev)
 
PetscErrorCode permuteDataAndMaps (Vector< StencilTensor > &patchStencil)
 

Protected Attributes

Vector< ProblemDomainm_domains
 
Vector< DisjointBoxLayoutm_grids
 
Vector< int > m_refRatios
 
Vector< RealVectm_dxs
 
Vector< RefCountedPtr< LevelData< BaseFab< PetscInt > > > > m_crsSupportGIDs
 
Vector< RefCountedPtr< LevelData< BaseFab< PetscInt > > > > m_fineCoverGIDs
 
Mat m_mat
 
Mat m_Pmat
 
BCHolder m_bc
 
int m_CFStencilRad
 
BaseFab< FourthOrderInterpStencil * > m_FCStencils
 
bool m_writeMatlab
 
bool m_averageFineSolutionToCoarse
 
int m_verbose
 
const int m_dof
 

Private Member Functions

void operator= (const PetscCompGrid &a_input)
 
 PetscCompGrid (const PetscCompGrid &a_input)
 

Private Attributes

PetscInt m_patch_size
 
VecScatter m_from_petscscat
 
Vec m_origvec
 

Detailed Description

This base class organizes the construction of a PETSc matrix, with an AMR hierarchy

Constructor & Destructor Documentation

◆ ~PetscCompGrid()

virtual PetscCompGrid::~PetscCompGrid ( )
virtual

Destructor.

◆ PetscCompGrid() [1/2]

PetscCompGrid::PetscCompGrid ( int  a_dof)
inline

Base class constructor. Called by all subclass constructors.

References clean(), and define().

◆ PetscCompGrid() [2/2]

PetscCompGrid::PetscCompGrid ( const PetscCompGrid a_input)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ define()

virtual void PetscCompGrid::define ( const ProblemDomain a_cdomain,
Vector< DisjointBoxLayout > &  a_grids,
Vector< int > &  a_refratios,
BCHolder  a_bc,
const RealVect a_cdx,
int  a_numLevels = -1,
int  a_ibase = 0 
)
virtual

Referenced by CompBC::CompBC(), and PetscCompGrid().

◆ clean()

virtual void PetscCompGrid::clean ( )
virtual

Reimplemented in PetscCompGridVTO, and PetscCompGridPois.

Referenced by PetscCompGrid().

◆ getMatrix()

Mat PetscCompGrid::getMatrix ( ) const
inline

References m_mat.

◆ getPMatrix()

Mat PetscCompGrid::getPMatrix ( ) const
inline

References m_Pmat.

◆ setMatlab()

void PetscCompGrid::setMatlab ( bool  b = true)
inline

References m_writeMatlab.

◆ setRepartition()

void PetscCompGrid::setRepartition ( bool  b = true)
inline

References m_repartition.

◆ setVerbose()

void PetscCompGrid::setVerbose ( int  a_v)
inline

References m_verbose.

◆ setAverageFineSolutionToCoarse()

void PetscCompGrid::setAverageFineSolutionToCoarse ( bool  b = true)
inline

◆ createMatrix()

PetscErrorCode PetscCompGrid::createMatrix ( int  a_makePmat = 0)

◆ putChomboInPetsc()

PetscErrorCode PetscCompGrid::putChomboInPetsc ( const Vector< LevelData< FArrayBox > * > &  rhs,
Vec  b 
) const

◆ putPetscInChombo()

PetscErrorCode PetscCompGrid::putPetscInChombo ( Vec  b,
Vector< LevelData< FArrayBox > * > &  rhs 
) const

◆ getGhostVect()

virtual IntVect PetscCompGrid::getGhostVect ( ) const
pure virtual

◆ addExtraCovered()

virtual void PetscCompGrid::addExtraCovered ( GID_type  ,
int  ,
const DataIndex ,
BaseFab< PetscInt > &   
)
inlinevirtual

◆ createOpStencil()

virtual void PetscCompGrid::createOpStencil ( IntVect  ,
int  ,
const DataIndex ,
StencilTensor  
)
protectedpure virtual

Implemented in PetscCompGridVTO, and PetscCompGridPois.

Referenced by addExtraCovered().

◆ applyBCs()

virtual void PetscCompGrid::applyBCs ( IntVect  ,
int  ,
const DataIndex ,
Box  ,
StencilTensor  
)
protectedvirtual

Reimplemented in PetscCompGridVTO.

Referenced by addExtraCovered().

◆ InterpToFine()

virtual void PetscCompGrid::InterpToFine ( IntVect  ,
int  ,
const DataIndex ,
StencilTensor  
)
protectedvirtual

Referenced by addExtraCovered().

◆ InterpToCoarse()

virtual void PetscCompGrid::InterpToCoarse ( IntVect  ,
int  ,
const DataIndex ,
StencilTensor  
)
protectedvirtual

Referenced by addExtraCovered().

◆ getCFStencil()

IntVect PetscCompGrid::getCFStencil ( const ProblemDomain a_cdom,
const IntVect  a_ivc 
)
protected

Referenced by addExtraCovered().

◆ AddStencilToMat()

PetscErrorCode PetscCompGrid::AddStencilToMat ( IntVect  ,
int  ,
const DataIndex ,
StencilTensor ,
Mat   
)
protected

Referenced by addExtraCovered().

◆ NodeDefine()

void PetscCompGrid::NodeDefine ( StencilNode a_node,
IntVect  a_iv,
int  a_lev,
Real  a_val 
)
inlineprotected

◆ setCFCoverMaps()

void PetscCompGrid::setCFCoverMaps ( int  a_nlev)
protected

Referenced by NodeDefine().

◆ setCoverMaps()

void PetscCompGrid::setCoverMaps ( int  a_nlev)
protected

Referenced by NodeDefine().

◆ permuteDataAndMaps()

PetscErrorCode PetscCompGrid::permuteDataAndMaps ( Vector< StencilTensor > &  patchStencil)
protected

Referenced by NodeDefine().

◆ operator=()

void PetscCompGrid::operator= ( const PetscCompGrid a_input)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ m_domains

Vector<ProblemDomain> PetscCompGrid::m_domains
protected

◆ m_grids

Vector<DisjointBoxLayout> PetscCompGrid::m_grids
protected

◆ m_refRatios

Vector<int> PetscCompGrid::m_refRatios
protected

◆ m_dxs

Vector<RealVect> PetscCompGrid::m_dxs
protected

◆ m_GIDs

Vector<RefCountedPtr<LevelData<BaseFab<PetscInt> > > > PetscCompGrid::m_GIDs

◆ m_crsSupportGIDs

Vector<RefCountedPtr<LevelData<BaseFab<PetscInt> > > > PetscCompGrid::m_crsSupportGIDs
protected

◆ m_fineCoverGIDs

Vector<RefCountedPtr<LevelData<BaseFab<PetscInt> > > > PetscCompGrid::m_fineCoverGIDs
protected

◆ m_gid0

PetscInt PetscCompGrid::m_gid0

◆ m_nlocrealpatches

PetscInt PetscCompGrid::m_nlocrealpatches

◆ m_patchid0

PetscInt PetscCompGrid::m_patchid0

◆ m_mat

Mat PetscCompGrid::m_mat
protected

Referenced by getMatrix().

◆ m_Pmat

Mat PetscCompGrid::m_Pmat
protected

Referenced by getPMatrix().

◆ m_bc

BCHolder PetscCompGrid::m_bc
protected

◆ m_CFStencilRad

int PetscCompGrid::m_CFStencilRad
protected

◆ m_FCStencils

BaseFab<FourthOrderInterpStencil*> PetscCompGrid::m_FCStencils
protected

◆ m_writeMatlab

bool PetscCompGrid::m_writeMatlab
protected

Referenced by setMatlab().

◆ m_averageFineSolutionToCoarse

bool PetscCompGrid::m_averageFineSolutionToCoarse
protected

◆ m_verbose

int PetscCompGrid::m_verbose
protected

Referenced by setVerbose().

◆ m_dof

const int PetscCompGrid::m_dof
protected

◆ m_num_extra_nnz

int PetscCompGrid::m_num_extra_nnz

◆ m_repartition

PetscBool PetscCompGrid::m_repartition

Referenced by setRepartition().

◆ m_patch_size

PetscInt PetscCompGrid::m_patch_size
private

◆ m_from_petscscat

VecScatter PetscCompGrid::m_from_petscscat
private

◆ m_origvec

Vec PetscCompGrid::m_origvec
private

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