volBSplinesBase Class Reference

Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes. More...

Inheritance diagram for volBSplinesBase:
[legend]
Collaboration diagram for volBSplinesBase:
[legend]

Public Member Functions

 TypeName ("volBSplinesBase")
 Runtime type information. More...
 
 volBSplinesBase (const fvMesh &mesh)
 Construct from components. More...
 
virtual ~volBSplinesBase ()=default
 Destructor. More...
 
const PtrList< NURBS3DVolume > & boxes () const
 Get const reference to the vol. B-splines boxes. More...
 
PtrList< NURBS3DVolume > & boxesRef ()
 Get non-const reference to the vol. B-splines boxes. More...
 
const NURBS3DVolumebox (const label boxI) const
 Get const reference to a specific box. More...
 
NURBS3DVolumeboxRef (const label boxI)
 Get non-const reference to a specific box. More...
 
const vectorFieldgetControlPoints (const label &iNURB) const
 Get reference to control points. More...
 
vectorField getAllControlPoints () const
 Get control points from all boxes. More...
 
label getTotalControlPointsNumber () const
 Get cumulative number of control points from all boxes. More...
 
label getNumberOfBoxes () const
 Get number of boxes. More...
 
labelList getStartCpID () const
 Get start CP ID for each box. More...
 
label findBoxID (const label cpI) const
 Find box of certain control point. More...
 
const labelListgetActiveDesignVariables () const
 Get active design variables. More...
 
scalar computeMaxBoundaryDisplacement (const vectorField &controlPointsMovement, const labelList &patchesToBeMoved)
 
void boundControlPointMovement (vectorField &controlPointsMovement) const
 Bound control points movement. More...
 
void moveControlPoints (const vectorField &controlPointsMovement)
 Move control points. No effect on mesh. More...
 
void writeControlPoints () const
 Write control points to constant and optimisation folders. More...
 
virtual bool movePoints ()
 Dummy function required by MeshObject. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Dummy function required by MeshObject. More...
 
- Public Member Functions inherited from MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >
 MeshObject (const fvMesh &mesh)
 Construct on Mesh type. More...
 
virtual ~MeshObject ()=default
 Destructor. More...
 
const fvMeshmesh () const
 
virtual bool writeData (Ostream &os) const
 

Protected Attributes

PtrList< NURBS3DVolumevolume_
 List with volumetric B-splines boxes. More...
 
labelList activeDesignVariables_
 Active design variables numbering for all boxes. More...
 
- Protected Attributes inherited from MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >
const fvMeshmesh_
 

Additional Inherited Members

- Static Public Member Functions inherited from MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >
static const volBSplinesBaseNew (const fvMesh &mesh, Args &&... args)
 Get existing or create a new MeshObject. More...
 
static bool Delete (const fvMesh &mesh)
 Static destructor. More...
 

Detailed Description

Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes.

Derives from MeshObject so that all instances know and update the same control points and parametric coordinates are computed only once

Source files

Definition at line 59 of file volBSplinesBase.H.

Constructor & Destructor Documentation

◆ volBSplinesBase()

◆ ~volBSplinesBase()

virtual ~volBSplinesBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "volBSplinesBase"  )

Runtime type information.

◆ boxes()

const PtrList< NURBS3DVolume > & boxes ( ) const

Get const reference to the vol. B-splines boxes.

Definition at line 115 of file volBSplinesBase.C.

References volBSplinesBase::volume_.

◆ boxesRef()

◆ box()

const NURBS3DVolume & box ( const label  boxI) const

Get const reference to a specific box.

Definition at line 127 of file volBSplinesBase.C.

References volBSplinesBase::volume_.

◆ boxRef()

NURBS3DVolume & boxRef ( const label  boxI)

Get non-const reference to a specific box.

Definition at line 133 of file volBSplinesBase.C.

References volBSplinesBase::volume_.

◆ getControlPoints()

const vectorField & getControlPoints ( const label &  iNURB) const

Get reference to control points.

Definition at line 139 of file volBSplinesBase.C.

References volBSplinesBase::volume_.

Referenced by volBSplinesBase::getAllControlPoints().

