Loading...
Searching...
No Matches
faMeshRegistry.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2024-2025 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28#include "faMesh.H"
29#include "faMeshesRegistry.H"
30#include "polyMesh.H"
31#include "Time.H"
32
33// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34
36(
37 const word& areaName,
38 const polyMesh& mesh
39)
40:
41 objectRegistry
42 (
44 (
45 (areaName.empty() ? polyMesh::defaultRegion : areaName),
51 )
52 )
53{}
54
55
56// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
57
59{
60 // In the usual case, the objectRegistry::dbDir() will be something
61 // like finite-area/{region0,film} etc with the "finite-area/"
62 // prefix coming from the enclosing registry of registries.
63 //
64 // So always check the name() portion, not the dbDir() itself
65 // - either, objectRegistry::dbDir().name()
66 // - or (same), objectRegistry::name()
67
69 {
71 }
72
73 return objectRegistry::dbDir();
74}
75
76
77// ************************************************************************* //
bool empty() const noexcept
Definition HashTable.H:353
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
const word & name() const noexcept
Return the object name.
Definition IOobjectI.H:205
virtual const objectRegistry & thisDb() const
Reference to the mesh database.
Definition faMesh.H:119
virtual const fileName & dbDir() const
Local directory path of the objectRegistry relative to Time with override for the single-region case.
faMeshRegistry(const word &areaName, const polyMesh &mesh)
Construct an objectRegistry for given area region name. Treat an empty name like polyMesh::defaultReg...
A MeshObject registry on top of a polyMesh that provides an objectRegistry for holding multiple faMes...
A class for handling file names.
Definition fileName.H:75
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
const objectRegistry & parent() const noexcept
Return the parent objectRegistry.
const Time & time() const noexcept
Return time registry.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
static word defaultRegion
Return the default region name.
Definition polyMesh.H:406
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
word timeName
Definition getTimeIndex.H:3
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.