Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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
27\*---------------------------------------------------------------------------*/
28
29#include "noDecomp.H"
31
32// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33
34namespace Foam
35{
38 (
43 );
44}
45
46
47// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49Foam::noDecomp::noDecomp(const label numDomains)
50:
51 decompositionMethod(numDomains)
52{}
53
54
56(
57 const dictionary& decompDict,
58 const word& regionName
59)
62{}
63
64
65// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66
68(
69 const pointField& points,
71) const
72{
73 return labelList(points.size(), UPstream::myProcNo());
74}
75
76
78(
79 const polyMesh& mesh,
80 const pointField&,
82) const
83{
84 return labelList(mesh.nCells(), UPstream::myProcNo());
85}
86
87
89(
90 const CompactListList<label>& globalCellCells,
91 const pointField&,
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// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
A packed storage of objects of type <T> using an offset table for access.
label size() const noexcept
The primary size (the number of rows/sublists).
void size(const label n)
Older name for setAddressableSize.
Definition UList.H:118
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
Definition UPstream.H:1706
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 dummy decomposition method, selected as none.
Definition noDecomp.H:50
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
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
A class for handling words, derived from Foam::string.
Definition word.H:66
#define defineTypeName(Type)
Define the typeName.
Definition className.H:113
dynamicFvMesh & mesh
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
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.