64 for (label iCP = 0; iCP < nCPs; iCP++)
79 const label nb = boxes[iNURB].getControlPoints().
size();
80 for (label cpI = 0; cpI < nb; ++cpI)
82 const label globalCP = passedCPs + cpI;
88 boxes[iNURB].patchDxDb(patchI, cpI)
107Foam::optMeshMovementVolumetricBSplinesExternalMotionSolver::
108optMeshMovementVolumetricBSplinesExternalMotionSolver
134 cpMovement_(volBSplinesBase_.getTotalControlPointsNumber(),
Zero)
143 computeBoundaryMovement(correction_);
146 displMethodPtr_->setMotionField(dx_);
151 volBSplinesBase_.moveControlPoints(cpMovement_);
154 volBSplinesBase_.writeControlPoints();
170 scalar maxDisplacement =
gMax(
mag(dx_.primitiveField()));
173 Info<<
"maxAllowedDisplacement/maxDisplacement \t"
174 << getMaxAllowedDisplacement() <<
"/" << maxDisplacement <<
endl;
175 scalar eta = getMaxAllowedDisplacement() / maxDisplacement;
176 Info<<
"Setting eta value to " << eta <<
endl;
186 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.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
label size() const noexcept
The number of elements in the list.
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 moved based ...
vectorField cpMovement_
Movement of control points.
void moveMesh()
Calculates surface mesh movement.
virtual labelList getActiveDesignVariables() const
Return active design variables.
void computeBoundaryMovement(const scalarField &correction)
pointVectorField dx_
Boundary movement due to change of NURBS control points.
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.
labelList patchIDs_
IDs of patches to be moved.
Mesh representing a set of points created from polyMesh.
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.
label getTotalControlPointsNumber() const
Get cumulative number of control points from all boxes.
void boundControlPointMovement(vectorField &controlPointsMovement) const
Bound control points movement.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const dimensionSet dimless
Dimensionless.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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 > &)
Type gMax(const FieldField< Field, Type > &f)
#define forAll(list, i)
Loop across all elements in list.
A non-counting (dummy) refCount.