Loading...
Searching...
No Matches
structuredDecomp.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-2012 OpenFOAM Foundation
9 Copyright (C) 2018-2023 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::structuredDecomp
29
30Description
31 Walk out decomposition of patch cells mesh - selectable as \c structured.
32
33SourceFiles
34 structuredDecomp.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Foam_structuredDecomp_H
39#define Foam_structuredDecomp_H
40
41#include "decompositionMethod.H"
42#include "wordRes.H"
43
44namespace Foam
45{
47/*---------------------------------------------------------------------------*\
48 Class structuredDecomp Declaration
49\*---------------------------------------------------------------------------*/
50
52:
54{
55 // Private Data
56
57 dictionary methodDict_;
58
59 wordRes patches_;
60
62
63
64public:
65
66 // Generated Methods
67
68 //- No copy construct
69 structuredDecomp(const structuredDecomp&) = delete;
70
71 //- No copy assignment
72 void operator=(const structuredDecomp&) = delete;
73
74
75 //- Runtime type information
76 TypeName("structured");
78
79 // Constructors
80
81 //- Construct given decomposition dictionary. Region ignored
82 explicit structuredDecomp
83 (
84 const dictionary& decompDict,
85 const word& regionName = ""
86 );
87
88
89 //- Destructor
90 virtual ~structuredDecomp() = default;
91
92
93 // Member Functions
94
95 //- Is method parallel aware
96 // (i.e. does it synchronize domains across proc boundaries)
97 virtual bool parallelAware() const;
98
99 //- Return for every coordinate the wanted processor number.
100 // Use the mesh connectivity (if needed)
101 virtual labelList decompose
102 (
103 const polyMesh& mesh,
104 const pointField& points,
105 const scalarField& pointWeights = scalarField::null()
106 ) const;
107
108 //- Return for every coordinate the wanted processor number.
109 // Explicitly provided connectivity - does not use mesh_.
110 virtual labelList decompose
111 (
112 const CompactListList<label>& globalCellCells,
113 const pointField& cc,
114 const scalarField& cWeights = scalarField::null()
115 ) const
116 {
118 return labelList();
119 }
120
121 //- Return for every coordinate the wanted processor number.
122 // Explicitly provided connectivity - does not use mesh_.
123 virtual labelList decompose
125 const labelListList& globalCellCells,
126 const pointField& cc,
127 const scalarField& cWeights = scalarField::null()
128 ) const
129 {
131 return labelList();
132 }
133};
134
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138} // End namespace Foam
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141
142#endif
143
144// ************************************************************************* //
A packed storage of objects of type <T> using an offset table for access.
static const Field< scalar > & null() noexcept
Definition Field.H:192
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
decompositionMethod(const label numDomains)
Construct with specified number of domains, no coefficients or constraints.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
structuredDecomp(const structuredDecomp &)=delete
No copy construct.
void operator=(const structuredDecomp &)=delete
No copy assignment.
virtual bool parallelAware() const
Is method parallel aware.
virtual labelList decompose(const polyMesh &mesh, const pointField &points, const scalarField &pointWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
virtual labelList decompose(const labelListList &globalCellCells, const pointField &cc, const scalarField &cWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
TypeName("structured")
Runtime type information.
virtual ~structuredDecomp()=default
Destructor.
virtual labelList decompose(const CompactListList< label > &globalCellCells, const pointField &cc, const scalarField &cWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
A List of wordRe with additional matching capabilities.
Definition wordRes.H:56
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition error.H:688
const pointField & points
Namespace for OpenFOAM.
List< labelList > labelListList
List of labelList.
Definition labelList.H:38
List< label > labelList
A List of labels.
Definition List.H:62
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
vectorField pointField
pointField is a vectorField.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68