chombo-discharge
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EBAMRSurfaceDeposition Class Reference

class for handling surface deposition of particles with EB and AMR. More...

#include <CD_EBAMRSurfaceDeposition.H>

Collaboration diagram for EBAMRSurfaceDeposition:
Collaboration graph
[legend]

Public Member Functions

 EBAMRSurfaceDeposition () noexcept
 Default constructor. Leaves the object in undefined state and requires the user to call the define function.
 
 EBAMRSurfaceDeposition (const Vector< RefCountedPtr< EBLevelGrid >> &a_ebGrids, const Vector< RefCountedPtr< EBLevelGrid >> &a_ebGridsCoarsenedFine, const Vector< RefCountedPtr< EBLevelGrid >> &a_ebGridsRefinedCoar, const Vector< int > &a_refRat, const Vector< Real > &a_dx, const RealVect &a_probLo, const int a_finestLevel, const int a_radius) noexcept
 Full constructor. Calls the define function. More...
 
virtual ~EBAMRSurfaceDeposition () noexcept
 Destructor.
 
virtual void define (const Vector< RefCountedPtr< EBLevelGrid >> &a_ebGrids, const Vector< RefCountedPtr< EBLevelGrid >> &a_ebGridsCoarsenedFine, const Vector< RefCountedPtr< EBLevelGrid >> &a_ebGridsRefinedCoar, const Vector< int > &a_refRat, const Vector< Real > &a_dx, const RealVect &a_probLo, const int a_finestLevel, const int a_radius) noexcept
 Define function. Puts objects in usable state. More...
 
template<class P , const Real &(P::*)() const particleScalarField>
void deposit (EBAMRIVData &a_meshData, const ParticleContainer< P > &a_particles) const noexcept
 Deposit function. Deposits particle on surface. More...
 
template<class P , Real(P::*)() particleScalarField>
void deposit (EBAMRIVData &a_meshData, const ParticleContainer< P > &a_particles) const noexcept
 Deposit function. Deposits particle on surface. More...
 

Protected Member Functions

virtual void defineBuffers () noexcept
 Define buffer data.
 
virtual void defineDataMotion () noexcept
 Define copiers.
 
virtual void defineDepositionStencils () noexcept
 Define deposition weights.
 
virtual void defineCoarseToFineStencils () noexcept
 Define stencils for interpolating coarse-grid data to the fine grid.
 
virtual void defineFineToCoarseStencils () noexcept
 Define stencils for coarsening data in fine-grid ghost cells to the coarse grid.
 
virtual void addInvalidCoarseDataToFineData () const noexcept
 Add the invalid coarse data (i.e., underneath the fine grid) to the fine level. More...
 
virtual void addFineGhostDataToValidCoarData () const noexcept
 Add the ghosted fine-level data to the coarse data. More...
 

Protected Attributes

bool m_debug
 Debug or not.
 
bool m_isDefined
 Is defined or not.
 
bool m_verbose
 Turn on/off chattiness.
 
RealVect m_probLo
 Lower-left corner of computational domain.
 
int m_finestLevel
 Finest grid level.
 
int m_radius
 Deposition radius.
 
Vector< RefCountedPtr< EBLevelGrid > > m_ebGrids
 Grids on each level.
 
Vector< RefCountedPtr< EBLevelGrid > > m_ebGridsCoarsenedFine
 Coarsened grids. More...
 
Vector< RefCountedPtr< EBLevelGrid > > m_ebGridsRefinedCoar
 Refined grids. More...
 
Vector< int > m_refRat
 Refinement ratios between levels.
 
Vector< Real > m_dx
 Grid resolutions.
 
Vector< RefCountedPtr< LayoutData< BaseIVFAB< VoFStencil > > > > m_depositionStencils
 Deposition weights for each irregular cell. This contains 1.0/sum(alpha * dx^(D-1)) and the cells.
 
Vector< RefCountedPtr< LayoutData< BaseIVFAB< VoFStencil > > > > m_coarseToFineStencils
 Stencils for interpolating coarse-grid data to the fine grid. More...
 
Vector< RefCountedPtr< LayoutData< BaseIVFAB< VoFStencil > > > > m_fineToCoarseStencils
 Stencils for conservatively coarsening fine-grid data (in ghost cells) to the coarse grid. More...
 
EBAMRIVData m_data
 Data on each level. More...
 
EBAMRIVData m_refinedCoarData
 Data defined on a refinement of the coarse grid.
 
EBAMRIVData m_coarsenedFineData
 Coarsening of the fine-grid data.
 
Vector< Copier > m_validToValidCopiers
 Valid to valid copiers.
 
Vector< Copier > m_copierLevel
 Level copier for adding data from valid+ghost -> valid. More...
 
Vector< Copier > m_copierRefinedCoarToFineNoGhosts
 Copier for copying data from the refined coarse level to the fine level.
 
Vector< Copier > m_copierCoarsenedFineToCoar
 Copier for copying data from the coarsened fine level to the coarse level.
 

Detailed Description

class for handling surface deposition of particles with EB and AMR.

Constructor & Destructor Documentation

◆ EBAMRSurfaceDeposition()

