52 IDs[zI] =
mesh_.cellZones().findZoneID(zoneNames[zI]);
61 DynamicList<label> IOcells(0);
62 for (
const fvPatch& patch : mesh_.boundary())
64 if (patch.type() ==
"patch")
66 IOcells.append(patch.faceCells());
72 cellZone& IOcellsZone = cellZones(
"IOcells",
true);
73 IOcellsZone = IOcells;
74 IOcellsID_ = cellZones.size() - 1;
84Foam::topOZones::topOZones
92 fixedPorousIDs_(getZoneIDs(
dict,
"fixedPorousZones")),
97 "fixedPorousValues",
scalarList(fixedPorousIDs_.size(), 1.)
100 fixedZeroPorousIDs_(getZoneIDs(
dict,
"fixedZeroPorousZones")),
101 adjointPorousIDs_(getZoneIDs(
dict,
"adjointPorousZones")),
109 <<
"Number of fixedPorousValues and fixedPorousZones don't agree!"
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of entries in the list.
Base class for selecting the betaMax value, i.e. the value multiplying the Brinkman penalisation term...
A collection of cell labels.
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
labelList getZoneIDs(const dictionary &dict, const word &zoneGroup)
Get zone IDs corresponding to a wordList, read from a dict.
const fvMesh & mesh_
Mesh reference.
scalarList fixedPorousValues_
The constant alpha values of fixedPorousIDs_.
void addIOcellsZone()
Add a cellZone containing the cells next to IO patches.
autoPtr< betaMax > betaMaxPtr_
The multiplier of the Brinkman penalisation term.
const dictionary dict_
TopO design variables dictionary.
labelList fixedZeroPorousIDs_
IDs of cellZones holding cells with zero alpha values.
const fvMesh & mesh() const
Const reference to mesh.
labelList fixedPorousIDs_
IDs of cellZones holding cells with constant alpha values.
label IOcellsID_
ID of the cellZone holding the cells next to inlets & outlets.
labelList adjointPorousIDs_
IDs of cellZones with cells that can change their alpha value throughout the optimisation.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< word > wordList
List of word.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
ZoneMesh< cellZone, polyMesh > cellZoneMesh
A ZoneMesh with cellZone content on a polyMesh.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< scalar > scalarList
List of scalar.
#define forAll(list, i)
Loop across all elements in list.