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();
192 facePointDerivs[pI] = dxdbInt[fGlobal[pI]];
196 if (returnDimensionedNormalSens)
224 bool returnDimensionedNormalSens
232 auto& dndbSens = tdndbSens.ref();
236 const label patchStart = ppatch.
start();
251 facePointDerivs[pI] = dxdbDir[fGlobal[pI]];
255 if (returnDimensionedNormalSens)
260 facePoints, facePointDerivs
294 const label patchStart = patch.start();
307 facePointDerivs[pI] = dxdbInt[fGlobal[pI]];
323 dxidXj_[cpI].boundaryField()[patchI].patchInternalField()()
348 const label patchStart = patch.start();
365 facePointDerivs[pI] = dxdbDir[fGlobal[pI]];
383 dxidXj_[cpI].boundaryField()[patchI].patchInternalField()().
394 const label globalFaceI,
402 fPoints_d[fpI] =
dxidXj_[cpI].primitiveField()[faceI[fpI]];
410 const label globalFaceI,
419 const tensor& dxdbTensor =
dxidXj_[cpI].primitiveField()[faceI[fpI]];
420 fPoints_d[fpI].x() = dxdbTensor.
component(3*idir);
421 fPoints_d[fpI].y() = dxdbTensor.
component(3*idir + 1);
422 fPoints_d[fpI].z() = dxdbTensor.
component(3*idir + 2);
Calculation of adjoint based sensitivities for Bezier control points.
boolList confineYmovement_
PtrList< pointTensorField > dxidXj_
label nBezier() const
Number of Bezier control points.
const boolList & confineZmovement() const
Confine z movement.
boolListList confineMovement_
const boolList & confineYmovement() const
Confine y movement.
const boolListList & confineMovement() const
Info about confining movement in all directions.
boolList confineXmovement_
const boolList & confineXmovement() const
Confine x movement.
labelList activeDesignVariables_
tmp< tensorField > dxdbFace(const label patchI, const label cpI, bool useChainRule=true) const
dxdb tensor for a Bezier parameterized patch
tmp< tensorField > dndbBasedSensitivities(const label patchI, const label cpI, bool returnDimensionedNormalSens=true) const
boolList confineZmovement_
tensorField facePoints_d(const label globalFaceI, const label cpI) const
For a given (global) face ID, return the change of the face points.
PtrList< pointTensorField > & dxidXj()
dx/db tensor for all control points
const labelList & getActiveDesignVariables() const
Return active design variables.
void replace(const direction, const UList< cmptType > &)
Replace a component field of the field.
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Generic GeometricField class.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void setSize(const label n)
Alias for resize()
Interpolation class within a primitive patch. Allows interpolation from points to faces and vice vers...
tmp< Field< Type > > pointToFaceInterpolate(const Field< Type > &pf) const
Interpolate from points to faces.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
void size(const label n)
Older name for setAddressableSize.
const Cmpt & component(const direction) const
components
Component labeling enumeration.
Differentiation of the mesh data structure.
vectorField makeFaceCentresAndAreas_d(const pointField &p, const pointField &p_d)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A face is a list of labels corresponding to mesh vertices.
pointField points(const UList< point > &pts) const
Return the points corresponding to this face.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
const Time & time() const
Return the top-level database.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const faceList & faces() const
Return raw faces.
virtual const pointField & points() const
Return raw points.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
A class for managing temporary objects.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void unzipRow(const FieldField< Field, SymmTensor< Cmpt > > &input, const direction idx, FieldField< Field, Vector< Cmpt > > &result)
Extract a symmTensor field field row (x,y,z) == (0,1,2)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.