OpenFOAM: API Guide
v2112
The open source CFD toolbox
lagrangianFieldDecomposer.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-2016 OpenFOAM Foundation
9
-------------------------------------------------------------------------------
10
License
11
This file is part of OpenFOAM.
12
13
OpenFOAM is free software: you can redistribute it and/or modify it
14
under the terms of the GNU General Public License as published by
15
the Free Software Foundation, either version 3 of the License, or
16
(at your option) any later version.
17
18
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21
for more details.
22
23
You should have received a copy of the GNU General Public License
24
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26
Class
27
Foam::lagrangianFieldDecomposer
28
29
Description
30
Lagrangian field decomposer.
31
32
SourceFiles
33
lagrangianFieldDecomposer.C
34
lagrangianFieldDecomposerFields.C
35
36
\*---------------------------------------------------------------------------*/
37
38
#ifndef lagrangianFieldDecomposer_H
39
#define lagrangianFieldDecomposer_H
40
41
#include "
Cloud.H
"
42
#include "
CompactIOField.H
"
43
#include "
indexedParticle.H
"
44
#include "
passiveParticle.H
"
45
46
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48
namespace
Foam
49
{
50
51
class
IOobjectList;
52
53
/*---------------------------------------------------------------------------*\
54
Class lagrangianFieldDecomposer Declaration
55
\*---------------------------------------------------------------------------*/
56
57
class
lagrangianFieldDecomposer
58
{
59
// Private data
60
61
//- Reference to processor mesh
62
const
polyMesh
& procMesh_;
63
64
//- Lagrangian positions for this processor
65
Cloud<passiveParticle>
positions_;
66
67
//- The indices of the particles on this processor
68
labelList
particleIndices_;
69
70
71
// Private Member Functions
72
73
//- No copy construct
74
lagrangianFieldDecomposer
(
const
lagrangianFieldDecomposer
&) =
delete
;
75
76
//- No copy assignment
77
void
operator=(
const
lagrangianFieldDecomposer
&) =
delete
;
78
79
80
public
:
81
82
// Constructors
83
84
//- Construct from components
85
lagrangianFieldDecomposer
86
(
87
const
polyMesh
&
mesh
,
//<! unused
88
const
polyMesh
& procMesh,
89
const
labelList
&
faceProcAddressing
,
90
const
labelList
& cellProcAddressing,
91
const
word
&
cloudName
,
92
const
Cloud<indexedParticle>
& lagrangianPositions,
93
const
List
<
SLList<indexedParticle*>
*>& cellParticles
94
);
95
96
97
// Member Functions
98
99
// Read the fields and hold on the pointer list
100
template
<
class
Type>
101
static
void
readFields
102
(
103
const
label cloudI,
104
const
IOobjectList
& lagrangianObjects,
105
PtrList
<
PtrList
<
IOField<Type>
>>& lagrangianFields
106
);
107
108
template
<
class
Type>
109
static
void
readFieldFields
110
(
111
const
label cloudI,
112
const
IOobjectList
& lagrangianObjects,
113
PtrList
114
<
115
PtrList
<
CompactIOField
<
Field<Type>
, Type>>
116
>& lagrangianFields
117
);
118
119
120
//- Decompose volume field
121
template
<
class
Type>
122
tmp<IOField<Type>
>
decomposeField
123
(
124
const
word
&
cloudName
,
125
const
IOField<Type>
&
field
126
)
const
;
127
128
template
<
class
Type>
129
tmp<CompactIOField<Field<Type>
, Type>>
decomposeFieldField
130
(
131
const
word
&
cloudName
,
132
const
CompactIOField
<
Field<Type>
, Type>&
field
133
)
const
;
134
135
136
template
<
class
GeoField>
137
void
decomposeFields
138
(
139
const
word
&
cloudName
,
140
const
PtrList<GeoField>
&
fields
141
)
const
;
142
143
template
<
class
GeoField>
144
void
decomposeFieldFields
145
(
146
const
word
&
cloudName
,
147
const
PtrList<GeoField>
&
fields
148
)
const
;
149
};
150
151
152
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154
}
// End namespace Foam
155
156
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158
#ifdef NoRepository
159
#include "
lagrangianFieldDecomposerFields.C
"
160
#endif
161
162
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164
#endif
165
166
// ************************************************************************* //
faceProcAddressing
PtrList< labelIOList > & faceProcAddressing
Definition:
checkFaceAddressingComp.H:9
Foam::lagrangianFieldDecomposer::decomposeField
tmp< IOField< Type > > decomposeField(const word &cloudName, const IOField< Type > &field) const
Decompose volume field.
cloudName
const word cloudName(propsDict.get< word >("cloud"))
Foam::word
A class for handling words, derived from Foam::string.
Definition:
word.H:65
Foam::IOField
A primitive field of type <T> with automated input and output.
Definition:
foamVtkLagrangianWriter.H:61
Foam::lagrangianFieldDecomposer::decomposeFieldField
tmp< CompactIOField< Field< Type >, Type > > decomposeFieldField(const word &cloudName, const CompactIOField< Field< Type >, Type > &field) const
Foam::tmp
A class for managing temporary objects.
Definition:
PtrList.H:61
Foam::lagrangianFieldDecomposer::decomposeFieldFields
void decomposeFieldFields(const word &cloudName, const PtrList< GeoField > &fields) const
Cloud.H
Foam::CompactIOField
A Field of objects of type <T> with automated input and output using a compact storage....
Definition:
CompactIOField.H:53
Foam::lagrangianFieldDecomposer::readFields
static void readFields(const label cloudI, const IOobjectList &lagrangianObjects, PtrList< PtrList< IOField< Type >>> &lagrangianFields)
Foam::lagrangianFieldDecomposer::decomposeFields
void decomposeFields(const word &cloudName, const PtrList< GeoField > &fields) const
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition:
polyMesh.H:77
Foam::LList
Template class for non-intrusive linked lists.
Definition:
LList.H:54
Foam::Field
Generic templated field type.
Definition:
Field.H:63
passiveParticle.H
field
rDeltaTY field()
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition:
List.H:59
mesh
dynamicFvMesh & mesh
Definition:
createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition:
atmBoundaryLayer.C:33
Foam::IOobjectList
List of IOobjects with searching and retrieving facilities.
Definition:
IOobjectList.H:55
indexedParticle.H
Foam::lagrangianFieldDecomposer
Lagrangian field decomposer.
Definition:
lagrangianFieldDecomposer.H:56
Foam::lagrangianFieldDecomposer::readFieldFields
static void readFieldFields(const label cloudI, const IOobjectList &lagrangianObjects, PtrList< PtrList< CompactIOField< Field< Type >, Type >> > &lagrangianFields)
Foam::List< label >
Foam::Cloud< passiveParticle >
CompactIOField.H
lagrangianFieldDecomposerFields.C
fields
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition:
createFields.H:97
applications
utilities
parallelProcessing
decomposePar
lagrangianFieldDecomposer.H
Generated by
1.8.17
OPENFOAM® is a registered
trademark
of OpenCFD Ltd.