34 namespace extrudeModels
45 scalar maxOrthogonality = -1;
53 const scalar orthogonality =
magSqr(dir ^ dirn);
55 if (orthogonality > maxOrthogonality)
57 maxOrthogonality = orthogonality;
58 maxOrthogonalityDir = cmpt;
63 dir[maxOrthogonalityDir] = 1;
80 T.x(), TNT.x(),
B.x(),
81 T.y(), TNT.y(),
B.y(),
93 distances_(eMeshPtr_->
points().size(), scalar(0)),
94 directions_(distances_.size()),
95 normals_(directions_.size()),
101 normals_[0] = orthogonal(directions_[0]);
103 for (
label i = 0; i < distances_.
size() - 1; i++)
107 distances_[i + 1] = distances_[i] +
mag(d);
110 normals_[i] - 2*(directions_[i] & normals_[i])*directions_[i];
113 R0T_ = orthonormalBasis(directions_.
first(), normals_.
first()).
T();
125 Foam::label Foam::extrudeModels::path::findFrameIndex
127 const scalar distance
132 if (distances_[i] <= distance && distance < distances_[i + 1])
138 return distances_.size() - 1;
146 const point& surfacePoint,
147 const vector& surfaceNormal,
153 const scalar d = sumThickness(layer)*distances_.last();
154 const label frame = findFrameIndex(d);
156 vector localCoords(R0T_ & (surfacePoint -
points.first()));
159 const tensor R(orthonormalBasis( directions_[frame], normals_[frame]));
164 + directions_[frame]*(d - distances_[frame])
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
Tensor< Cmpt > T() const
Return transpose.
T & first()
Return the first element of the list.
static const direction nComponents
Number of components in this vector space.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Points connected by edges.
Top level extrusion model class.
Extrudes by transforming points along an curve defined as an edgeMesh.
virtual ~path()
Destructor.
path(const dictionary &dict)
Construct from dictionary.
defineTypeNameAndDebug(cyclicSector, 0)
addToRunTimeSelectionTable(extrudeModel, cyclicSector, dictionary)
static const coefficient B("B", dimless, 18.678)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Tensor< scalar > tensor
Tensor of scalars.
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionSet normalised(const dimensionSet &)
static scalar R(const scalar a, const scalar x)
void magSqr(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)