NURBS3DVolume morpher. Includes support functions for gradient computations Base class providing support for different coordinate systems. More...
Public Member Functions | |
TypeName ("NURBS3DVolume") | |
declareRunTimeSelectionTable (autoPtr, NURBS3DVolume, dictionary,(const dictionary &dict, const fvMesh &mesh, bool computeParamCoors),(dict, mesh, computeParamCoors)) | |
NURBS3DVolume (const dictionary &dict, const fvMesh &mesh, bool computeParamCoors=true) | |
NURBS3DVolume (const NURBS3DVolume &) | |
virtual | ~NURBS3DVolume ()=default |
vector | volumeDerivativeU (const scalar u, const scalar v, const scalar w) const |
vector | volumeDerivativeV (const scalar u, const scalar v, const scalar w) const |
vector | volumeDerivativeW (const scalar u, const scalar v, const scalar w) const |
tensor | JacobianUVW (const vector &u) const |
scalar | volumeDerivativeCP (const vector &u, const label cpI) const |
vectorField | computeControlPointSensitivities (const pointVectorField &pointSens, const labelList &sensitivityPatchIDs) |
vectorField | computeControlPointSensitivities (const volVectorField &faceSens, const labelList &sensitivityPatchIDs) |
vectorField | computeControlPointSensitivities (const boundaryVectorField &faceSens, const labelList &sensitivityPatchIDs) |
vector | computeControlPointSensitivities (const vectorField &faceSens, const label patchI, const label cpI) |
tmp< tensorField > | dndbBasedSensitivities (const label patchI, const label cpI, bool DimensionedNormalSens=true) |
tmp< tensorField > | patchDxDb (const label patchI, const label cpI) |
tmp< tensorField > | patchDxDbFace (const label patchI, const label cpI) |
tmp< vectorField > | coordinates (const vectorField &uVector) const |
vector | coordinates (const vector &uVector) const |
tmp< vectorField > | computeNewPoints (const vectorField &controlPointsMovement) |
tmp< vectorField > | computeNewBoundaryPoints (const vectorField &controlPointsMovement, const labelList &patchesToBeMoved) |
label | getCPID (const label i, const label j, const label k) const |
void | setControlPoints (const vectorField &newCps) |
void | boundControlPointMovement (vectorField &controlPointsMovement) |
scalar | computeMaxBoundaryDisplacement (const vectorField &controlPointsMovement, const labelList &patchesToBeMoved) |
tmp< vectorField > | getPointsInBox () |
const labelList & | getMap () |
const labelList & | getReverseMap () |
const pointVectorField & | getParametricCoordinates () |
tmp< pointTensorField > | getDxDb (const label cpI) |
tmp< volTensorField > | getDxCellsDb (const label cpI) |
label | nUSymmetry () const |
label | nVSymmetry () const |
label | nWSymmetry () const |
const word & | name () const |
const boolList & | getActiveCPs () const |
const boolList & | getActiveDesignVariables () const |
const vectorField & | getControlPoints () const |
vectorField & | getControlPoints () |
bool | confineUMovement () const |
bool | confineVMovement () const |
bool | confineWMovement () const |
const NURBSbasis & | basisU () const |
const NURBSbasis & | basisV () const |
const NURBSbasis & | basisW () const |
const fvMesh & | mesh () const |
const dictionary & | dict () const |
void | writeCps (const fileName &="cpsFile", const bool transform=true) const |
void | writeCpsInDict () const |
void | write () const |
Static Public Member Functions | |
static autoPtr< NURBS3DVolume > | New (const dictionary &dict, const fvMesh &mesh, bool computeParamCoors=true) |
Protected Types | |
typedef List< boolVector > | boolVectorList |
Protected Member Functions | |
void | findPointsInBox (const vectorField &meshPoints) |
void | computeParametricCoordinates (const vectorField &points) |
void | computeParametricCoordinates (tmp< vectorField > tPoints) |
bool | bound (vector &vec, scalar minValue=1e-7, scalar maxValue=0.999999) |
void | determineActiveDesignVariablesAndPoints () |
void | confineBoundaryControlPoints () |
void | continuityRealatedConfinement () |
void | confineControlPointsDirections () |
void | confineControlPoint (const label cpI) |
void | confineControlPoint (const label cpI, const boolVector &) |
void | makeFolders () |
virtual vector | transformPointToCartesian (const vector &localCoordinates) const =0 |
virtual tensor | transformationTensorDxDb (label globalPointIndex)=0 |
virtual void | updateLocalCoordinateSystem (const vectorField &cartesianPoints)=0 |
NURBS3DVolume morpher. Includes support functions for gradient computations Base class providing support for different coordinate systems.
For a short introduction to a volumetric B-Splines morpher and its use in shape optimisation Papoutsis-Kiachagias, E., Magoulas, N., Mueller, J., Othmer, C., & Giannakoglou, K. (2015). Noise reduction in car aerodynamics using a surrogate objective function and the continuous adjoint method with wall functions. Computers & Fluids, 122, 223-232. http://doi.org/10.1016/j.compfluid.2015.09.002
Definition at line 68 of file NURBS3DVolume.H.
|
protected |
Definition at line 74 of file NURBS3DVolume.H.
NURBS3DVolume | ( | const dictionary & | dict, |
const fvMesh & | mesh, | ||
bool | computeParamCoors = true |
||
) |
Definition at line 621 of file NURBS3DVolume.C.
NURBS3DVolume | ( | const NURBS3DVolume & | ) |
|
virtualdefault |
|
protected |
Definition at line 43 of file NURBS3DVolume.C.
References Field::component(), Foam::BitOps::count(), NURBS3DVolume::cps_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, NURBS3DVolume::mapPtr_, Foam::max(), Foam::min(), Foam::reduce(), NURBS3DVolume::reverseMapPtr_, List::setSize(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
protected |
Definition at line 98 of file NURBS3DVolume.C.
References IOobject::AUTO_WRITE, Foam::bound(), Foam::cmptMag(), VectorSpace::component(), coordinates(), Foam::diff(), Foam::dimless, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::inv(), Foam::mag(), Foam::max(), Foam::min(), MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), IOobject::NO_READ, points, Foam::reduce(), tmp::ref(), List::setSize(), WarningInFunction, VectorSpace< Vector< scalar >, scalar, 3 >::zero, and Foam::Zero.
|
protected |
Definition at line 332 of file NURBS3DVolume.C.
References points.
Definition at line 342 of file NURBS3DVolume.C.
References maxValue, minValue, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
protected |
Definition at line 394 of file NURBS3DVolume.C.
References forAll.
|
protected |
Definition at line 426 of file NURBS3DVolume.C.
|
protected |
Definition at line 472 of file NURBS3DVolume.C.
References forAll.
|
protected |
Definition at line 567 of file NURBS3DVolume.C.
|
protected |
Definition at line 578 of file NURBS3DVolume.C.
References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
|
protected |
Definition at line 597 of file NURBS3DVolume.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, boolVector::x(), boolVector::y(), and boolVector::z().
|
protected |
Definition at line 385 of file NURBS3DVolume.C.
References UPstream::master(), and Foam::mkDir().
|
protectedpure virtual |
Implemented in NURBS3DVolumeCylindrical, and NURBS3DVolumeCartesian.
|
protectedpure virtual |
Implemented in NURBS3DVolumeCylindrical, and NURBS3DVolumeCartesian.
|
protectedpure virtual |
Implemented in NURBS3DVolumeCylindrical, and NURBS3DVolumeCartesian.
TypeName | ( | "NURBS3DVolume" | ) |
declareRunTimeSelectionTable | ( | autoPtr | , |
NURBS3DVolume | , | ||
dictionary | , | ||
(const dictionary &dict, const fvMesh &mesh, bool computeParamCoors) | , | ||
(dict, mesh, computeParamCoors) | |||
) |
|
static |
Definition at line 743 of file NURBS3DVolume.C.
References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), Foam::Info, and mesh.
Referenced by volBSplinesBase::volBSplinesBase().
Foam::vector volumeDerivativeU | ( | const scalar | u, |
const scalar | v, | ||
const scalar | w | ||
) | const |
Definition at line 773 of file NURBS3DVolume.C.
References Foam::Zero.
Foam::vector volumeDerivativeV | ( | const scalar | u, |
const scalar | v, | ||
const scalar | w | ||
) | const |
Definition at line 810 of file NURBS3DVolume.C.
References Foam::Zero.
Foam::vector volumeDerivativeW | ( | const scalar | u, |
const scalar | v, | ||
const scalar | w | ||
) | const |
Definition at line 848 of file NURBS3DVolume.C.
References Foam::Zero.
Foam::tensor JacobianUVW | ( | const vector & | u | ) | const |
Definition at line 886 of file NURBS3DVolume.C.
References VectorSpace::component(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.
Foam::scalar volumeDerivativeCP | ( | const vector & | u, |
const label | cpI | ||
) | const |
Definition at line 915 of file NURBS3DVolume.C.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Foam::vectorField computeControlPointSensitivities | ( | const pointVectorField & | pointSens, |
const labelList & | sensitivityPatchIDs | ||
) |
Definition at line 948 of file NURBS3DVolume.C.
References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), Foam::foamVersion::patch, and Foam::Zero.
Foam::vectorField computeControlPointSensitivities | ( | const volVectorField & | faceSens, |
const labelList & | sensitivityPatchIDs | ||
) |
Definition at line 999 of file NURBS3DVolume.C.
References GeometricField::boundaryField().
Foam::vectorField computeControlPointSensitivities | ( | const boundaryVectorField & | faceSens, |
const labelList & | sensitivityPatchIDs | ||
) |
Definition at line 1014 of file NURBS3DVolume.C.
References forAll, Pstream::listCombineGather(), Pstream::listCombineScatter(), deltaBoundary::makeFaceCentresAndAreas_d(), Foam::foamVersion::patch, face::points(), and Foam::Zero.
Foam::vector computeControlPointSensitivities | ( | const vectorField & | faceSens, |
const label | patchI, | ||
const label | cpI | ||
) |
Definition at line 1085 of file NURBS3DVolume.C.
References forAll, deltaBoundary::makeFaceCentresAndAreas_d(), Foam::foamVersion::patch, face::points(), Foam::reduce(), and Foam::Zero.
Foam::tmp< Foam::tensorField > dndbBasedSensitivities | ( | const label | patchI, |
const label | cpI, | ||
bool | DimensionedNormalSens = true |
||
) |
Definition at line 1145 of file NURBS3DVolume.C.
References forAll, deltaBoundary::makeFaceCentresAndAreas_d(), Foam::foamVersion::patch, face::points(), tmp::ref(), polyPatch::start(), and Foam::Zero.
Foam::tmp< Foam::tensorField > patchDxDb | ( | const label | patchI, |
const label | cpI | ||
) |
Definition at line 1214 of file NURBS3DVolume.C.
References forAll, tmp::New(), Foam::foamVersion::patch, and Foam::Zero.
Foam::tmp< Foam::tensorField > patchDxDbFace | ( | const label | patchI, |
const label | cpI | ||
) |
Definition at line 1253 of file NURBS3DVolume.C.
References forAll, deltaBoundary::makeFaceCentresAndAreas_d(), tmp::New(), Foam::foamVersion::patch, face::points(), and Foam::Zero.
Foam::tmp< Foam::vectorField > coordinates | ( | const vectorField & | uVector | ) | const |
Definition at line 1311 of file NURBS3DVolume.C.
References coordinates(), forAll, tmp::New(), nPoints, points, and Foam::Zero.
Foam::vector coordinates | ( | const vector & | uVector | ) | const |
Definition at line 1330 of file NURBS3DVolume.C.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Foam::Zero.
Foam::tmp< Foam::vectorField > computeNewPoints | ( | const vectorField & | controlPointsMovement | ) |
Definition at line 1369 of file NURBS3DVolume.C.
References coordinates(), DebugInfo, Foam::endl(), forAll, Foam::gMax(), Foam::mag(), and tmp::ref().
Foam::tmp< Foam::vectorField > computeNewBoundaryPoints | ( | const vectorField & | controlPointsMovement, |
const labelList & | patchesToBeMoved | ||
) |
Definition at line 1407 of file NURBS3DVolume.C.
References coordinates(), DebugInfo, Foam::endl(), Foam::gMax(), Foam::mag(), Foam::foamVersion::patch, and tmp::ref().
Foam::label getCPID | ( | const label | i, |
const label | j, | ||
const label | k | ||
) | const |
Definition at line 1461 of file NURBS3DVolume.C.
References k.
Referenced by axisAligned::computeControlPoints(), and transformBox::computeControlPoints().
void setControlPoints | ( | const vectorField & | newCps | ) |
Definition at line 1474 of file NURBS3DVolume.C.
References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
void boundControlPointMovement | ( | vectorField & | controlPointsMovement | ) |
Definition at line 1488 of file NURBS3DVolume.C.
References forAll, and Foam::Zero.
Foam::scalar computeMaxBoundaryDisplacement | ( | const vectorField & | controlPointsMovement, |
const labelList & | patchesToBeMoved | ||
) |
Definition at line 1511 of file NURBS3DVolume.C.
References coordinates(), Foam::mag(), Foam::max(), Foam::foamVersion::patch, Foam::reduce(), and Foam::Zero.
Foam::tmp< Foam::vectorField > getPointsInBox | ( | ) |
Definition at line 1560 of file NURBS3DVolume.C.
const Foam::labelList & getMap | ( | ) |
Definition at line 1575 of file NURBS3DVolume.C.
const Foam::labelList & getReverseMap | ( | ) |
Definition at line 1586 of file NURBS3DVolume.C.
const Foam::pointVectorField & getParametricCoordinates | ( | ) |
Definition at line 1597 of file NURBS3DVolume.C.
Foam::tmp< Foam::pointTensorField > getDxDb | ( | const label | cpI | ) |
Definition at line 1615 of file NURBS3DVolume.C.
References Foam::dimless, MeshObject< polyMesh, UpdateableMeshObject, pointMesh >::New(), IOobject::NO_READ, IOobject::NO_WRITE, tmp::ref(), and Foam::Zero.
Foam::tmp< Foam::volTensorField > getDxCellsDb | ( | const label | cpI | ) |
Definition at line 1659 of file NURBS3DVolume.C.
References GeometricField::boundaryFieldRef(), deltaBoundary::cellCenters_d(), GeometricField::correctBoundaryConditions(), Foam::dimless, forAll, IOobject::NO_READ, IOobject::NO_WRITE, Foam::foamVersion::patch, tmp::ref(), and Foam::Zero.
Foam::label nUSymmetry | ( | ) | const |
Definition at line 1727 of file NURBS3DVolume.C.
Foam::label nVSymmetry | ( | ) | const |
Definition at line 1742 of file NURBS3DVolume.C.
Foam::label nWSymmetry | ( | ) | const |
Definition at line 1757 of file NURBS3DVolume.C.
|
inline |
Definition at line 26 of file NURBS3DVolumeI.H.
References NURBS3DVolume::name_.
|
inline |
Definition at line 32 of file NURBS3DVolumeI.H.
|
inline |
Definition at line 39 of file NURBS3DVolumeI.H.
|
inline |
Definition at line 45 of file NURBS3DVolumeI.H.
|
inline |
|
inline |
Definition at line 57 of file NURBS3DVolumeI.H.
|
inline |
Definition at line 63 of file NURBS3DVolumeI.H.
|
inline |
Definition at line 69 of file NURBS3DVolumeI.H.
|
inline |
Definition at line 75 of file NURBS3DVolumeI.H.
Referenced by axisAligned::computeControlPoints(), fromFile::computeControlPoints(), and transformBox::computeControlPoints().
|
inline |
Definition at line 81 of file NURBS3DVolumeI.H.
Referenced by axisAligned::computeControlPoints(), fromFile::computeControlPoints(), and transformBox::computeControlPoints().
|
inline |
Definition at line 87 of file NURBS3DVolumeI.H.
Referenced by axisAligned::computeControlPoints(), fromFile::computeControlPoints(), and transformBox::computeControlPoints().
|
inline |
Definition at line 93 of file NURBS3DVolumeI.H.
Referenced by fromFile::computeControlPoints().
|
inline |
Definition at line 99 of file NURBS3DVolumeI.H.
Referenced by axisAligned::computeControlPoints(), fromFile::computeControlPoints(), transformBox::computeControlPoints(), and controlPointsDefinition::New().
Definition at line 1773 of file NURBS3DVolume.C.
References Foam::endl(), forAll, Foam::Info, UPstream::master(), and Foam::transform().
void writeCpsInDict | ( | ) | const |
Definition at line 1822 of file NURBS3DVolume.C.
References dictionary::add(), IOstreamOption::ASCII, IOobject::NO_READ, and IOobject::NO_WRITE.
void write | ( | ) | const |
Definition at line 1849 of file NURBS3DVolume.C.
|
protected |
Definition at line 76 of file NURBS3DVolume.H.
|
protected |
Definition at line 77 of file NURBS3DVolume.H.
|
protected |
Definition at line 78 of file NURBS3DVolume.H.
Referenced by NURBS3DVolume::name().
|
protected |
Definition at line 80 of file NURBS3DVolume.H.
|
protected |
Definition at line 81 of file NURBS3DVolume.H.
|
protected |
Definition at line 82 of file NURBS3DVolume.H.
|
protected |
Definition at line 85 of file NURBS3DVolume.H.
|
protected |
Definition at line 88 of file NURBS3DVolume.H.
|
protected |
Definition at line 92 of file NURBS3DVolume.H.
|
protected |
Definition at line 95 of file NURBS3DVolume.H.
Referenced by NURBS3DVolume::findPointsInBox().
Definition at line 98 of file NURBS3DVolume.H.
Referenced by NURBS3DVolume::findPointsInBox().
Definition at line 102 of file NURBS3DVolume.H.
Referenced by NURBS3DVolume::findPointsInBox().
|
protected |
Definition at line 105 of file NURBS3DVolume.H.
|
protected |
Definition at line 108 of file NURBS3DVolume.H.
|
protected |
Definition at line 112 of file NURBS3DVolume.H.
|
protected |
Definition at line 114 of file NURBS3DVolume.H.
|
protected |
Definition at line 116 of file NURBS3DVolume.H.
|
protected |
Definition at line 118 of file NURBS3DVolume.H.
|
protected |
Definition at line 121 of file NURBS3DVolume.H.
|
protected |
Definition at line 123 of file NURBS3DVolume.H.
|
protected |
Definition at line 125 of file NURBS3DVolume.H.
|
protected |
Definition at line 127 of file NURBS3DVolume.H.
|
protected |
Definition at line 129 of file NURBS3DVolume.H.
|
protected |
Definition at line 131 of file NURBS3DVolume.H.
|
protected |
Definition at line 134 of file NURBS3DVolume.H.
|
protected |
Definition at line 137 of file NURBS3DVolume.H.
|
protected |
Definition at line 140 of file NURBS3DVolume.H.
|
protected |
Definition at line 143 of file NURBS3DVolume.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.