Public Member Functions | |
TypeName ("shapeSensitivitiesBase") | |
Runtime type information. More... | |
shapeSensitivitiesBase (const fvMesh &mesh, const dictionary &dict) | |
Construct from components. More... | |
virtual | ~shapeSensitivitiesBase ()=default |
Destructor. More... | |
const labelHashSet & | sensitivityPatchIDs () const |
Get patch IDs on which sensitivities are computed. More... | |
void | setSensitivityPatchIDs (const labelHashSet &sensPatchIDs) |
Overwrite sensitivityPatchIDs. More... | |
void | clearSensitivities () |
Zero sensitivity fields and their constituents. More... | |
void | write () |
Write sensitivity fields. More... | |
void | setSuffix (const word &suffix) |
Set suffix. More... | |
tmp< volVectorField > | getWallFaceSensVec () |
Get wall face sensitivity vectors field. More... | |
tmp< volScalarField > | getWallFaceSensNormal () |
Get wall face sensitivity projected to normal field. More... | |
tmp< volVectorField > | getWallFaceSensNormalVec () |
Get wall face normal sens as vectors field. More... | |
tmp< pointVectorField > | getWallPointSensVec () |
Get wall point sensitivity vectors field. More... | |
tmp< pointScalarField > | getWallPointSensNormal () |
Get wall point sensitivity projected to normal field. More... | |
tmp< pointVectorField > | getWallPointSensNormalVec () |
Get wall point sens as vectors field. More... | |
virtual const boundaryVectorField & | getWallFaceSensVecBoundary () const |
Get wall face sensitivity vectors field. More... | |
virtual const boundaryScalarField & | getWallFaceSensNormalBoundary () const |
Get wall face sensitivity projected to normal field. More... | |
virtual const boundaryVectorField & | getWallFaceSensNormalVecBoundary () const |
Get wall face normal sens as vectors field. More... | |
Protected Member Functions | |
template<class Type > | |
void | constructAndWriteSensitivityField (const autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > &sensFieldPtr, const word &name) const |
Constructs volField based on boundaryField and writes it. More... | |
template<class Type > | |
void | constructAndWriteSensitivtyPointField (const autoPtr< List< Field< Type >>> &sensFieldPtr, const word &name) const |
Constructs pointField based on boundaryField and writes it. More... | |
template<class Type > | |
tmp< GeometricField< Type, fvPatchField, volMesh > > | constructVolSensitivtyField (const autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > &sensFieldPtr, const word &name) const |
Constructs volField based on boundaryField and writes it. More... | |
void | writeFaceBasedSens () const |
Write face-based sensitivities, if present. More... | |
void | writePointBasedSens () const |
Write point-based sensitivities, if present. More... | |
Protected Attributes | |
const fvMesh & | meshShape_ |
word | surfaceFieldSuffix_ |
bool | writeAllSurfaceFiles_ |
labelHashSet | sensitivityPatchIDs_ |
autoPtr< boundaryVectorField > | wallFaceSensVecPtr_ |
Wall face sens w.r.t. (x,y.z) More... | |
autoPtr< boundaryScalarField > | wallFaceSensNormalPtr_ |
Wall face sens projected to normal. More... | |
autoPtr< boundaryVectorField > | wallFaceSensNormalVecPtr_ |
Normal sens as vectors. More... | |
autoPtr< pointBoundaryVectorField > | wallPointSensVecPtr_ |
Wall point sens w.r.t. (x,y.z) More... | |
autoPtr< pointBoundaryScalarField > | wallPointSensNormalPtr_ |
Wall point sens projected to normal. More... | |
autoPtr< pointBoundaryVectorField > | wallPointSensNormalVecPtr_ |
Normal sens as vectors. More... | |
Definition at line 63 of file shapeSensitivitiesBase.H.
shapeSensitivitiesBase | ( | const fvMesh & | mesh, |
const dictionary & | dict | ||
) |
Construct from components.
Definition at line 125 of file shapeSensitivitiesBase.C.
|
virtualdefault |
Destructor.
|
protected |
Constructs volField based on boundaryField and writes it.
Definition at line 41 of file shapeSensitivitiesBaseTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), Foam::dimless, Foam::name(), IOobject::NO_READ, IOobject::NO_WRITE, and Foam::Zero.
|
protected |
Constructs pointField based on boundaryField and writes it.
Definition at line 74 of file shapeSensitivitiesBaseTemplates.C.
References GeometricField< Type, PatchField, GeoMesh >::boundaryField(), Foam::dimless, Foam::name(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), IOobject::NO_READ, IOobject::NO_WRITE, and Foam::Zero.
|
protected |
Constructs volField based on boundaryField and writes it.
Definition at line 113 of file shapeSensitivitiesBaseTemplates.C.
References forAll, Foam::name(), IOobject::NO_READ, IOobject::NO_WRITE, and GeometricField< Type, PatchField, GeoMesh >::ref().
|
protected |
Write face-based sensitivities, if present.
Definition at line 43 of file shapeSensitivitiesBase.C.
References shapeSensitivitiesBase::surfaceFieldSuffix_, shapeSensitivitiesBase::wallFaceSensNormalPtr_, shapeSensitivitiesBase::wallFaceSensNormalVecPtr_, shapeSensitivitiesBase::wallFaceSensVecPtr_, and shapeSensitivitiesBase::writeAllSurfaceFiles_.
|
protected |
Write point-based sensitivities, if present.
Definition at line 80 of file shapeSensitivitiesBase.C.
TypeName | ( | "shapeSensitivitiesBase" | ) |
Runtime type information.
const Foam::labelHashSet & sensitivityPatchIDs | ( | ) | const |
Get patch IDs on which sensitivities are computed.
Definition at line 160 of file shapeSensitivitiesBase.C.
void setSensitivityPatchIDs | ( | const labelHashSet & | sensPatchIDs | ) |
Overwrite sensitivityPatchIDs.
Definition at line 167 of file shapeSensitivitiesBase.C.
void clearSensitivities | ( | ) |
Zero sensitivity fields and their constituents.
Definition at line 175 of file shapeSensitivitiesBase.C.
References VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by shapeSensitivities::clearSensitivities(), sensitivitySurface::clearSensitivities(), and sensitivitySurfacePoints::clearSensitivities().
void write | ( | ) |
Write sensitivity fields.
If valid, copies boundaryFields to volFields and writes them.
Definition at line 216 of file shapeSensitivitiesBase.C.
Referenced by shapeSensitivities::write(), sensitivitySurface::write(), and sensitivitySurfacePoints::write().
void setSuffix | ( | const word & | suffix | ) |
Set suffix.
Definition at line 223 of file shapeSensitivitiesBase.C.
Referenced by sensitivitySurface::setSuffixName(), and sensitivitySurfacePoints::setSuffixName().
Foam::tmp< Foam::volVectorField > getWallFaceSensVec | ( | ) |
Get wall face sensitivity vectors field.
Definition at line 230 of file shapeSensitivitiesBase.C.
References Foam::dimless, Foam::endl(), and WarningInFunction.
Foam::tmp< Foam::volScalarField > getWallFaceSensNormal | ( | ) |
Get wall face sensitivity projected to normal field.
Definition at line 261 of file shapeSensitivitiesBase.C.
References Foam::dimless, Foam::endl(), and WarningInFunction.
Foam::tmp< Foam::volVectorField > getWallFaceSensNormalVec | ( | ) |
Get wall face normal sens as vectors field.
Definition at line 291 of file shapeSensitivitiesBase.C.
References Foam::dimless, Foam::endl(), and WarningInFunction.
Foam::tmp< Foam::pointVectorField > getWallPointSensVec | ( | ) |
Get wall point sensitivity vectors field.
Definition at line 323 of file shapeSensitivitiesBase.C.
References volPointInterpolation::interpolate().
Foam::tmp< Foam::pointScalarField > getWallPointSensNormal | ( | ) |
Get wall point sensitivity projected to normal field.
Definition at line 333 of file shapeSensitivitiesBase.C.
References volPointInterpolation::interpolate().
Foam::tmp< Foam::pointVectorField > getWallPointSensNormalVec | ( | ) |
Get wall point sens as vectors field.
Definition at line 343 of file shapeSensitivitiesBase.C.
References volPointInterpolation::interpolate().
|
virtual |
Get wall face sensitivity vectors field.
Definition at line 353 of file shapeSensitivitiesBase.C.
|
virtual |
Get wall face sensitivity projected to normal field.
Definition at line 360 of file shapeSensitivitiesBase.C.
|
virtual |
Get wall face normal sens as vectors field.
Definition at line 367 of file shapeSensitivitiesBase.C.
|
protected |
Definition at line 69 of file shapeSensitivitiesBase.H.
|
protected |
Definition at line 70 of file shapeSensitivitiesBase.H.
Referenced by shapeSensitivitiesBase::writeFaceBasedSens().
|
protected |
Definition at line 71 of file shapeSensitivitiesBase.H.
Referenced by shapeSensitivitiesBase::writeFaceBasedSens().
|
protected |
Definition at line 74 of file shapeSensitivitiesBase.H.
|
protected |
Wall face sens w.r.t. (x,y.z)
Definition at line 83 of file shapeSensitivitiesBase.H.
Referenced by shapeSensitivitiesBase::writeFaceBasedSens().
|
protected |
Wall face sens projected to normal.
Definition at line 86 of file shapeSensitivitiesBase.H.
Referenced by shapeSensitivitiesBase::writeFaceBasedSens().
|
protected |
Normal sens as vectors.
Definition at line 89 of file shapeSensitivitiesBase.H.
Referenced by shapeSensitivitiesBase::writeFaceBasedSens().
|
protected |
Wall point sens w.r.t. (x,y.z)
Definition at line 95 of file shapeSensitivitiesBase.H.
|
protected |
Wall point sens projected to normal.
Definition at line 98 of file shapeSensitivitiesBase.H.
|
protected |
Normal sens as vectors.
Definition at line 101 of file shapeSensitivitiesBase.H.