/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2007-2023 PCOpt/NTUA Copyright (C) 2013-2023 FOSS GP Copyright (C) 2019 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::volBSplinesBase 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 SourceFiles volBSplinesBase.C \*---------------------------------------------------------------------------*/ #ifndef volBSplinesBase_H #define volBSplinesBase_H #include "NURBS3DVolume.H" #include "OFstream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { /*---------------------------------------------------------------------------*\ Class volBSplinesBase Declaration \*---------------------------------------------------------------------------*/ class volBSplinesBase : public MeshObject { // Private Typedefs typedef MeshObject < fvMesh, UpdateableMeshObject, volBSplinesBase > MeshObject_type; // Private Member Functions //- No copy construct volBSplinesBase(const volBSplinesBase&) = delete; //- No copy assignment void operator=(const volBSplinesBase&) = delete; protected: // Protected Data //- List with volumetric B-splines boxes. // No overlapping is supported PtrList volume_; //- Active design variables numbering for all boxes labelList activeDesignVariables_; public: //- Runtime type information TypeName("volBSplinesBase"); // Constructors //- Construct from components explicit volBSplinesBase(const fvMesh& mesh); //- Destructor virtual ~volBSplinesBase() = default; // Member Functions //- Get const reference to the vol. B-splines boxes const PtrList& boxes() const; //- Get non-const reference to the vol. B-splines boxes PtrList& boxesRef(); //- Get const reference to a specific box const NURBS3DVolume& box(const label boxI) const; //- Get non-const reference to a specific box NURBS3DVolume& boxRef(const label boxI); //- Get reference to control points const vectorField& getControlPoints(const label& iNURB) const; //- Get control points from all boxes vectorField getAllControlPoints() const; //- Get cumulative number of control points from all boxes label getTotalControlPointsNumber() const; //- Get number of boxes label getNumberOfBoxes() const; //- Get start CP ID for each box labelList getStartCpID() const; //- Get start CP ID for each box labelList getStartVarID() const; //- Find box of certain control point label findBoxID(const label cpI) const; //- From design variable ID, return boxID, cpID and direction Vector