noDecomp.C
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) 2012 OpenFOAM Foundation
9  Copyright (C) 2017-2023 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 \*---------------------------------------------------------------------------*/
28 
29 #include "noDecomp.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeName(noDecomp);
38  (
39  decompositionMethod,
40  noDecomp,
41  dictionary,
42  none
43  );
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
49 Foam::noDecomp::noDecomp(const label numDomains)
50 :
51  decompositionMethod(numDomains)
52 {}
53 
54 
56 (
57  const dictionary& decompDict,
58  const word& regionName
59 )
60 :
62 {}
63 
64 
65 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66 
68 (
69  const pointField& points,
70  const scalarField&
71 ) const
72 {
74 }
75 
76 
78 (
79  const polyMesh& mesh,
80  const pointField&,
81  const scalarField&
82 ) const
83 {
85 }
86 
87 
89 (
90  const CompactListList<label>& globalCellCells,
91  const pointField&,
92  const scalarField&
93 ) const
94 {
95  return labelList(globalCellCells.size(), UPstream::myProcNo());
96 }
97 
98 
100 (
101  const labelListList& globalCellCells,
102  const pointField&,
103  const scalarField&
104 ) const
105 {
106  return labelList(globalCellCells.size(), UPstream::myProcNo());
107 }
108 
109 
110 // ************************************************************************* //
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:116
label size() const noexcept
The primary size (the number of rows/sublists)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
Definition: UPstream.H:1074
Macros for easy insertion into run-time selection tables.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
defineTypeName(manifoldCellsMeshObject)
dynamicFvMesh & mesh
const pointField & points
A class for handling words, derived from Foam::string.
Definition: word.H:63
Abstract base class for domain decomposition.
A packed storage of objects of type <T> using an offset table for access.
noDecomp(const noDecomp &)=delete
No copy construct.
virtual labelList decompose(const pointField &points, const scalarField &pointWeights_unused=scalarField::null()) const
Return for every coordinate the wanted processor number.
Definition: noDecomp.C:61
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
label nCells() const noexcept
Number of mesh cells.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
List< label > labelList
A List of labels.
Definition: List.H:62
Namespace for OpenFOAM.