Chombo + EB  3.2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GeometryShop Class Reference

#include <GeometryShop.H>

Inheritance diagram for GeometryShop:
Inheritance graph
[legend]

Public Member Functions

 GeometryShop (const BaseIF &a_localGeom, int a_verbosity, RealVect a_vectDx, Real a_thrshdVoF=1.0e-16)
 
 ~GeometryShop ()
 
bool twoEdgeIntersections (edgeMo a_edges[4]) const
 
bool isRegular (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
bool isCovered (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual bool isIrregular (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual InOut InsideOutside (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual bool canGenerateMultiCells () 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
 
void computeVoFInternals (Real &a_volFrac, Vector< int > a_loArc[SpaceDim], Vector< int > a_hiArc[SpaceDim], Vector< Real > a_loAreaFrac[SpaceDim], Vector< Real > a_hiAreaFrac[SpaceDim], Real &a_bndryArea, RealVect &a_normal, RealVect &a_volCentroid, RealVect &a_bndryCentroid, Vector< RealVect > a_loFaceCentroid[SpaceDim], Vector< RealVect > a_hiFaceCentroid[SpaceDim], const BaseFab< int > &a_regIrregCovered, const IntVectSet &a_ivsIrreg, const VolIndex &a_vof, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx, const RealVect &a_vectDx, const IntVect &a_iv) const
 
void getFullNodeWithCoveredFace (IrregNode &a_newNode, const BaseFab< int > &a_regIrregCovered, const IntVect &a_iv, const ProblemDomain &a_domain) const
 
void fixRegularCellsNextToCovered (Vector< IrregNode > &a_nodes, BaseFab< int > &a_regIrregCovered, const Box &a_validRegion, const ProblemDomain &a_domain, const IntVect &a_iv, const Real &a_dx) const
 
virtual void makeGrids (const ProblemDomain &a_domain, DisjointBoxLayout &a_grids, const int &a_maxGridSize, const int &a_maxIrregGridSize)
 
- Public Member Functions inherited from GeometryService
 GeometryService ()
 
virtual ~GeometryService ()
 
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)
 

Public Attributes

int m_phase
 

Private Member Functions

bool isRegularEveryPoint (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
bool isCoveredEveryPoint (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx) const
 
virtual bool isIrregularEveryPoint (const Box &a_region, const ProblemDomain &a_domain, const RealVect &a_origin, const Real &a_dx, const Real &a_originVal) const
 
void edgeData3D (edgeMo a_edges[4], bool &a_faceCovered, bool &a_faceRegular, bool &a_faceDontKnow, const int a_hiLoFace, const int a_faceNormal, const Real &a_dx, const RealVect &a_vectDx, const IntVect &a_coord, const ProblemDomain &a_domain, const RealVect &a_origin) const
 
void edgeData2D (edgeMo a_edges[4], bool &a_faceCovered, bool &a_faceRegular, bool &a_faceDontKnow, const Real &a_dx, const RealVect &a_vectDx, const IntVect &a_coord, const ProblemDomain &a_domain, const RealVect &a_origin) const
 
void edgeType (bool &a_regular, bool &a_covered, bool &a_dontKnow, Real &a_signHi, Real &a_signLo) const
 
Real BrentRootFinder (const RealVect &a_x1, const RealVect &a_x2, const int &a_range) const
 
Real PrismoidalAreaCalc (RealVect &a_xVec, RealVect &a_yVec) const
 
int getNumCellsClipped ()
 
Real Min (const Real x, const Real y) const
 
 GeometryShop ()
 
 GeometryShop (const GeometryShop &a_workshopin)
 
void operator= (const GeometryShop &a_workshopin)
 

Private Attributes

int m_numCellsClipped
 
int m_verbosity
 
Real m_threshold
 
Real m_thrshdVoF
 
RealVect m_vectDx
 
BaseIFm_implicitFunction
 
const STLIFm_stlIF
 
bool m_STLBoxSet
 

Static Private Attributes

static bool s_verbose
 

Additional Inherited Members

- Public Types inherited from GeometryService
enum  InOut { Regular, Covered, Irregular }
 
- Static Public Member Functions inherited from GeometryService
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 the base class for the workshop algorithm. It forms the interface between the workshop classes and the geometryservice class.

Constructor & Destructor Documentation

GeometryShop::GeometryShop ( const BaseIF a_localGeom,
int  a_verbosity,
RealVect  a_vectDx,
Real  a_thrshdVoF = 1.0e-16 
)

Define the workshop using the local geometry description

GeometryShop::~GeometryShop ( )
GeometryShop::GeometryShop ( )
inlineprivate

References MayDay::Abort().

GeometryShop::GeometryShop ( const GeometryShop a_workshopin)
inlineprivate

References MayDay::Abort().

Member Function Documentation

bool GeometryShop::twoEdgeIntersections ( edgeMo  a_edges[4]) const
bool GeometryShop::isRegular ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
virtual

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

Implements GeometryService.

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

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

Implements GeometryService.

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

Reimplemented from GeometryService.

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

Reimplemented from GeometryService.

virtual bool GeometryShop::canGenerateMultiCells ( ) const
inlinevirtual

Reimplemented from GeometryService.

virtual void GeometryShop::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
virtual

Define the internals of the input ebisRegion.

Implements GeometryService.

void GeometryShop::computeVoFInternals ( Real a_volFrac,
Vector< int >  a_loArc[SpaceDim],
Vector< int >  a_hiArc[SpaceDim],
Vector< Real a_loAreaFrac[SpaceDim],
Vector< Real a_hiAreaFrac[SpaceDim],
Real a_bndryArea,
RealVect a_normal,
RealVect a_volCentroid,
RealVect a_bndryCentroid,
Vector< RealVect a_loFaceCentroid[SpaceDim],
Vector< RealVect a_hiFaceCentroid[SpaceDim],
const BaseFab< int > &  a_regIrregCovered,
const IntVectSet a_ivsIrreg,
const VolIndex a_vof,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx,
const RealVect a_vectDx,
const IntVect a_iv 
) const
void GeometryShop::getFullNodeWithCoveredFace ( IrregNode a_newNode,
const BaseFab< int > &  a_regIrregCovered,
const IntVect a_iv,
const ProblemDomain a_domain 
) const
void GeometryShop::fixRegularCellsNextToCovered ( Vector< IrregNode > &  a_nodes,
BaseFab< int > &  a_regIrregCovered,
const Box a_validRegion,
const ProblemDomain a_domain,
const IntVect a_iv,
const Real a_dx 
) const
virtual void GeometryShop::makeGrids ( const ProblemDomain a_domain,
DisjointBoxLayout a_grids,
const int &  a_maxGridSize,
const int &  a_maxIrregGridSize 
)
virtual

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 from GeometryService.

bool GeometryShop::isRegularEveryPoint ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
private

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

bool GeometryShop::isCoveredEveryPoint ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx 
) const
private

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

virtual bool GeometryShop::isIrregularEveryPoint ( const Box a_region,
const ProblemDomain a_domain,
const RealVect a_origin,
const Real a_dx,
const Real a_originVal 
) const
privatevirtual
void GeometryShop::edgeData3D ( edgeMo  a_edges[4],
bool &  a_faceCovered,
bool &  a_faceRegular,
bool &  a_faceDontKnow,
const int  a_hiLoFace,
const int  a_faceNormal,
const Real a_dx,
const RealVect a_vectDx,
const IntVect a_coord,
const ProblemDomain a_domain,
const RealVect a_origin 
) const
private
void GeometryShop::edgeData2D ( edgeMo  a_edges[4],
bool &  a_faceCovered,
bool &  a_faceRegular,
bool &  a_faceDontKnow,
const Real a_dx,
const RealVect a_vectDx,
const IntVect a_coord,
const ProblemDomain a_domain,
const RealVect a_origin 
) const
private
void GeometryShop::edgeType ( bool &  a_regular,
bool &  a_covered,
bool &  a_dontKnow,
Real a_signHi,
Real a_signLo 
) const
private
Real GeometryShop::BrentRootFinder ( const RealVect a_x1,
const RealVect a_x2,
const int &  a_range 
) const
private
Real GeometryShop::PrismoidalAreaCalc ( RealVect a_xVec,
RealVect a_yVec 
) const
private
int GeometryShop::getNumCellsClipped ( )
private
Real GeometryShop::Min ( const Real  x,
const Real  y 
) const
private
void GeometryShop::operator= ( const GeometryShop a_workshopin)
inlineprivate

References MayDay::Abort().

Member Data Documentation

int GeometryShop::m_phase
int GeometryShop::m_numCellsClipped
private
int GeometryShop::m_verbosity
private
Real GeometryShop::m_threshold
private
Real GeometryShop::m_thrshdVoF
private
RealVect GeometryShop::m_vectDx
private
BaseIF* GeometryShop::m_implicitFunction
private
const STLIF* GeometryShop::m_stlIF
private
bool GeometryShop::m_STLBoxSet
mutableprivate
bool GeometryShop::s_verbose
staticprivate

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