12 #ifndef CD_LocationImplem_H
13 #define CD_LocationImplem_H
17 #include <CD_NamespaceHeader.H>
26 case Location::Cell::Center: {
27 ret = RealVect(a_vof.gridIndex()) + 0.5 * RealVect::Unit;
31 case Location::Cell::Centroid: {
32 ret = RealVect(a_vof.gridIndex()) + 0.5 * RealVect::Unit + a_ebisbox.centroid(a_vof);
36 case Location::Cell::Boundary: {
37 ret = RealVect(a_vof.gridIndex()) + 0.5 * RealVect::Unit + a_ebisbox.bndryCentroid(a_vof);
42 MayDay::Error(
"LeastSquares::position -- bad location input.");
57 const IntVect iv = a_face.gridIndex(Side::Hi);
60 case Location::Face::Center: {
61 ret = (RealVect(iv) + 0.5 * RealVect::Unit) - 0.5 * BASISREALV(a_face.direction());
65 case Location::Face::Centroid: {
66 ret = (RealVect(iv) + 0.5 * RealVect::Unit) - 0.5 * BASISREALV(a_face.direction());
68 const RealVect faceCentroid = a_ebisbox.centroid(a_face);
70 for (
int dir = 0; dir < SpaceDim; dir++) {
71 if (dir != a_face.direction()) {
72 ret[dir] += faceCentroid[dir];
79 MayDay::Error(
"LeastSquares::positon - bad location input.");
90 #include <CD_NamespaceFooter.H>
Declaration of cell positions.
RealVect position(const Location::Cell a_location, const VolIndex &a_vof, const EBISBox &a_ebisbox, const Real &a_dx)
Compute the position (ignoring the "origin) of a Vof.
Definition: CD_LocationImplem.H:20
Cell
Enum for distinguishing between cell locations.
Definition: CD_Location.H:30
Face
Enum for distinguishing between face locations.
Definition: CD_Location.H:40