Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
3c35c353
Commit
3c35c353
authored
Feb 21, 2018
by
sergio
Browse files
BUG: Fixing bug in dimensioning variables for parallel case
parent
240e304b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C
View file @
3c35c353
...
...
@@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include
"StandardWallInteraction.H"
#include
"processorPolyPatch.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
...
...
@@ -42,10 +43,10 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
),
e_
(
0
.
0
),
mu_
(
0
.
0
),
nEscape_
(
cloud
.
mesh
().
boundary
().
size
()
),
massEscape_
(
nEscape_
.
size
()
),
nStick_
(
nEscape_
.
size
()
),
massStick_
(
nEscape_
.
size
()
),
nEscape_
(
0
),
massEscape_
(
0
),
nStick_
(
0
),
massStick_
(
0
),
outputByInjectorId_
(
this
->
coeffDict
().
lookupOrDefault
(
"outputByInjectorId"
,
false
)),
injIdToIndex_
(
cloud
.
injectors
().
size
())
{
...
...
@@ -73,6 +74,19 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
{}
}
label
nPatches
=
0
;
forAll
(
mesh_
.
boundaryMesh
(),
patchi
)
{
if
(
!
isA
<
processorPolyPatch
>
(
mesh_
.
boundaryMesh
()[
patchi
]))
{
nPatches
++
;
}
}
nEscape_
.
setSize
(
nPatches
);
massEscape_
.
setSize
(
nPatches
);
nStick_
.
setSize
(
nPatches
);
massStick_
.
setSize
(
nPatches
);
forAll
(
nEscape_
,
patchi
)
{
label
nInjectors
(
1
);
...
...
@@ -240,6 +254,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
// accumulate current data
labelListList
npe
(
nEscape_
);
forAll
(
npe
,
i
)
{
Pstream
::
listCombineGather
(
npe
[
i
],
plusEqOp
<
label
>
());
...
...
@@ -288,12 +303,14 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
{
forAll
(
npe
,
i
)
{
os
<<
" Parcel fate: walls (number, mass) "
os
<<
" Parcel fate: patch (number, mass) "
<<
mesh_
.
boundary
()[
i
].
name
()
<<
nl
<<
" - escape = "
<<
npe
[
i
][
0
]
<<
", "
<<
mpe
[
i
][
0
]
<<
nl
<<
" - stick = "
<<
nps
[
i
][
0
]
<<
", "
<<
mps
[
i
][
0
]
<<
nl
;
}
}
...
...
@@ -308,6 +325,7 @@ void Foam::StandardWallInteraction<CloudType>::info(Ostream& os)
this
->
setModelProperty
(
"massStick"
,
mps
);
massStick_
=
Zero
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment