chombo-discharge
Loading...
Searching...
No Matches
MultiFluidIndexSpace Class Reference

Two-fluid index space. More...

#include <CD_MultiFluidIndexSpace.H>

Public Member Functions

 MultiFluidIndexSpace ()
 Weak constructor. Must call define later.
virtual ~MultiFluidIndexSpace ()
 Destructor.
void define (const Vector< ProblemDomain > &a_domains, const RealVect &a_origin, const Real a_finestDx, const Vector< EBISLayout::Filler > &a_fillers)
 Define the index spaces in filler mode: each phase's EBIndexSpace fills every layout through its filler and holds no level of its own.
virtual void define (const Box &a_domain, const RealVect &a_origin, const Real &a_dx, const Vector< GeometryService * > &a_geoservers, const bool a_distributedData, int a_nCellMax=-1, int a_max_coar=-1, bool a_fixOnlyFirstPhaseRegNextToMultiValued=false)
 Define function.
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace (const phase::which_phase a_phase) const
 Get a particular EBIndexSpace.
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace (const int a_phase) const
 Get a particular EBIndexSpace.
RefCountedPtr< EBIndexSpace > & getEBIndexSpace (const phase::which_phase a_phase)
 Get a particular EBIndexSpace.
RefCountedPtr< EBIndexSpace > & getEBIndexSpace (const int a_phase)
 Get EBIndexSpace.
IntVectSet interfaceRegion (const IntVectSet &a_gasCutCells, const IntVectSet &a_solidCutCells) const
 Get the interface region: the cells cut in both phases.
int numPhases () const
 Get number of phases.

Protected Attributes

Vector< RefCountedPtr< EBIndexSpace > > m_ebis
 EBIndexSpaces.
RefCountedPtr< MFIndexSpace > m_multifluidIndexSpace
 MFIndexSpace.

Detailed Description

Two-fluid index space.

This is basically a wrapper for using two Chombo EBIndexSpaces in the simulation. It calls Chombo for building the EBIS'.

Member Function Documentation

◆ define() [1/2]

void MultiFluidIndexSpace::define ( const Box & a_domain,
const RealVect & a_origin,
const Real & a_dx,
const Vector< GeometryService * > & a_geoservers,
const bool a_distributedData,
int a_nCellMax = -1,
int a_max_coar = -1,
bool a_fixOnlyFirstPhaseRegNextToMultiValued = false )
virtual

Define function.

Parameters
[in]a_domainFinest domain
[in]a_originLower-left corner
[in]a_dxFinest resolution
[in]a_geoserversGenerators for cut-cells
[in]a_distributedDataSpecial flag for Chombo (passing grid generation to the geometryservice)
[in]a_nCellMaxMinimum number of cells in the coarsening
[in]a_max_coarMaximum number of coarsenings.
[in]a_fixOnlyFirstPhaseRegNextToMultiValuedSpecial flag for Chombo.

◆ define() [2/2]

void MultiFluidIndexSpace::define ( const Vector< ProblemDomain > & a_domains,
const RealVect & a_origin,
const Real a_finestDx,
const Vector< EBISLayout::Filler > & a_fillers )

Define the index spaces in filler mode: each phase's EBIndexSpace fills every layout through its filler and holds no level of its own.

See EBIndexSpace::define. A phase whose filler is empty has no index space.

Parameters
[in]a_domainsThe domains, finest first, each a coarsening by two of the one before.
[in]a_originLower-left corner.
[in]a_finestDxResolution on the finest domain.
[in]a_fillersOne filler per phase, indexed by phase::which_phase. The gas phase's must not be empty.

◆ getEBIndexSpace() [1/4]

RefCountedPtr< EBIndexSpace > & MultiFluidIndexSpace::getEBIndexSpace ( const int a_phase)

Get EBIndexSpace.

Parameters
[in]a_phasePhase
Returns
Reference to the EBIndexSpace for the given phase.

◆ getEBIndexSpace() [2/4]

const RefCountedPtr< EBIndexSpace > & MultiFluidIndexSpace::getEBIndexSpace ( const int a_phase) const

Get a particular EBIndexSpace.

Parameters
[in]a_phasePhase
Returns
Const reference to the EBIndexSpace for the given phase.

◆ getEBIndexSpace() [3/4]

RefCountedPtr< EBIndexSpace > & MultiFluidIndexSpace::getEBIndexSpace ( const phase::which_phase a_phase)

Get a particular EBIndexSpace.

Parameters
[in]a_phasePhase
Returns
Reference to the EBIndexSpace for the given phase.

◆ getEBIndexSpace() [4/4]

const RefCountedPtr< EBIndexSpace > & MultiFluidIndexSpace::getEBIndexSpace ( const phase::which_phase a_phase) const

Get a particular EBIndexSpace.

Parameters
[in]a_phasePhase
Returns
Const reference to the EBIndexSpace for the given phase.

◆ interfaceRegion()

IntVectSet MultiFluidIndexSpace::interfaceRegion ( const IntVectSet & a_gasCutCells,
const IntVectSet & a_solidCutCells ) const

Get the interface region: the cells cut in both phases.

Each rank passes the cut cells it holds of each phase; they are gathered on rank 0, intersected there and broadcast, so every rank returns the whole region. Collective.

Parameters
[in]a_gasCutCellsThe cut cells of the gas phase this rank holds.
[in]a_solidCutCellsThe cut cells of the solid phase this rank holds.
Returns
Interface region as an IntVectSet.

◆ numPhases()

int MultiFluidIndexSpace::numPhases ( ) const

Get number of phases.

Returns
Number of phases.

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