Loading...
Searching...
No Matches
rawTopoChangerFvMesh.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-2016 OpenFOAM Foundation
9 Copyright (C) 2020 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
27Class
28 Foam::rawTopoChangerFvMesh
29
30Description
31 topoChangerFvMesh without any added functionality.
32
33 Note: run without FOAM_SETNAN. Temporary has unitialised patch
34 data when faces get created out of nothing.
35
36SourceFiles
37 rawTopoChangerFvMesh.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_rawTopoChangerFvMesh_H
42#define Foam_rawTopoChangerFvMesh_H
43
44#include "topoChangerFvMesh.H"
45#include "bitSet.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
52/*---------------------------------------------------------------------------*\
53 Class rawTopoChangerFvMesh Declaration
54\*---------------------------------------------------------------------------*/
55
56class rawTopoChangerFvMesh
57:
58 public topoChangerFvMesh
59{
60 // Private Member Functions
61
62 //- Set unmapped values
63 template<class Type, template<class> class PatchField, class GeoMesh>
64 static void setUnmappedValues
65 (
67 const bitSet& mappedFace,
69 );
70
71 template<class Type, template<class> class PatchField, class GeoMesh>
72 void zeroUnmappedValues(const bitSet& mappedFace) const;
73
74 //- No copy construct
75 rawTopoChangerFvMesh(const rawTopoChangerFvMesh&) = delete;
76
77 //- No copy assignment
78 void operator=(const rawTopoChangerFvMesh&) = delete;
79
80public:
81
82 //- Runtime type information
83 TypeName("rawTopoChangerFvMesh");
84
85
86 // Constructors
87
88 //- Construct from database
89 explicit rawTopoChangerFvMesh
90 (
91 const IOobject& io,
92 const bool doInit=true
93 );
94
95
96 //- Destructor
97 virtual ~rawTopoChangerFvMesh() = default;
98
99
100 // Member Functions
101
102 //- Update the mesh for both mesh motion and topology change
103 virtual bool update();
105
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109} // End namespace Foam
110
111// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112
113#ifdef NoRepository
115#endif
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119#endif
120
121// ************************************************************************* //
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition GeoMesh.H:46
Generic GeometricField class.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition bitSet.H:61
virtual ~rawTopoChangerFvMesh()=default
Destructor.
virtual bool update()
Update the mesh for both mesh motion and topology change.
TypeName("rawTopoChangerFvMesh")
Runtime type information.
const auto & io
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68