shapeSensitivitiesBase Class Reference
Collaboration diagram for shapeSensitivitiesBase:
[legend]

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...
 

Detailed Description

Definition at line 63 of file shapeSensitivitiesBase.H.

Constructor & Destructor Documentation

◆ shapeSensitivitiesBase()

shapeSensitivitiesBase ( const fvMesh &  mesh,
const dictionary &  dict 
)

Construct from components.

Definition at line 125 of file shapeSensitivitiesBase.C.

◆ ~shapeSensitivitiesBase()

virtual ~shapeSensitivitiesBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ constructAndWriteSensitivityField()

void constructAndWriteSensitivityField ( const autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > &  sensFieldPtr,
const word &  name 
) const
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.

Here is the call graph for this function:

◆ constructAndWriteSensitivtyPointField()

void constructAndWriteSensitivtyPointField ( const autoPtr< List< Field< Type >>> &  sensFieldPtr,
const word &  name 
) const
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.

Here is the call graph for this function:

◆ constructVolSensitivtyField()

tmp< GeometricField< Type, fvPatchField, volMesh > > constructVolSensitivtyField ( const autoPtr< typename GeometricField< Type, fvPatchField, volMesh >::Boundary > &  sensFieldPtr,
const word &  name 
) const
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().

Here is the call graph for this function:

◆ writeFaceBasedSens()

◆ writePointBasedSens()

void writePointBasedSens ( ) const
protected

Write point-based sensitivities, if present.

Definition at line 80 of file shapeSensitivitiesBase.C.

◆ TypeName()

TypeName ( "shapeSensitivitiesBase"  )

Runtime type information.

◆ sensitivityPatchIDs()

const Foam::labelHashSet & sensitivityPatchIDs ( ) const

Get patch IDs on which sensitivities are computed.

Definition at line 160 of file shapeSensitivitiesBase.C.

◆ setSensitivityPatchIDs()

void setSensitivityPatchIDs ( const labelHashSet &  sensPatchIDs)

Overwrite sensitivityPatchIDs.

Definition at line 167 of file shapeSensitivitiesBase.C.

◆ clearSensitivities()

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().

Here is the caller graph for this function:

◆ write()

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().

Here is the caller graph for this function:

◆ setSuffix()

void setSuffix ( const word &  suffix)

Set suffix.

Definition at line 223 of file shapeSensitivitiesBase.C.

Referenced by sensitivitySurface::setSuffixName(), and sensitivitySurfacePoints::setSuffixName().

Here is the caller graph for this function:

◆ getWallFaceSensVec()

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.

Here is the call graph for this function:

◆ getWallFaceSensNormal()

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.

Here is the call graph for this function:

◆ getWallFaceSensNormalVec()

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.

Here is the call graph for this function:

◆ getWallPointSensVec()

Foam::tmp< Foam::pointVectorField > getWallPointSensVec ( )

Get wall point sensitivity vectors field.

Uses volPointInterpolation

Definition at line 323 of file shapeSensitivitiesBase.C.

References volPointInterpolation::interpolate().

Here is the call graph for this function:

◆ getWallPointSensNormal()

Foam::tmp< Foam::pointScalarField > getWallPointSensNormal ( )

Get wall point sensitivity projected to normal field.

Uses volPointInterpolation

Definition at line 333 of file shapeSensitivitiesBase.C.

References volPointInterpolation::interpolate().

Here is the call graph for this function:

◆ getWallPointSensNormalVec()

Foam::tmp< Foam::pointVectorField > getWallPointSensNormalVec ( )

Get wall point sens as vectors field.

Uses volPointInterpolation

Definition at line 343 of file shapeSensitivitiesBase.C.

References volPointInterpolation::interpolate().

Here is the call graph for this function:

◆ getWallFaceSensVecBoundary()

const Foam::boundaryVectorField & getWallFaceSensVecBoundary ( ) const
virtual

Get wall face sensitivity vectors field.

Definition at line 353 of file shapeSensitivitiesBase.C.

◆ getWallFaceSensNormalBoundary()

const Foam::boundaryScalarField & getWallFaceSensNormalBoundary ( ) const
virtual

Get wall face sensitivity projected to normal field.

Definition at line 360 of file shapeSensitivitiesBase.C.

◆ getWallFaceSensNormalVecBoundary()

const Foam::boundaryVectorField & getWallFaceSensNormalVecBoundary ( ) const
virtual

Get wall face normal sens as vectors field.

Definition at line 367 of file shapeSensitivitiesBase.C.

Member Data Documentation

◆ meshShape_

const fvMesh& meshShape_
protected

Definition at line 69 of file shapeSensitivitiesBase.H.

◆ surfaceFieldSuffix_

word surfaceFieldSuffix_
protected

Definition at line 70 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ writeAllSurfaceFiles_

bool writeAllSurfaceFiles_
protected

Definition at line 71 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ sensitivityPatchIDs_

labelHashSet sensitivityPatchIDs_
protected

Definition at line 74 of file shapeSensitivitiesBase.H.

◆ wallFaceSensVecPtr_

autoPtr<boundaryVectorField> wallFaceSensVecPtr_
protected

Wall face sens w.r.t. (x,y.z)

Definition at line 83 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ wallFaceSensNormalPtr_

autoPtr<boundaryScalarField> wallFaceSensNormalPtr_
protected

Wall face sens projected to normal.

Definition at line 86 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ wallFaceSensNormalVecPtr_

autoPtr<boundaryVectorField> wallFaceSensNormalVecPtr_
protected

Normal sens as vectors.

Definition at line 89 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ wallPointSensVecPtr_

autoPtr<pointBoundaryVectorField> wallPointSensVecPtr_
protected

Wall point sens w.r.t. (x,y.z)

Definition at line 95 of file shapeSensitivitiesBase.H.

◆ wallPointSensNormalPtr_

autoPtr<pointBoundaryScalarField> wallPointSensNormalPtr_
protected

Wall point sens projected to normal.

Definition at line 98 of file shapeSensitivitiesBase.H.

◆ wallPointSensNormalVecPtr_

autoPtr<pointBoundaryVectorField> wallPointSensNormalVecPtr_
protected

Normal sens as vectors.

Definition at line 101 of file shapeSensitivitiesBase.H.


The documentation for this class was generated from the following files: