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-plus
Commits
f250fab7
Commit
f250fab7
authored
Mar 21, 2018
by
mattijs
Browse files
ENH: checkMesh: output cellRegion field. Fixes
#763
.
parent
dbe94816
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/checkMesh/checkMesh.C
View file @
f250fab7
...
...
@@ -150,6 +150,7 @@ int main(int argc, char *argv[])
selectedFields
.
insert
(
"cellVolume"
);
selectedFields
.
insert
(
"cellVolumeRatio"
);
selectedFields
.
insert
(
"minTetVolume"
);
selectedFields
.
insert
(
"cellRegion"
);
}
...
...
applications/utilities/mesh/manipulation/checkMesh/writeFields.C
View file @
f250fab7
...
...
@@ -4,6 +4,7 @@
#include "zeroGradientFvPatchFields.H"
#include "syncTools.H"
#include "tetPointRef.H"
#include "regionSplit.H"
using
namespace
Foam
;
...
...
@@ -424,6 +425,32 @@ void Foam::writeFields
minTetVolume
.
write
();
}
if
(
selectedFields
.
found
(
"cellRegion"
))
{
volScalarField
cellRegion
(
IOobject
(
"cellRegion"
,
mesh
.
time
().
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
mesh
,
dimensionedScalar
(
"cellRegion"
,
dimless
,
0
),
calculatedFvPatchScalarField
::
typeName
);
regionSplit
rs
(
mesh
);
forAll
(
rs
,
celli
)
{
cellRegion
[
celli
]
=
rs
[
celli
];
}
cellRegion
.
correctBoundaryConditions
();
Info
<<
" Writing cell region to "
<<
cellRegion
.
name
()
<<
endl
;
cellRegion
.
write
();
}
Info
<<
endl
;
}
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