Chombo + EB + MF  3.2
Public Types | Public Member Functions | Static Public Member Functions | List of all members
GeometryService Class Referenceabstract

#include <GeometryService.H>

Inheritance diagram for GeometryService:
Inheritance graph
[legend]

Public Types

enum  InOut { Regular, Covered, Irregular }
 

Public Member Functions

 GeometryService ()
 
virtual ~GeometryService ()
 
virtual bool isRegular (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const =0
 
virtual bool isCovered (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const =0
 
virtual bool isIrregular (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual void fillGraph (BaseFab< int > &a_regIrregCovered, Vector< IrregNode > &a_nodes, const Box &a_validRegion, const Box &a_ghostRegion, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx, const DataIndex &a_di) const =0
 
virtual bool canGenerateMultiCells () const
 
virtual InOut InsideOutside (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual bool generatesHigherOrderMoments () const
 return true if the geometry service generates higher order moments More...
 
virtual InOut InsideOutside (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx, const DataIndex &a_di) const
 
virtual void postMakeBoxLayout (const DisjointBoxLayout &a_dbl, const RealVect &a_dx)
 
virtual void makeGrids (const ProblemDomain &a_domain, DisjointBoxLayout &a_grids, const int &a_maxGridSize, const int &a_maxIrregGridSize)
 

Static Public Member Functions

static bool intersection (const RealVect &a_lo1, const RealVect &a_hi1, const RealVect &a_lo2, const RealVect &a_hi2)
 handy functions to do rectangle intersections in real space More...
 
static bool intersection (const Box &a_region, const RealVect &a_origin, const Real &a_dx, const RealVect &a_lower, const RealVect &a_upper)
 

Detailed Description

This is a pure base class that EBIndexSpace uses to interface with geometry-generation classes.

Member Enumeration Documentation

◆ InOut

Enumerator
Regular 
Covered 
Irregular 

Constructor & Destructor Documentation

◆ GeometryService()

GeometryService::GeometryService ( )

◆ ~GeometryService()

virtual GeometryService::~GeometryService ( )
virtual

Member Function Documentation

◆ isRegular()

virtual bool GeometryService::isRegular ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
pure virtual

Return true if every cell in region is regular at the refinement described by dx.

Implemented in WrappedGShop, GeometryShop, MultiSlabService, SlabService, and AllRegularService.

◆ isCovered()

virtual bool GeometryService::isCovered ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
pure virtual

Return true if every cell in region is covered at the refinement described by dx.

Implemented in WrappedGShop, GeometryShop, MultiSlabService, SlabService, and AllRegularService.

◆ isIrregular()

virtual bool GeometryService::isIrregular ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
virtual

Reimplemented in WrappedGShop, and GeometryShop.

◆ fillGraph()

virtual void GeometryService::fillGraph ( BaseFab< int > &  a_regIrregCovered,
Vector< IrregNode > &  a_nodes,
const Box a_validRegion,
const Box a_ghostRegion,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx,
const DataIndex a_di 
) const
pure virtual

irregGraph contains a complete list of irregular vofs. \ validRegion is the the region of the graph \ domain is the domain of compuation \ regIrregCovered = 1 for regular, 0 for irregular, -1 for covered. regIrregCovered must contain the valid region grown by 1. \ In chombospeak, \ ghostregion = (grow(validRegion, 1) & domain); This overloaded method will be called when the GeometryService was asked to make the grids with makeGrids()

Implemented in WrappedGShop, GeometryShop, MultiSlabService, SlabService, and AllRegularService.

◆ canGenerateMultiCells()

virtual bool GeometryService::canGenerateMultiCells ( ) const
virtual

Reimplemented in WrappedGShop, and GeometryShop.

◆ InsideOutside() [1/2]

virtual InOut GeometryService::InsideOutside ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
virtual

Reimplemented in GeometryShop, MultiSlabService, and SlabService.

Referenced by InsideOutside().

◆ generatesHigherOrderMoments()

virtual bool GeometryService::generatesHigherOrderMoments ( ) const
inlinevirtual

return true if the geometry service generates higher order moments

Most of the geometry generating objects we have do not generate higher order moments (they only generate the standard stuff (volume fractions, area fractions and centroids)). WrappedGShop, does generate the higher order stuff so that one can return true;

Reimplemented in WrappedGShop, and AllRegularService.

◆ InsideOutside() [2/2]

virtual InOut GeometryService::InsideOutside ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx,
const DataIndex a_di 
) const
inlinevirtual

This overloaded method will be called when the GeometryService was asked to make the grids with makeGrids()

References InsideOutside(), intersection(), and postMakeBoxLayout().

◆ intersection() [1/2]

static bool GeometryService::intersection ( const RealVect a_lo1,
const RealVect a_hi1,
const RealVect a_lo2,
const RealVect a_hi2 
)
static

handy functions to do rectangle intersections in real space

Referenced by InsideOutside().

◆ intersection() [2/2]

static bool GeometryService::intersection ( const Box a_region,
const RealVect a_origin,
const Real a_dx,
const RealVect a_lower,
const RealVect a_upper 
)
static

◆ postMakeBoxLayout()

virtual void GeometryService::postMakeBoxLayout ( const DisjointBoxLayout a_dbl,
const RealVect a_dx 
)
virtual

Perform any adjustments needed after box layout is created during EBISLevel construction This function is used because subclasses may have distributed data that they will want to adjust based on the new layout. The default implementation is empty.

Referenced by InsideOutside().

◆ makeGrids()

virtual void GeometryService::makeGrids ( const ProblemDomain a_domain,
DisjointBoxLayout a_grids,
const int &  a_maxGridSize,
const int &  a_maxIrregGridSize 
)
inlinevirtual

A GeometryService has three options for implementing this function 1) do nothing, allow the empty base implementation to remain in place as a null-op 2) take the makeGrids call as a directive: Here are the grids EBIndexSpace is wanting to use, configure yourself accordingly to make this efficient for you. 3) discard the DisjointBoxLayout EBIndexSpace would like and insert your own implementation of layout EBIndexSpace will faithfully use a_grids returned from this function, including it's load balance.

Reimplemented in GeometryShop.


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