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-2021 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 structuredDecomp_H
39#define structuredDecomp_H
40
41#include "decompositionMethod.H"
42#include "wordRes.H"
43
44namespace Foam
45{
46
47/*---------------------------------------------------------------------------*\
48 Class structuredDecomp Declaration
49\*---------------------------------------------------------------------------*/
52:
54{
55 // Private Data
56
57 dictionary methodDict_;
58
59 wordRes patches_;
60
62
63
64 // Private Member Functions
65
66 //- No copy construct
67 structuredDecomp(const structuredDecomp&) = delete;
68
69 //- No copy assignment
70 void operator=(const structuredDecomp&) = delete;
71
72
73public:
74
75 //- Runtime type information
76 TypeName("structured");
77
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
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 labelListList& globalCellCells,
113 const pointField& cc,
114 const scalarField& cWeights
115 ) const
116 {
118 return labelList();
119 }
120};
121
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125} // End namespace Foam
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129#endif
130
131// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Abstract base class for domain decomposition.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Walk out decomposition of patch cells mesh - selectable as structured.
virtual bool parallelAware() const
Is method parallel aware.
TypeName("structured")
Runtime type information.
virtual ~structuredDecomp()=default
Destructor.
virtual labelList decompose(const polyMesh &mesh, const pointField &points, const scalarField &pointWeights) const
Return for every coordinate the wanted processor number.
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:54
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
Foam::word regionName(Foam::polyMesh::defaultRegion)
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
const pointField & points
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition: List.H:66
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73