Go to the documentation of this file.
37 namespace extrudeModels
53 vertices_(coeffDict_.
lookup(
"vertices")),
56 coeffDict_.
lookup(
"edges"),
57 blockEdge::iNew(coeffDict_, geometry_, vertices_)
59 x_(segments_.size() + 1),
60 y_(segments_.size() + 1),
61 relTol_(coeffDict_.getOrDefault<scalar>(
"toleranceCheck", SMALL))
64 for (label i=1; i < segments_.size(); ++i)
67 const vector x0 = segments_[i-1].position(1);
68 const vector x1 = segments_[i].position(0);
70 if (
mag(x1-x0) > SMALL)
73 <<
"Supplied polyline is not continuous." <<
endl
81 segments_[i-1].position(1)
82 - segments_[i-1].position(1-DELTA)
88 segments_[i].position(DELTA)
89 - segments_[i].position(0)
92 if ((v1 & v0) < (1 - relTol_))
95 <<
"Supplied polyline is not smooth." <<
endl
103 scalar totalLength = 0;
106 totalLength += segments_[i].length();
107 x_[i+1] = totalLength;
120 <<
tab <<
"Polyline start: " << p0_ <<
nl
121 <<
tab <<
"Polyline normal at start: " << n0_ <<
nl
122 <<
tab <<
"Polyline end: "
123 << segments_.last().position(1) <<
nl
124 <<
tab <<
"Total length: " << totalLength <<
endl;
131 point polyline::operator()
133 const point& surfacePoint,
134 const vector& surfaceNormal,
139 vector dp = (surfacePoint - p0_);
145 if (
mag((dp/
mag(dp)) & n0_) > relTol_)
148 <<
"The starting point of the polyline does not appear "
149 <<
"to lie of the supplied surface. Apparent absolute "
150 <<
"misalignment is " << (dp & n0_) <<
endl;
157 positionAndDirection(sumThickness(layer),
p,
n);
160 scalar cosTheta = (
n & n0_);
163 if (cosTheta < (1-SMALL))
185 if (i > segments_.size()-1)
187 i = segments_.size()-1;
192 p = segments_[i].position(
s);
200 segments_[i].position(
min(
s + DELTA, 1))
201 - segments_[i].position(
max(
s - DELTA, 0))
int debug
Static debugging option.
defineTypeNameAndDebug(cyclicSector, 0)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Top level extrusion model class.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.
Field< Type > interpolateXY(const scalarField &xNew, const scalarField &xOld, const Field< Type > &yOld)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
Quaternion class used to perform rotations in 3D space.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Interpolates y values from one curve to another with a different x distribution.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Lookup type of boundary radiation properties.
polyline(const dictionary &dict)
Construct from dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
addToRunTimeSelectionTable(extrudeModel, cyclicSector, dictionary)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
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)
void positionAndDirection(const scalar lambda, vector &p, vector &n) const
#define WarningInFunction
Report a warning using Foam::Warning.
vector transform(const vector &v) const
Rotate the given vector.