Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
88c82972
Commit
88c82972
authored
Nov 17, 2016
by
Andrew Heather
Browse files
ENH: Porosity model - output cellZone bounds in the local co-ordinate system. Fixes
#300
parent
d2328f78
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C
View file @
88c82972
...
...
@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation |
Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -122,6 +122,37 @@ Foam::porosityModel::porosityModel
<<
"cannot find porous cellZone "
<<
zoneName_
<<
exit
(
FatalError
);
}
Info
<<
incrIndent
<<
indent
<<
coordSys_
<<
decrIndent
<<
endl
;
const
pointField
&
points
=
mesh_
.
points
();
const
cellList
&
cells
=
mesh_
.
cells
();
const
faceList
&
faces
=
mesh_
.
faces
();
DynamicList
<
point
>
localPoints
;
forAll
(
cellZoneIDs_
,
zoneI
)
{
const
cellZone
&
cZone
=
mesh_
.
cellZones
()[
cellZoneIDs_
[
zoneI
]];
localPoints
.
setCapacity
(
10
*
cells
.
size
());
forAll
(
cZone
,
i
)
{
const
label
cellI
=
cZone
[
i
];
const
cell
&
c
=
mesh_
.
cells
()[
cellI
];
const
pointField
cellPoints
(
c
.
points
(
faces
,
points
));
forAll
(
cellPoints
,
pointI
)
{
const
point
&
pt
=
cellPoints
[
pointI
];
localPoints
.
append
(
coordSys_
.
localPosition
(
pt
));
}
}
boundBox
bb
(
localPoints
,
true
);
Info
<<
" local bounds: "
<<
bb
<<
endl
;
localPoints
.
clear
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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