geomDecomp.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 OpenFOAM Foundation
9  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::geomDecomp
29 
30 Description
31  Base for geometrical domain decomposition methods
32 
33  Base coefficients:
34  \table
35  Property | Description | Required | Default
36  n | (nx ny nz) | yes
37  delta | delta for rotation matrix | no | 0.001
38  \endtable
39 
40 SourceFiles
41  geomDecomp.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef geomDecomp_H
46 #define geomDecomp_H
47 
48 #include "decompositionMethod.H"
49 #include "Vector.H"
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class geomDecomp Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class geomDecomp
59 :
60  public decompositionMethod
61 {
62  // Private Member Functions
63 
64  //- Read input values and initialize the rotDelta_
65  void readCoeffs();
66 
67 
68 protected:
69 
70  // Protected data
71 
72  //- Coefficients for all derived methods
73  const dictionary& coeffsDict_;
74 
76 
77  //- Default = 0.001
78  scalar delta_;
79 
81 
82 
83  // Protected Member Functions
84 
85  //- Check that mesh directions are compatible with decomposition
87 
88 
89 public:
90 
91  // Constructors
92 
93  //- Construct for derived type name and decomposition dictionary
95  (
96  const word& derivedType,
97  const dictionary& decompDict,
98  int select = selectionType::DEFAULT
99  );
100 
101  //- Construct for derived type name, decomposition dictionary
102  //- and region name
103  geomDecomp
104  (
105  const word& derivedType,
106  const dictionary& decompDict,
107  const word& regionName,
108  int select = selectionType::DEFAULT
109  );
110 
111 
112  // Member Functions
113 
114  //- Return for every coordinate the wanted processor number.
115  virtual labelList decompose
116  (
117  const pointField& points,
118  const scalarField& pointWeights
119  ) const = 0;
120 
121  //- Decompose with uniform weights on the points
122  virtual labelList decompose(const pointField& points) const = 0;
123 
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Foam::Tensor< scalar >
Foam::geomDecomp::rotDelta_
tensor rotDelta_
Definition: geomDecomp.H:93
Foam::geomDecomp::coeffsDict_
const dictionary & coeffsDict_
Coefficients for all derived methods.
Definition: geomDecomp.H:86
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::geomDecomp::decompose
virtual labelList decompose(const pointField &points, const scalarField &pointWeights) const =0
Return for every coordinate the wanted processor number.
Vector.H
decompositionMethod.H
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::geomDecomp
Base for geometrical domain decomposition methods.
Definition: geomDecomp.H:71
Foam::Field< vector >
Foam::geomDecomp::geomDecomp
geomDecomp(const word &derivedType, const dictionary &decompDict, int select=selectionType::DEFAULT)
Construct for derived type name and decomposition dictionary.
Definition: geomDecomp.C:86
Foam::geomDecomp::checkDecompositionDirections
void checkDecompositionDirections(const Vector< label > &) const
Check that mesh directions are compatible with decomposition.
Definition: geomDecomp.C:64
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::decompositionMethod
Abstract base class for domain decomposition.
Definition: decompositionMethod.H:51
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Vector< label >
Foam::List< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::geomDecomp::delta_
scalar delta_
Default = 0.001.
Definition: geomDecomp.H:91
Foam::geomDecomp::n_
Vector< label > n_
Definition: geomDecomp.H:88