Calculation of adjoint based sensitivities for Bezier control points. More...
Public Member Functions | |
TypeName ("Bezier") | |
Runtime type information. More... | |
Bezier (const fvMesh &mesh, const dictionary &dict) | |
Construct from components. More... | |
virtual | ~Bezier ()=default |
Destructor. More... | |
label | nBezier () const |
Number of Bezier control points. More... | |
PtrList< pointTensorField > & | dxidXj () |
dx/db tensor for all control points More... | |
const boolList & | confineXmovement () const |
Confine x movement. More... | |
const boolList & | confineYmovement () const |
Confine y movement. More... | |
const boolList & | confineZmovement () const |
Confine z movement. More... | |
const boolListList & | confineMovement () const |
Info about confining movement in all directions. More... | |
tmp< tensorField > | dndbBasedSensitivities (const label patchI, const label cpI, bool returnDimensionedNormalSens=true) const |
Compute derivative of the normal vector for a Bezier parameterized patch. More... | |
tmp< vectorField > | dndbBasedSensitivities (const label patchI, const label cpI, const label idir, bool returnDimensionedNormalSens=true) const |
Compute derivative of the normal vector for a Bezier parameterized patch wrt a given component (direction) of the Bezier control point. More... | |
tmp< tensorField > | dxdbFace (const label patchI, const label cpI, bool useChainRule=true) const |
dxdb tensor for a Bezier parameterized patch More... | |
tmp< vectorField > | dxdbFace (const label patchI, const label cpI, const label idir, bool useChainRule=true) const |
dxdb vector for a Bezier parameterized patch and a specific control point component More... | |
tensorField | facePoints_d (const label globalFaceI, const label cpI) const |
For a given (global) face ID, return the change of the face points. More... | |
vectorField | facePoints_d (const label globalFaceI, const label cpI, const label idir) const |
For a given (global) face ID, return the change of the face points if a given component of the CP changes. More... | |
const labelList & | getActiveDesignVariables () const |
Return active design variables. More... | |
Protected Attributes | |
const fvMesh & | mesh_ |
const dictionary & | dict_ |
label | nBezier_ |
PtrList< pointTensorField > | dxidXj_ |
boolList | confineXmovement_ |
boolList | confineYmovement_ |
boolList | confineZmovement_ |
boolListList | confineMovement_ |
labelList | activeDesignVariables_ |
Calculation of adjoint based sensitivities for Bezier control points.
Bezier | ( | const fvMesh & | mesh, |
const dictionary & | dict | ||
) |
Construct from components.
Definition at line 40 of file Bezier.C.
References Bezier::activeDesignVariables_, IOobjectOption::AUTO_WRITE, Bezier::confineMovement_, Bezier::confineXmovement_, Bezier::confineYmovement_, Bezier::confineZmovement_, Bezier::dxidXj_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Bezier::mesh_, IOobjectOption::MUST_READ, Foam::name(), Bezier::nBezier_, MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), List< T >::setSize(), UList< T >::size(), fvMesh::time(), and Time::timeName().
|
virtualdefault |
Destructor.
TypeName | ( | "Bezier" | ) |
Runtime type information.
label nBezier | ( | ) | const |
Number of Bezier control points.
Definition at line 120 of file Bezier.C.
References Bezier::nBezier_.
Referenced by sensitivityBezier::assembleSensitivities(), sensitivityBezierFI::assembleSensitivities(), sensitivityBezier::write(), and sensitivityBezierFI::write().
PtrList< pointTensorField > & dxidXj | ( | ) |
dx/db tensor for all control points
Definition at line 126 of file Bezier.C.
References Bezier::dxidXj_.
const boolList & confineXmovement | ( | ) | const |
Confine x movement.
Definition at line 132 of file Bezier.C.
References Bezier::confineXmovement_.
Referenced by sensitivityBezier::assembleSensitivities(), and sensitivityBezierFI::assembleSensitivities().
const boolList & confineYmovement | ( | ) | const |
Confine y movement.
Definition at line 138 of file Bezier.C.
References Bezier::confineYmovement_.
Referenced by sensitivityBezier::assembleSensitivities(), and sensitivityBezierFI::assembleSensitivities().
const boolList & confineZmovement | ( | ) | const |
Confine z movement.
Definition at line 144 of file Bezier.C.
References Bezier::confineZmovement_.
Referenced by sensitivityBezier::assembleSensitivities(), and sensitivityBezierFI::assembleSensitivities().
const boolListList & confineMovement | ( | ) | const |
Info about confining movement in all directions.
Definition at line 150 of file Bezier.C.
References Bezier::confineMovement_.
Referenced by sensitivityBezier::write(), and sensitivityBezierFI::write().
tmp< tensorField > dndbBasedSensitivities | ( | const label | patchI, |
const label | cpI, | ||
bool | returnDimensionedNormalSens = true |
||
) | const |
Compute derivative of the normal vector for a Bezier parameterized patch.
Definition at line 157 of file Bezier.C.
References forAll, deltaBoundary::makeFaceCentresAndAreas_d(), tmp< T >::New(), Foam::foamVersion::patch, face::points(), UList< T >::size(), polyPatch::start(), and Foam::Zero.
Referenced by sensitivityBezier::assembleSensitivities(), and sensitivityBezierFI::assembleSensitivities().
tmp< vectorField > dndbBasedSensitivities | ( | const label | patchI, |
const label | cpI, | ||
const label | idir, | ||
bool | returnDimensionedNormalSens = true |
||
) | const |
Compute derivative of the normal vector for a Bezier parameterized patch wrt a given component (direction) of the Bezier control point.
Definition at line 213 of file Bezier.C.
References forAll, deltaBoundary::makeFaceCentresAndAreas_d(), tmp< T >::New(), Foam::foamVersion::patch, face::points(), UList< T >::size(), polyPatch::start(), Foam::unzipRow(), and Foam::Zero.
tmp< tensorField > dxdbFace | ( | const label | patchI, |
const label | cpI, | ||
bool | useChainRule = true |
||
) | const |
dxdb tensor for a Bezier parameterized patch
Definition at line 272 of file Bezier.C.
References forAll, deltaBoundary::makeFaceCentresAndAreas_d(), tmp< T >::New(), Foam::foamVersion::patch, face::points(), PrimitivePatchInterpolation< Patch >::pointToFaceInterpolate(), UList< T >::size(), and Foam::Zero.
Referenced by sensitivityBezier::assembleSensitivities(), and sensitivityBezierFI::assembleSensitivities().
tmp< vectorField > dxdbFace | ( | const label | patchI, |
const label | cpI, | ||
const label | idir, | ||
bool | useChainRule = true |
||
) | const |
dxdb vector for a Bezier parameterized patch and a specific control point component
Definition at line 324 of file Bezier.C.
References Foam::component(), Field< Type >::component(), forAll, deltaBoundary::makeFaceCentresAndAreas_d(), tmp< T >::New(), Foam::foamVersion::patch, face::points(), PrimitivePatchInterpolation< Patch >::pointToFaceInterpolate(), Field< Type >::replace(), UList< T >::size(), and Foam::Zero.
tensorField facePoints_d | ( | const label | globalFaceI, |
const label | cpI | ||
) | const |
For a given (global) face ID, return the change of the face points.
Definition at line 386 of file Bezier.C.
References forAll, and Foam::Zero.
vectorField facePoints_d | ( | const label | globalFaceI, |
const label | cpI, | ||
const label | idir | ||
) | const |
For a given (global) face ID, return the change of the face points if a given component of the CP changes.
Definition at line 402 of file Bezier.C.
References forAll, and Foam::Zero.
const labelList & getActiveDesignVariables | ( | ) | const |
Return active design variables.
Definition at line 421 of file Bezier.C.
References Bezier::activeDesignVariables_.
|
protected |
Definition at line 75 of file Bezier.H.
Referenced by Bezier::Bezier().
|
protected |
|
protected |
Definition at line 78 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::nBezier().
|
protected |
Definition at line 79 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::dxidXj().
|
protected |
Definition at line 81 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::confineXmovement().
|
protected |
Definition at line 82 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::confineYmovement().
|
protected |
Definition at line 83 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::confineZmovement().
|
protected |
Definition at line 84 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::confineMovement().
|
protected |
Definition at line 85 of file Bezier.H.
Referenced by Bezier::Bezier(), and Bezier::getActiveDesignVariables().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.