mapClouds.H
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 OpenFOAM Foundation
9 Copyright (C) 2019 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
27InNamespace
28 Foam::mapClouds
29
30Description
31 Generic Geometric field mapper. For "real" mapping, add template
32 specialisations for mapping of internal fields depending on mesh
33 type.
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef mapClouds_H
38#define mapClouds_H
39
40#include "cloud.H"
41#include "objectRegistry.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48//- Generic Geometric field mapper.
49// For "real" mapping, add template specialisations for mapping of internal
50// fields depending on mesh type.
51inline void mapClouds(const objectRegistry& db, const mapPolyMesh& mapper)
52{
54
55 forAllIters(clouds, iter)
56 {
57 cloud& c = const_cast<cloud&>(*iter());
58
59 if (polyMesh::debug)
60 {
61 Info<< "Mapping cloud " << c.name() << endl;
62 }
63
64 c.autoMap(mapper);
65 }
66}
67
68
69// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70
71} // End namespace Foam
72
73// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74
75#endif
76
77// ************************************************************************* //
A HashTable similar to std::unordered_map.
Definition: HashTable.H:123
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:60
const word & name() const
Return const reference to name.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:162
Registry of regIOobjects.
HashTable< const Type * > lookupClass(const bool strict=false) const
Return all objects with a class satisfying isA<Type>
const dimensionedScalar c
Speed of light in a vacuum.
Namespace for OpenFOAM.
void mapClouds(const objectRegistry &db, const mapPolyMesh &mapper)
Generic Geometric field mapper.
Definition: mapClouds.H:51
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:372
#define forAllIters(container, iter)
Iterate across all elements in the container object.
Definition: stdFoam.H:260