Loading...
Searching...
No Matches
cloud.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2016-2023 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "cloud.H"
30#include "Time.H"
31
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33
34namespace Foam
35{
37}
38
39const Foam::word Foam::cloud::prefix("lagrangian");
40
42
45({
46 { geometryType::COORDINATES, "coordinates" },
47 { geometryType::POSITIONS, "positions" }
48});
49
50
51// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
53Foam::cloud::cloud(const objectRegistry& obr)
54:
56{}
57
58
60:
62 (
64 (
65 (cloudName.empty() ? cloud::defaultName : cloudName),
66 obr.time().timeName(),
67 cloud::prefix,
68 obr,
69 IOobject::NO_READ,
70 IOobject::AUTO_WRITE,
71 IOobject::REGISTER
72 )
73 )
74{}
75
76
77// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78
79Foam::label Foam::cloud::nParcels() const
80{
82 return 0;
83}
84
89}
90
92void Foam::cloud::readObjects(const objectRegistry& obr)
93{
95}
96
97
99{
101}
102
103
104// ************************************************************************* //
const word cloudName(propsDict.get< word >("cloud"))
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition Enum.H:57
bool empty() const noexcept
Definition HashTable.H:353
@ 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
A cloud is a registry collection of lagrangian particles.
Definition cloud.H:56
virtual void readObjects(const objectRegistry &obr)
Read particle fields from objects in the obr registry.
Definition cloud.C:85
@ COORDINATES
barycentric coordinates
Definition cloud.H:64
static const word prefix
The prefix to local: lagrangian.
Definition cloud.H:79
cloud(const cloud &)=delete
No copy construct.
virtual label nParcels() const
Number of parcels for the hosting cloud.
Definition cloud.C:72
static const Enum< geometryType > geometryTypeNames
Named enumerations "coordinates", "positions".
Definition cloud.H:71
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the mesh topology change.
Definition cloud.C:79
static word defaultName
The default cloud name: defaultCloud.
Definition cloud.H:84
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
Definition cloud.C:91
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Registry of regIOobjects.
const Time & time() const noexcept
Return time registry.
A class for handling words, derived from Foam::string.
Definition word.H:66
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition className.H:142
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition error.H:688
word timeName
Definition getTimeIndex.H:3
Namespace for OpenFOAM.