createMeshAccounting.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) 2021 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
12 
13 Description
14  Additional mesh accounting (foamToVTK)
15 
16 \*---------------------------------------------------------------------------*/
17 
18 PtrList<fvMeshSubsetProxy> meshProxies(meshes.size());
19 PtrList<vtk::vtuCells> vtuMappings(meshes.size());
20 
21 {
22  forAll(meshes, regioni)
23  {
24  // Mesh subsetting, or pass through
25  meshProxies.set
26  (
27  regioni,
28  new fvMeshSubsetProxy
29  (
30  meshes[regioni],
31  cellSubsetType,
32  cellSelectionName
33  )
34  );
35 
36  // VTU sizing and decomposition information
37  vtuMappings.set
38  (
39  regioni,
40  new vtk::vtuCells(writeOpts, decomposePoly)
41  );
42  }
43 }
44 
45 
46 // ************************************************************************* //
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
meshes
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
meshProxies
PtrList< fvMeshSubsetProxy > meshProxies(meshes.size())
vtuMappings
PtrList< vtk::vtuCells > vtuMappings(meshes.size())