43 void Foam::rotatedBoxToCell::combine(topoSet& set,
const bool add)
const
55 origin_ + k_ + i_ + j_,
60 const labelList boxVerts({0, 1, 2, 3, 4, 5, 6, 7});
65 const faceList boxFaces(cellShape(
hex, boxVerts).faces());
71 boxFaceNormals[i] = boxFaces[i].area(boxPoints);
86 ((ctrs[celli] - boxPoints[boxFaces[i][0]]) & boxFaceNormals[i])
107 const polyMesh&
mesh,
124 const polyMesh&
mesh,
125 const dictionary&
dict
134 if (
dict.found(
"box"))
136 const boundBox bb(
dict.lookup(
"box"));
147 origin_ = (
R & (bb.min() -
c)) +
c;
148 i_ =
R & (bbPoints[1] - bb.min());
149 j_ =
R & (bbPoints[3] - bb.min());
150 k_ =
R & (bbPoints[4] - bb.min());
178 Info<<
" Adding cells with center within rotated box " <<
endl;
184 Info<<
" Removing cells with center within rotated box " <<
endl;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
static const cellModel * lookup(const word &)
Look up a model by name and return a pointer to the model or nullptr.
const vectorField & cellCentres() const
rotatedBoxToCell(const polyMesh &mesh, const vector &origin, const vector &i, const vector &j, const vector &k)
Construct from components.
virtual ~rotatedBoxToCell()
Destructor.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
void addOrDelete(topoSet &set, const label celli, const bool) const
Add (if bool) celli to set or delete celli from set.
setAction
Enumeration defining the valid actions.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const volSymmTensorField R(IOobject("R", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), turbulence->R())
const dimensionedScalar c
Speed of light in a vacuum.
const dimensionSet dimless
tensor rotationTensor(const vector &n1, const vector &n2)
Rotational transformation tensor from unit vector n1 to n2.
List< label > labelList
A List of labels.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
void add(GeometricField< typename typeOfSum< Type1, Type2 >::type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type1, GeoMesh, PrimitiveField2 > &gf1, const GeometricField< Type2, GeoMesh, PrimitiveField3 > &gf2)
Tensor< scalar > tensor
Tensor of scalars.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet & dimLength
IOstream & hex(IOstream &io)
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionSet normalised(const dimensionSet &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)