42 void Foam::normalToFace::setNormal()
44 normal_ /=
mag(normal_) + vSmall;
46 Info<<
" normalToFace : Normalised vector to " << normal_ <<
endl;
48 if (tol_ < -1 || tol_ > 1)
51 <<
"tolerance not within range -1..1 : " << tol_
77 normal_(dict.
lookup(
"normal")),
78 tol_(dict.
lookup<scalar>(
"cos"))
100 Info<<
" Adding faces according to normal being aligned with " 101 << normal_ <<
" (to within " << tol_ <<
") ..." <<
endl;
106 n /=
mag(n) + vSmall;
108 if (
mag(1 - (n & normal_)) < tol_)
116 Info<<
" Removing faces according to normal being aligned with " 117 << normal_ <<
" (to within " << tol_ <<
") ..." <<
endl;
124 const label facei = iter.key();
127 n /=
mag(n) + vSmall;
129 if (
mag(1 - (n & normal_)) < tol_)
131 toBeRemoved.
append(facei);
137 set.erase(toBeRemoved[i]);
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
stressControl lookup("compactNormalStress") >> compactNormalStress
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
setAction
Enumeration defining the valid actions.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
virtual ~normalToFace()
Destructor.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
const vectorField & faceAreas() const
dimensioned< scalar > mag(const dimensioned< Type > &)
Mesh consisting of general polyhedral cells.
normalToFace(const polyMesh &mesh, const vector &normal, const scalar tol)
Construct from components.