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 -------------------------------------------------------------------------------
11 License
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 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(cloud, 0);
37 }
38 
39 const Foam::word Foam::cloud::prefix("lagrangian");
40 
41 Foam::word Foam::cloud::defaultName("defaultCloud");
42 
45 ({
46  { geometryType::COORDINATES, "coordinates" },
47  { geometryType::POSITIONS, "positions" }
48 });
49 
50 
51 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
52 
54 :
55  cloud(obr, cloud::defaultName)
56 {}
57 
58 
60 :
62  (
63  IOobject
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 
79 Foam::label Foam::cloud::nParcels() const
80 {
82  return 0;
83 }
84 
85 
87 {
89 }
90 
91 
93 {
95 }
96 
97 
99 {
101 }
102 
103 
104 // ************************************************************************* //
static word defaultName
The default cloud name: defaultCloud.
Definition: cloud.H:84
virtual label nParcels() const
Number of parcels for the hosting cloud.
Definition: cloud.C:72
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:157
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the mesh topology change.
Definition: cloud.C:79
word timeName
Definition: getTimeIndex.H:3
virtual void readObjects(const objectRegistry &obr)
Read particle fields from objects in the obr registry.
Definition: cloud.C:85
const word cloudName(propsDict.get< word >("cloud"))
A class for handling words, derived from Foam::string.
Definition: word.H:63
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:53
virtual void writeObjects(objectRegistry &obr) const
Write particle fields as objects into the obr registry.
Definition: cloud.C:91
defineTypeNameAndDebug(combustionModel, 0)
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: error.H:64
Registry of regIOobjects.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:686
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172
static const Enum< geometryType > geometryTypeNames
Named enumerations "coordinates", "positions".
Definition: cloud.H:71
Namespace for OpenFOAM.
static const word prefix
The prefix to local: lagrangian.
Definition: cloud.H:79
cloud(const cloud &)=delete
No copy construct.