00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012
00013 #ifndef _GEOMETRYSERVICE_H_
00014 #define _GEOMETRYSERVICE_H_
00015
00016 #include <cmath>
00017 #include <cstdlib>
00018
00019 #include "REAL.H"
00020 #include "LoHiSide.H"
00021 #include "RealVect.H"
00022 #include "Box.H"
00023 #include "IntVect.H"
00024
00025 #include "EBISBox.H"
00026 #include "VolIndex.H"
00027 #include "FaceIndex.H"
00028 #include "IrregNode.H"
00029
00030 #include "NamespaceHeader.H"
00031
00033
00037 class GeometryService
00038 {
00039 public:
00040
00041 enum InOut {Regular, Covered, Irregular};
00042
00043 GeometryService();
00044
00045 virtual ~GeometryService();
00046
00048
00052 virtual bool isRegular(const Box& a_region,
00053 const ProblemDomain& a_domain,
00054 const RealVect& a_origin,
00055 const Real& a_dx) const = 0;
00056
00058
00062 virtual bool isCovered(const Box& a_region,
00063 const ProblemDomain& a_domain,
00064 const RealVect& a_origin,
00065 const Real& a_dx) const = 0;
00066
00067 virtual bool isIrregular(const Box& a_region,
00068 const ProblemDomain& a_domain,
00069 const RealVect& a_origin,
00070 const Real& a_dx) const ;
00072
00081 virtual void fillGraph(BaseFab<int>& a_regIrregCovered,
00082 Vector<IrregNode>& a_nodes,
00083 const Box& a_validRegion,
00084 const Box& a_ghostRegion,
00085 const ProblemDomain& a_domain,
00086 const RealVect& a_origin,
00087 const Real& a_dx) const = 0;
00088
00089 virtual bool canGenerateMultiCells() const;
00090
00091 virtual InOut InsideOutside(const Box& a_region,
00092 const ProblemDomain& a_domain,
00093 const RealVect& a_origin,
00094 const Real& a_dx) const ;
00095
00097 static bool intersection(const RealVect& a_lo1, const RealVect& a_hi1,
00098 const RealVect& a_lo2, const RealVect& a_hi2);
00099
00100 static bool intersection(const Box& a_region,
00101 const RealVect& a_origin,
00102 const Real& a_dx,
00103 const RealVect& a_lower,
00104 const RealVect& a_upper);
00105
00106 protected:
00107
00108 };
00109 #include "NamespaceFooter.H"
00110 #endif