Go to the documentation of this file.
62 normalToFace::typeName,
63 "\n Usage: normalToFace (nx ny nz) <tol>\n\n"
64 " Select faces with normal aligned to unit vector (nx ny nz)\n"
71 void Foam::normalToFace::setNormal()
75 if (tol_ < -1 || tol_ > 1)
78 <<
"tolerance not within range -1..1 : " << tol_
117 normal_(checkIs(is)),
118 tol_(readScalar(checkIs(is)))
136 Info<<
" Adding faces according to normal being aligned with "
137 << normal_ <<
" (to within " << tol_ <<
") ..." <<
endl;
140 forAll(mesh_.faceAreas(), facei)
144 if (
mag(1 - (
n & normal_)) < tol_)
154 Info<<
" Removing faces according to normal being aligned with "
155 << normal_ <<
" (to within " << tol_ <<
") ..." <<
endl;
164 if (
mag(1 - (
n & normal_)) < tol_)
166 toBeRemoved.append(facei);
170 set.unset(toBeRemoved);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Add elements to current set.
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
Class with constructor to add usage string to table.
normalToFace(const polyMesh &mesh, const vector &normal, const scalar tol)
Construct from components.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
The topoSetFaceSource is a intermediate class for handling topoSet sources for selecting faces.
Create a new set and ADD elements to it.
Vector< Cmpt > & normalise()
Normalise the vector by its magnitude.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Mesh consisting of general polyhedral cells.
#define forAll(list, i)
Loop across all elements in list.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
messageStream Info
Information stream (stdout output on master, null elsewhere)
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Subtract elements from current set.
errorManipArg< error, int > exit(error &err, const int errNo=1)
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
A topoSetFaceSource to select faces whose surface normal aligned with a given direction.
defineTypeNameAndDebug(combustionModel, 0)