Go to the documentation of this file.
51 nBezier_(dict_.subDict(
"Bezier").
get<label>(
"nBezier")),
55 dict_.subDict(
"Bezier").
get<
boolList>(
"confineXmovement")
59 dict_.subDict(
"Bezier").
get<
boolList>(
"confineYmovement")
63 dict_.subDict(
"Bezier").
get<
boolList>(
"confineZmovement")
65 confineMovement_(3,
boolList(nBezier_, false)),
66 activeDesignVariables_(3*nBezier_)
76 <<
"confineMovement lists sizes "
80 <<
"are incompatible with nBezier " <<
nBezier_
90 for (label iDir = 0; iDir < 3; ++iDir)
92 for (label iCP = 0; iCP <
nBezier_; ++iCP)
103 for (label iCP = 0; iCP <
nBezier_; ++iCP)
167 bool returnDimensionedNormalSens
175 auto& dndbSens = tdndbSens.ref();
179 const label patchStart = ppatch.
start();
180 const tensorField& dxdbInt = dxidXj_[cpI].primitiveField();
185 const face& fGlobal = mesh_.faces()[fI + patchStart];
192 facePointDerivs[pI] = dxdbInt[fGlobal[pI]];
196 if (returnDimensionedNormalSens)
224 bool returnDimensionedNormalSens
232 auto& dndbSens = tdndbSens.ref();
236 const label patchStart = ppatch.
start();
237 const tensorField& dxdbInt = dxidXj_[cpI].primitiveField();
240 dxdbDir.replace(1, dxdbInt.
component(3*idir + 1));
241 dxdbDir.replace(2, dxdbInt.
component(3*idir + 2));
246 const face& fGlobal = mesh_.faces()[fI + patchStart];
253 facePointDerivs[pI] = dxdbDir[fGlobal[pI]];
257 if (returnDimensionedNormalSens)
262 facePoints, facePointDerivs
291 auto& dxdbFace = tdxdbFace.ref();
296 const label patchStart =
patch.start();
297 const tensorField& dxdbInt = dxidXj_[cpI].primitiveField();
302 const face& fGlobal = mesh_.faces()[fI + patchStart];
309 facePointDerivs[pI] = dxdbInt[fGlobal[pI]];
325 dxidXj_[cpI].boundaryField()[patchI].patchInternalField()()
344 auto& dxdbFace = tdxdbFace.ref();
350 const label patchStart =
patch.start();
351 const tensorField& dxdbInt = dxidXj_[cpI].primitiveField();
354 dxdbDir.replace(1, dxdbInt.
component(3*idir + 1));
355 dxdbDir.replace(2, dxdbInt.
component(3*idir + 2));
360 const face& fGlobal = mesh_.faces()[fI + patchStart];
367 facePointDerivs[pI] = dxdbDir[fGlobal[pI]];
385 dxidXj_[cpI].boundaryField()[patchI].patchInternalField()().
396 const label globalFaceI,
400 const face& faceI(mesh_.faces()[globalFaceI]);
404 fPoints_d[fpI] = dxidXj_[cpI].primitiveField()[faceI[fpI]];
412 const label globalFaceI,
417 const face& faceI(mesh_.faces()[globalFaceI]);
421 const tensor& dxdbTensor = dxidXj_[cpI].primitiveField()[faceI[fpI]];
422 fPoints_d[fpI].
x() = dxdbTensor.component(3*idir);
423 fPoints_d[fpI].
y() = dxdbTensor.component(3*idir + 1);
424 fPoints_d[fpI].
z() = dxdbTensor.component(3*idir + 2);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
PtrList< pointTensorField > dxidXj_
boolListList confineMovement_
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
boolList confineXmovement_
Differentiation of the mesh data structure.
const boolList & confineXmovement() const
Confine x movement.
Vector< Cmpt > z() const
Extract vector for row 2.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
tmp< Field< Type > > pointToFaceInterpolate(const Field< Type > &pf) const
Interpolate from points to faces.
const labelList & getActiveDesignVariables() const
Return active design variables.
boolList confineYmovement_
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
static word timeName(const scalar t, const int precision=precision_)
Ostream & endl(Ostream &os)
Add newline and flush stream.
const boolList & confineZmovement() const
Confine z movement.
labelList activeDesignVariables_
#define forAll(list, i)
Loop across all elements in list.
boolList confineZmovement_
PtrList< pointTensorField > & dxidXj()
dx/db tensor for all control points
label nBezier() const
Number of Bezier control points.
A patch is a list of labels that address the faces in the global face list.
Vector< Cmpt > x() const
Extract vector for row 0.
void setSize(const label n)
Alias for resize()
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
void replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
tmp< tensorField > dxdbFace(const label patchI, const label cpI, bool useChainRule=true) const
dxdb tensor for a Bezier parameterized patch
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
vectorField makeFaceCentresAndAreas_d(const pointField &p, const pointField &p_d)
Mesh data needed to do the Finite Volume discretisation.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
label start() const
Return start label of this patch in the polyMesh face list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tensorField facePoints_d(const label globalFaceI, const label cpI) const
For a given (global) face ID, return the change of the face points.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Vector< Cmpt > y() const
Extract vector for row 1.
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
const std::string patch
OpenFOAM patch number as a std::string.
pointField points(const UList< point > &pts) const
Return the points corresponding to this face.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const Time & time() const
Return the top-level database.
const boolList & confineYmovement() const
Confine y movement.
A face is a list of labels corresponding to mesh vertices.
const boolListList & confineMovement() const
Info about confining movement in all directions.
Generic GeometricField class.
defineTypeNameAndDebug(combustionModel, 0)
tmp< tensorField > dndbBasedSensitivities(const label patchI, const label cpI, bool returnDimensionedNormalSens=true) const