Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict. Useful for various sensitivities and optMeshMovement classes. More...
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 NURBS3DVolume & | box (const label boxI) const |
Get const reference to a specific box. More... | |
NURBS3DVolume & | boxRef (const label boxI) |
Get non-const reference to a specific box. More... | |
const vectorField & | getControlPoints (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 labelList & | getActiveDesignVariables () 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... | |
![]() | |
MeshObject (const fvMesh &mesh) | |
Construct on Mesh type. More... | |
virtual | ~MeshObject ()=default |
Destructor. More... | |
const fvMesh & | mesh () const |
virtual bool | writeData (Ostream &os) const |
Protected Attributes | |
PtrList< NURBS3DVolume > | volume_ |
List with volumetric B-splines boxes. More... | |
labelList | activeDesignVariables_ |
Active design variables numbering for all boxes. More... | |
![]() | |
const fvMesh & | mesh_ |
Additional Inherited Members | |
![]() | |
static const volBSplinesBase & | New (const fvMesh &mesh, Args &&... args) |
Get existing or create a new MeshObject. More... | |
static bool | Delete (const fvMesh &mesh) |
Static destructor. More... | |
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
Definition at line 59 of file volBSplinesBase.H.
volBSplinesBase | ( | const fvMesh & | mesh | ) |
Construct from components.
Definition at line 43 of file volBSplinesBase.C.
References volBSplinesBase::activeDesignVariables_, TimePaths::constant(), forAll, volBSplinesBase::getStartCpID(), volBSplinesBase::getTotalControlPointsNumber(), dictionary::isDict(), MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >::mesh(), IOobject::MUST_READ_IF_MODIFIED, Time::New(), IOobject::NO_WRITE, List< T >::setSize(), UList< T >::size(), dictionary::subDict(), fvMesh::time(), dictionary::toc(), and volBSplinesBase::volume_.
|
virtualdefault |
Destructor.
TypeName | ( | "volBSplinesBase" | ) |
Runtime type information.
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_.
PtrList< NURBS3DVolume > & boxesRef | ( | ) |
Get non-const reference to the vol. B-splines boxes.
Definition at line 121 of file volBSplinesBase.C.
References volBSplinesBase::volume_.
Referenced by sensitivityVolBSplines::assembleSensitivities(), sensitivityVolBSplinesFI::assembleSensitivities(), sensitivityVolBSplines::computeBCContributions(), optMeshMovementVolumetricBSplinesExternalMotionSolver::computeBoundaryMovement(), sensitivityVolBSplines::computeObjectiveContributions(), optMeshMovementVolumetricBSplines::optMeshMovementVolumetricBSplines(), sensitivityVolBSplines::write(), and sensitivityVolBSplinesFI::write().
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_.
NURBS3DVolume & boxRef | ( | const label | boxI | ) |
Get non-const reference to a specific box.
Definition at line 133 of file volBSplinesBase.C.
References volBSplinesBase::volume_.
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().
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_.
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().
label getNumberOfBoxes | ( | ) | const |
Get number of boxes.
Definition at line 169 of file volBSplinesBase.C.
Referenced by volBSplinesBase::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().
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().
const Foam::labelList & getActiveDesignVariables | ( | ) | const |
Get active design variables.
Definition at line 208 of file volBSplinesBase.C.
References volBSplinesBase::activeDesignVariables_.
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.
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().
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.
void writeControlPoints | ( | ) | const |
Write control points to constant and optimisation folders.
Definition at line 314 of file volBSplinesBase.C.
|
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.
|
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.
|
protected |
List with volumetric B-splines boxes.
No overlapping is supported
Definition at line 69 of file volBSplinesBase.H.
Referenced by volBSplinesBase::box(), volBSplinesBase::boxes(), volBSplinesBase::boxesRef(), volBSplinesBase::boxRef(), volBSplinesBase::getAllControlPoints(), volBSplinesBase::getControlPoints(), volBSplinesBase::getStartCpID(), and volBSplinesBase::volBSplinesBase().
|
protected |
Active design variables numbering for all boxes.
Definition at line 72 of file volBSplinesBase.H.
Referenced by volBSplinesBase::getActiveDesignVariables(), and volBSplinesBase::volBSplinesBase().