EBAMRSurfaceDeposition::EBAMRSurfaceDeposition ( const Vector< RefCountedPtr< EBLevelGrid >> &  a_ebGrids,
const Vector< RefCountedPtr< EBLevelGrid >> &  a_ebGridsCoarsenedFine,
const Vector< RefCountedPtr< EBLevelGrid >> &  a_ebGridsRefinedCoar,
const Vector< int > &  a_refRat,
const Vector< Real > &  a_dx,
const RealVect &  a_probLo,
const int  a_finestLevel,
const int  a_radius 
)
noexcept

Full constructor. Calls the define function.

Parameters
[in]a_ebGridsGrids
[in]a_ebGridsCoarsenedFineCoarsened fine grids
[in]a_ebGridsRefinedCoarRefined coarse grids
[in]a_refRatRefinement factory between levels
[in]a_dxGrid resolutions. @πaram[in] a_probLo Lower-left corner of physical domain.
[in]a_finestLevelFinest grid level.
[in]a_radiusDeposition radius

Member Function Documentation

◆ addFineGhostDataToValidCoarData()

void EBAMRSurfaceDeposition::addFineGhostDataToValidCoarData ( ) const
protectedvirtualnoexcept

Add the ghosted fine-level data to the coarse data.

This does conservative coarsening of the fine-grid ghosted data to the coarse grid. This all takes place on our buffer storage.

◆ addInvalidCoarseDataToFineData()

void EBAMRSurfaceDeposition::addInvalidCoarseDataToFineData ( ) const
protectedvirtualnoexcept

Add the invalid coarse data (i.e., underneath the fine grid) to the fine level.

This does conservative interpolation to the fine grid. This all takes place on our buffer storage.

Parameters
[in,out]a_meshDataEB surface data

◆ define()

void EBAMRSurfaceDeposition::define ( const Vector< RefCountedPtr< EBLevelGrid >> &  a_ebGrids,
const Vector< RefCountedPtr< EBLevelGrid >> &  a_ebGridsCoarsenedFine,
const Vector< RefCountedPtr< EBLevelGrid >> &  a_ebGridsRefinedCoar,
const Vector< int > &  a_refRat,
const Vector< Real > &  a_dx,
const RealVect &  a_probLo,
const int  a_finestLevel,
const int  a_radius 
)
virtualnoexcept

Define function. Puts objects in usable state.

Parameters
[in]a_ebGridsGrids
[in]a_ebGridsCoarsenedFineCoarsened fine grids
[in]a_ebGridsRefinedCoarRefined coarse grids
[in]a_refRatRefinement factory between levels
[in]a_dxGrid resolutions. @πaram[in] a_probLo Lower-left corner of physical domain.
[in]a_finestLevelFinest grid level.
[in]a_radiusDeposition radius

◆ deposit() [1/2]

template<class P , Real(P::*)() particleScalarField>
void EBAMRSurfaceDeposition::deposit ( EBAMRIVData a_meshData,
const ParticleContainer< P > &  a_particles 
) const
noexcept

Deposit function. Deposits particle on surface.

P is the particle type

Note
This will throw an error if a particle is located on a grid cell that is NOT an irregular cell

◆ deposit() [2/2]

template<class P , Real(P::*)() particleScalarField>
void EBAMRSurfaceDeposition::deposit ( EBAMRIVData a_meshData,
const ParticleContainer< P > &  a_particles 
) const
noexcept

Deposit function. Deposits particle on surface.

P is the particle type

Note
This will throw an error if a particle is located on a grid cell that is NOT an irregular cell

Member Data Documentation

◆ m_coarseToFineStencils

Vector<RefCountedPtr<LayoutData<BaseIVFAB<VoFStencil> > > > EBAMRSurfaceDeposition::m_coarseToFineStencils
protected

Stencils for interpolating coarse-grid data to the fine grid.

This is defined on the coarse grid but reaches into the refined coarse grid.

◆ m_copierLevel

Vector<Copier> EBAMRSurfaceDeposition::m_copierLevel
protected

Level copier for adding data from valid+ghost -> valid.

Needed when adding ghost-deposited data back into valid cells

◆ m_data

EBAMRIVData EBAMRSurfaceDeposition::m_data
mutableprotected

Data on each level.

Allocating this separately because we define Copiers that need a specific amount of ghost cells.

◆ m_ebGridsCoarsenedFine

Vector<RefCountedPtr<EBLevelGrid> > EBAMRSurfaceDeposition::m_ebGridsCoarsenedFine
protected

Coarsened grids.

Note
m_ebGridsCoarsenedFine[i] contains the coarsening of m_ebGrids[i] and m_ebGridsCoarsenedFine[0] contains the nullpointer

◆ m_ebGridsRefinedCoar

Vector<RefCountedPtr<EBLevelGrid> > EBAMRSurfaceDeposition::m_ebGridsRefinedCoar
protected

Refined grids.

Note
m_ebGridsCoarsenedFine[i] contains the refinement of m_ebGrids[i] and m_ebGridsCoarsenedFine[m_finestLevel-1] contains the nullpointer

◆ m_fineToCoarseStencils

Vector<RefCountedPtr<LayoutData<BaseIVFAB<VoFStencil> > > > EBAMRSurfaceDeposition::m_fineToCoarseStencils
protected

Stencils for conservatively coarsening fine-grid data (in ghost cells) to the coarse grid.

Defined on the fine grid but reaches into the refined coarse grid.


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