Loading...
Searching...
No Matches
manualDecomp.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-2015 OpenFOAM Foundation
9 Copyright (C) 2017-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::manualDecomp
29
30Description
31 Decompose based on cell-to-processor association in a file
32
33 Method coefficients:
34 \table
35 Property | Description | Required | Default
36 dataFile | filename of cell decomposition data | yes |
37 \endtable
38
39SourceFiles
40 manualDecomp.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef Foam_manualDecomp_H
45#define Foam_manualDecomp_H
46
47#include "decompositionMethod.H"
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class manualDecomp Declaration
54\*---------------------------------------------------------------------------*/
55
56class manualDecomp
57:
59{
60 // Private Data
62 fileName dataFile_;
63
64public:
65
66 // Generated Methods
67
68 //- No copy construct
69 manualDecomp(const manualDecomp&) = delete;
70
71 //- No copy assignment
72 void operator=(const manualDecomp&) = delete;
73
74
75 //- Runtime type information
76 TypeName("manual");
77
78
79 // Constructors
80
81 //- Construct given decomposition dictionary and optional region name
82 explicit manualDecomp
83 (
84 const dictionary& decompDict,
85 const word& regionName = ""
86 );
88
89 //- Destructor
90 virtual ~manualDecomp() = default;
91
92
93 // Member Functions
94
95 //- Manual decompose does not care about proc boundaries.
96 //- Is all up to the user.
97 virtual bool parallelAware() const
98 {
99 return true;
100 }
101
102 //- Return for every coordinate the wanted processor number.
103 // Use the mesh connectivity (if needed)
104 virtual labelList decompose
106 const polyMesh& mesh,
107 const pointField& cc,
108 const scalarField& cWeights = scalarField::null()
109 ) const;
110
111 //- Return for every coordinate the wanted processor number.
112 // Explicitly provided connectivity - does not use mesh_.
113 virtual labelList decompose
115 const CompactListList<label>& globalCellCells,
116 const pointField& cc,
117 const scalarField& cWeights = scalarField::null()
118 ) const
119 {
121 return labelList();
122 }
123
124 //- Return for every coordinate the wanted processor number.
125 // Explicitly provided connectivity - does not use mesh_.
126 virtual labelList decompose
127 (
128 const labelListList& globalCellCells,
129 const pointField& cc,
130 const scalarField& cWeights = scalarField::null()
131 ) const
132 {
134 return labelList();
135 }
137
138
139// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140
141} // End namespace Foam
142
143// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144
145#endif
146
147// ************************************************************************* //
A packed storage of objects of type <T> using an offset table for access.
static const Field< scalar > & null() noexcept
Definition Field.H:192
Abstract base class for domain decomposition.
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
A class for handling file names.
Definition fileName.H:75
Decompose based on cell-to-processor association in a file.
virtual bool parallelAware() const
Manual decompose does not care about proc boundaries. Is all up to the user.
virtual ~manualDecomp()=default
Destructor.
TypeName("manual")
Runtime type information.
virtual labelList decompose(const labelListList &globalCellCells, const pointField &cc, const scalarField &cWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
manualDecomp(const manualDecomp &)=delete
No copy construct.
void operator=(const manualDecomp &)=delete
No copy assignment.
virtual labelList decompose(const CompactListList< label > &globalCellCells, const pointField &cc, const scalarField &cWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
virtual labelList decompose(const polyMesh &mesh, const pointField &cc, const scalarField &cWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
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
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