39 namespace extrudeModels
54 project_(coeffDict_.getOrDefault(
"project", false))
62 offsetSurfPtr_.reset(
new triSurface(offsetName));
76 <<
"offsetSurface:\n " << offsetName
77 <<
" has different topology than the baseSurface:\n " 98 point offsetSurface::operator()
100 const point& surfacePoint,
101 const vector& surfaceNormal,
114 baseSearchPtr_().findNearest(
samples, nearestDistSqr, info);
116 label triI = info[0].index();
121 const barycentric2D bary = baseTri.pointToBarycentric(surfacePoint);
126 const point offsetPoint
128 bary[0]*offsetTri.a()
129 + bary[1]*offsetTri.
b()
130 + bary[2]*offsetTri.
c()
133 point interpolatedPoint
135 surfacePoint + sumThickness(layer)*(offsetPoint-surfacePoint)
145 offsetSearchPtr_().findNearest
151 return info[0].hitPoint();
155 return interpolatedPoint;
label nPoints() const
Number of points supporting patch faces.
void size(const label n)
Older name for setAddressableSize.
virtual ~offsetSurface()
Destructor.
A triangle primitive used to calculate face normals and swept volumes. Uses referred points...
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const Cmpt & b() const noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
scalarField samples(nIntervals, Zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dictionary & coeffDict_
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
defineTypeNameAndDebug(cyclicSector, 0)
Macros for easy insertion into run-time selection tables.
Top level extrusion model class.
Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of which is redundant...
Extrudes by interpolating points from one surface to the other. Surfaces have to be topologically ide...
Helper class to search on triSurface.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const Field< point_type > & points() const noexcept
Return reference to global points.
label nEdges() const
Number of edges in patch.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
addToRunTimeSelectionTable(extrudeModel, cyclicSector, dictionary)
const Cmpt & c() const noexcept
string & expand(const bool allowEmpty=false)
Inplace expand initial tags, tildes, and all occurrences of environment variables as per stringOps::e...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
offsetSurface(const dictionary &dict)
Construct from dictionary.
Triangulated surface description with patch information.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...