55 const vector& localSystemCoordinates
60 localSystemCoordinates.
x()*
cos(localSystemCoordinates.
y()),
61 localSystemCoordinates.
x()*
sin(localSystemCoordinates.
y()),
62 localSystemCoordinates.
z()
66 return cartesianCoors;
72 label globalPointIndex
75 const vector& localCoors = localSystemCoordinates_[globalPointIndex];
78 cos(localCoors.
y()), -localCoors.
x()*
sin(localCoors.
y()), 0,
79 sin(localCoors.
y()), localCoors.
x()*
cos(localCoors.
y()), 0,
83 return transformTensor;
92 forAll(cartesianPoints, pI)
99 cylindricalCoors.x() =
R;
100 cylindricalCoors.y() = theta;
101 cylindricalCoors.z() = cartesianPoints[pI].z();
102 localSystemCoordinates_[pI] = cylindricalCoors;
109 "cylindricalCoors" + name_,
110 mesh_.time().timeName(),
119 cylindricalCoors.write();
125Foam::NURBS3DVolumeCylindrical::NURBS3DVolumeCylindrical
129 bool computeParamCoors
137 if (computeParamCoors)
#define R(A, B, C, D, E, F, K, M)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field values.
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static FOAM_NO_DANGLING_REFERENCE const pointMesh & New(const polyMesh &mesh, Args &&... args)
Calculation of adjoint based sensitivities at wall faces.
void updateLocalCoordinateSystem(const vectorField &cartesianPoints)
Update coordinates in the local system based on the cartesian points.
vector origin_
Translation vector.
vector transformPointToCartesian(const vector &localCoordinates) const
Transform a point from its coordinate system to a cartesian system.
tensor transformationTensorDxDb(label globalPointIndex)
Transformation tensor for dxdb, from local coordinate system to cartesian.
NURBS3DVolume morpher. Includes support functions for gradient computations Base class providing supp...
vectorField localSystemCoordinates_
Coordinates in the local system for which CPs are defined.
const pointVectorField & getParametricCoordinates()
Get parametric coordinates.
void writeCps(const fileName &="cpsFile", const bool transform=true) const
Write control points on a cartesian coordinates system for visualization.
NURBS3DVolume(const dictionary &dict, const fvMesh &mesh, bool computeParamCoors=true)
Construct from dictionary.
const dictionary & dict() const
Get dictionary.
const fvMesh & mesh() const
Get mesh.
void determineActiveDesignVariablesAndPoints()
Create lists with active design variables and control points.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & y() const noexcept
Access to the vector y component.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sin(const dimensionedScalar &ds)
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
dimensionedScalar atan2(const dimensionedScalar &x, const dimensionedScalar &y)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
dimensionedScalar cos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.