Here is the caller graph for this function:

◆ getAllControlPoints()

vectorField getAllControlPoints ( ) const

Get control points from all boxes.

Definition at line 145 of file volBSplinesBase.C.

References List< T >::append(), forAll, volBSplinesBase::getControlPoints(), and volBSplinesBase::volume_.

Here is the call graph for this function:

◆ getTotalControlPointsNumber()

Foam::label getTotalControlPointsNumber ( ) const

Get cumulative number of control points from all boxes.

Definition at line 157 of file volBSplinesBase.C.

References forAll.

Referenced by optMeshMovementVolumetricBSplinesExternalMotionSolver::computeBoundaryMovement(), sensitivityVolBSplines::sensitivityVolBSplines(), sensitivityVolBSplinesFI::sensitivityVolBSplinesFI(), and volBSplinesBase::volBSplinesBase().

Here is the caller graph for this function:

◆ getNumberOfBoxes()

label getNumberOfBoxes ( ) const

Get number of boxes.

Definition at line 169 of file volBSplinesBase.C.

Referenced by volBSplinesBase::getStartCpID().

Here is the caller graph for this function:

◆ getStartCpID()

labelList getStartCpID ( ) const

Get start CP ID for each box.

Definition at line 175 of file volBSplinesBase.C.

References forAll, volBSplinesBase::getNumberOfBoxes(), and volBSplinesBase::volume_.

Referenced by volBSplinesBase::findBoxID(), and volBSplinesBase::volBSplinesBase().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findBoxID()

label findBoxID ( const label  cpI) const

Find box of certain control point.

Definition at line 190 of file volBSplinesBase.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, volBSplinesBase::getStartCpID(), and UList< T >::size().

Here is the call graph for this function:

◆ getActiveDesignVariables()

const Foam::labelList & getActiveDesignVariables ( ) const

Get active design variables.

Definition at line 208 of file volBSplinesBase.C.

References volBSplinesBase::activeDesignVariables_.

◆ computeMaxBoundaryDisplacement()

Foam::scalar computeMaxBoundaryDisplacement ( const vectorField controlPointsMovement,
const labelList patchesToBeMoved 
)

Get max boundary displacement for a given control-points movement

Definition at line 214 of file volBSplinesBase.C.

References forAll, Foam::max(), and Foam::Zero.

Here is the call graph for this function:

◆ boundControlPointMovement()

void boundControlPointMovement ( vectorField controlPointsMovement) const

Bound control points movement.

Definition at line 251 of file volBSplinesBase.C.

References forAll, and Foam::Zero.

Referenced by sensitivityVolBSplines::assembleSensitivities(), sensitivityVolBSplinesFI::assembleSensitivities(), sensitivityVolBSplines::computeBCContributions(), optMeshMovementVolumetricBSplinesExternalMotionSolver::computeBoundaryMovement(), and sensitivityVolBSplines::computeObjectiveContributions().

Here is the caller graph for this function:

◆ moveControlPoints()

void moveControlPoints ( const vectorField controlPointsMovement)

Move control points. No effect on mesh.

Definition at line 283 of file volBSplinesBase.C.

References forAll, and Foam::Zero.

◆ writeControlPoints()

void writeControlPoints ( ) const

Write control points to constant and optimisation folders.

Definition at line 314 of file volBSplinesBase.C.

◆ movePoints()

bool movePoints ( )
virtual

Dummy function required by MeshObject.

Since this class is going to initiate the mesh movement, there is nothing more to be done when the mesh points change

Definition at line 323 of file volBSplinesBase.C.

◆ updateMesh()

void updateMesh ( const mapPolyMesh )
virtual

Dummy function required by MeshObject.

Since this class is going to initiate the mesh movement, there is nothing more to be done when the mesh points change

Definition at line 330 of file volBSplinesBase.C.

Member Data Documentation

◆ volume_

◆ activeDesignVariables_

labelList activeDesignVariables_
protected

Active design variables numbering for all boxes.

Definition at line 72 of file volBSplinesBase.H.

Referenced by volBSplinesBase::getActiveDesignVariables(), and volBSplinesBase::volBSplinesBase().


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