Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
shapeSensitivitiesBase Class Reference
Collaboration diagram for shapeSensitivitiesBase:
Collaboration graph
[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 labelHashSetsensitivityPatchIDs () 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< volVectorFieldgetWallFaceSensVec ()
 Get wall face sensitivity vectors field. More...
 
tmp< volScalarFieldgetWallFaceSensNormal ()
 Get wall face sensitivity projected to normal field. More...
 
tmp< volVectorFieldgetWallFaceSensNormalVec ()
 Get wall face normal sens as vectors field. More...
 
tmp< pointVectorFieldgetWallPointSensVec ()
 Get wall point sensitivity vectors field. More...
 
tmp< pointScalarFieldgetWallPointSensNormal ()
 Get wall point sensitivity projected to normal field. More...
 
tmp< pointVectorFieldgetWallPointSensNormalVec ()
 Get wall point sens as vectors field. More...
 
virtual const boundaryVectorFieldgetWallFaceSensVecBoundary () const
 Get wall face sensitivity vectors field. More...
 
virtual const boundaryScalarFieldgetWallFaceSensNormalBoundary () const
 Get wall face sensitivity projected to normal field. More...
 
virtual const boundaryVectorFieldgetWallFaceSensNormalVecBoundary () 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 fvMeshmeshShape_
 
word surfaceFieldSuffix_
 
bool writeAllSurfaceFiles_
 
labelHashSet sensitivityPatchIDs_
 
autoPtr< boundaryVectorFieldwallFaceSensVecPtr_
 Wall face sens w.r.t. (x,y.z) More...
 
autoPtr< boundaryScalarFieldwallFaceSensNormalPtr_
 Wall face sens projected to normal. More...
 
autoPtr< boundaryVectorFieldwallFaceSensNormalVecPtr_
 Normal sens as vectors. More...
 
autoPtr< pointBoundaryVectorFieldwallPointSensVecPtr_
 Wall point sens w.r.t. (x,y.z) More...
 
autoPtr< pointBoundaryScalarFieldwallPointSensNormalPtr_
 Wall point sens projected to normal. More...
 
autoPtr< pointBoundaryVectorFieldwallPointSensNormalVecPtr_
 Normal sens as vectors. More...
 

Detailed Description

Definition at line 59 of file shapeSensitivitiesBase.H.

Constructor & Destructor Documentation

◆ shapeSensitivitiesBase()

shapeSensitivitiesBase ( const fvMesh mesh,
const dictionary dict 
)

Construct from components.

Definition at line 118 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 34 of file shapeSensitivitiesBaseTemplates.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), Foam::dimless, Foam::name(), IOobjectOption::NO_READ, IOobjectOption::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

◆ 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 106 of file shapeSensitivitiesBaseTemplates.C.

References forAll, Foam::name(), IOobjectOption::NO_READ, IOobjectOption::NO_WRITE, and GeometricField< Type, PatchField, GeoMesh >::ref().

Here is the call graph for this function:

◆ writeFaceBasedSens()

void writeFaceBasedSens ( ) const
protected

◆ writePointBasedSens()

void writePointBasedSens ( ) const
protected

Write point-based sensitivities, if present.

Definition at line 73 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 153 of file shapeSensitivitiesBase.C.

◆ setSensitivityPatchIDs()

void setSensitivityPatchIDs ( const labelHashSet sensPatchIDs)

Overwrite sensitivityPatchIDs.

Definition at line 160 of file shapeSensitivitiesBase.C.

◆ clearSensitivities()

void clearSensitivities ( )

Zero sensitivity fields and their constituents.

Definition at line 168 of file shapeSensitivitiesBase.C.

Referenced by shapeSensitivities::clearSensitivities(), sensitivitySurfacePoints::clearSensitivities(), and sensitivitySurface::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 209 of file shapeSensitivitiesBase.C.

Referenced by shapeSensitivities::write(), sensitivitySurfacePoints::write(), and sensitivitySurface::write().

Here is the caller graph for this function:

◆ setSuffix()

void setSuffix ( const word suffix)

Set suffix.

Definition at line 216 of file shapeSensitivitiesBase.C.

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

Here is the caller graph for this function:

◆ getWallFaceSensVec()

Foam::tmp< Foam::volVectorField > getWallFaceSensVec ( )

Get wall face sensitivity vectors field.

Definition at line 223 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 254 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 284 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 316 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 326 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 336 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 346 of file shapeSensitivitiesBase.C.

◆ getWallFaceSensNormalBoundary()

const Foam::boundaryScalarField & getWallFaceSensNormalBoundary ( ) const
virtual

Get wall face sensitivity projected to normal field.

Definition at line 353 of file shapeSensitivitiesBase.C.

◆ getWallFaceSensNormalVecBoundary()

const Foam::boundaryVectorField & getWallFaceSensNormalVecBoundary ( ) const
virtual

Get wall face normal sens as vectors field.

Definition at line 360 of file shapeSensitivitiesBase.C.

Member Data Documentation

◆ meshShape_

const fvMesh& meshShape_
protected

Definition at line 65 of file shapeSensitivitiesBase.H.

◆ surfaceFieldSuffix_

word surfaceFieldSuffix_
protected

Definition at line 66 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ writeAllSurfaceFiles_

bool writeAllSurfaceFiles_
protected

Definition at line 67 of file shapeSensitivitiesBase.H.

Referenced by shapeSensitivitiesBase::writeFaceBasedSens().

◆ sensitivityPatchIDs_

labelHashSet sensitivityPatchIDs_
protected

Definition at line 70 of file shapeSensitivitiesBase.H.

◆ wallFaceSensVecPtr_

autoPtr<boundaryVectorField> wallFaceSensVecPtr_
protected

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

Definition at line 81 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 91 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 99 of file shapeSensitivitiesBase.H.

◆ wallPointSensNormalPtr_

autoPtr<pointBoundaryScalarField> wallPointSensNormalPtr_
protected

Wall point sens projected to normal.

Definition at line 104 of file shapeSensitivitiesBase.H.

◆ wallPointSensNormalVecPtr_

autoPtr<pointBoundaryVectorField> wallPointSensNormalVecPtr_
protected

Normal sens as vectors.

Definition at line 109 of file shapeSensitivitiesBase.H.


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