fvMeshTopoChangersRaw.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::fvMeshTopoChangers::raw
26 
27 Description
28  Prototype fvMeshTopoChanger without any added functionality.
29 
30  Can be used as the starting point for any polyTopoChanger based
31  topo-changer.
32 
33  Note: run without FOAM_SETNAN. Temporary has unitialised patch
34  data when faces are created out of nothing.
35 
36 SourceFiles
37  fvMeshTopoChangersRaw.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef fvMeshTopoChangersRaw_H
42 #define fvMeshTopoChangersRaw_H
43 
44 #include "fvMeshTopoChanger.H"
45 #include "polyTopoChanger.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace fvMeshTopoChangers
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class fvMeshTopoChangers::raw Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class raw
59 :
60  public fvMeshTopoChanger
61 {
62  // Private Data
63 
64  polyTopoChanger topoChanger_;
65 
66 
67  // Private Member Functions
68 
69  //- Set unmapped values
70  template<class Type, template<class> class PatchField, class GeoMesh>
71  static void setUnmappedValues
72  (
74  const PackedBoolList& mappedFace,
76  );
77 
78  template<class Type, template<class> class PatchField, class GeoMesh>
79  void zeroUnmappedValues(const PackedBoolList&) const;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("raw");
86 
87 
88  // Constructors
89 
90  //- Construct from fvMesh and dictionary
91  raw(fvMesh& mesh, const dictionary& dict);
92 
93  //- Disallow default bitwise copy construction
94  raw(const raw&) = delete;
95 
96 
97  //- Destructor
98  virtual ~raw();
99 
100 
101  // Member Functions
102 
103  //- Update the mesh for both mesh motion and topology change
104  virtual bool update();
105 
106  //- Update corresponding to the given map
107  virtual void topoChange(const polyTopoChangeMap&);
108 
109  //- Update from another mesh using the given map
110  virtual void mapMesh(const polyMeshMap&);
111 
112  //- Update corresponding to the given distribution map
113  virtual void distribute(const polyDistributionMap&);
114 
115 
116  // Member Operators
117 
118  //- Disallow default bitwise assignment
119  void operator=(const raw&) = delete;
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace fvMeshTopoChangers
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #ifdef NoRepository
132 #endif
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:47
Generic GeometricField class.
A bit-packed bool list.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Abstract base class for fvMesh topology changers.
fvMesh & mesh()
Return the fvMesh.
Prototype fvMeshTopoChanger without any added functionality.
TypeName("raw")
Runtime type information.
void operator=(const raw &)=delete
Disallow default bitwise assignment.
virtual void topoChange(const polyTopoChangeMap &)
Update corresponding to the given map.
virtual void distribute(const polyDistributionMap &)
Update corresponding to the given distribution map.
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual bool update()
Update the mesh for both mesh motion and topology change.
raw(fvMesh &mesh, const dictionary &dict)
Construct from fvMesh and dictionary.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
List of mesh modifiers defining the mesh dynamics.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Namespace for OpenFOAM.
dictionary dict