55 const label nControlPoints(
correction.size()/3);
58 for (label iCP = 0; iCP < nControlPoints; ++iCP)
84 cpsInit_(volBSplinesBase_.getNumberOfBoxes())
92 boxes[boxI].getControlPoints().size()
94 cpsInit_[boxI] = boxes[boxI].getControlPoints();
104 vectorField cpMovement = controlPointMovement(correction_);
107 displMethodPtr_->setControlField(cpMovement);
120 cpsInit_[boxI] = boxes[boxI].getControlPoints();
131 <<
"optMeshMovementVolumetricBSplines:: resetting control points"
137 boxes[boxI].setControlPoints(cpsInit_[boxI]);
148 const scalar maxDisplacement
150 volBSplinesBase_.computeMaxBoundaryDisplacement
157 Info<<
"maxAllowedDisplacement/maxDisplacement of boundary\t"
158 << getMaxAllowedDisplacement() <<
"/" << maxDisplacement <<
endl;
159 scalar eta = getMaxAllowedDisplacement() / maxDisplacement;
160 Info<<
"Setting eta value to " << eta <<
endl;
169 return volBSplinesBase_.getActiveDesignVariables();
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
void setSize(const label n)
Alias for resize()
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
Converts NURBS volume control points update to actual mesh movement. Internal points are also moved b...
virtual void resetDesignVariables()
Reset to starting point of line search.
void moveMesh()
Calculates surface mesh movement.
virtual labelList getActiveDesignVariables() const
Return active design variables.
vectorField controlPointMovement(const scalarField &correction)
List< vectorField > cpsInit_
Backup of initial control points. Useful for line-search.
virtual void storeDesignVariables()
virtual scalar computeEta(const scalarField &correction)
Compute eta value based on max displacement.
volBSplinesBase & volBSplinesBase_
Reference to underlaying volumetric B-Splines morpher.
Abstract base class for translating an update of the design variables into mesh movement.
virtual void resetDesignVariables()
Reset to starting point of line search.
autoPtr< displacementMethod > displMethodPtr_
virtual void storeDesignVariables()
Class constructing a number of volumetric B-Splines boxes, read from dynamicMeshDict....
PtrList< NURBS3DVolume > & boxesRef()
Get non-const reference to the vol. B-splines boxes.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define DebugInfo
Report an information message using Foam::Info.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
#define forAll(list, i)
Loop across all elements in list.