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
063d3ca9
Commit
063d3ca9
authored
Nov 08, 2011
by
mattijs
Browse files
ENH: Test-GAMGAgglomeration: some printing
parent
fb76b98a
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C
View file @
063d3ca9
...
...
@@ -53,18 +53,51 @@ int main(int argc, char *argv[])
labelList
cellToCoarse
(
identity
(
mesh
.
nCells
()));
labelListList
coarseToCell
(
invertOneToMany
(
mesh
.
nCells
(),
cellToCoarse
));
runTime
++
;
// Write initial agglomeration
{
volScalarField
scalarAgglomeration
(
IOobject
(
"agglomeration"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
mesh
,
dimensionedScalar
(
"aggomeration"
,
dimless
,
0
.
0
)
);
scalarField
&
fld
=
scalarAgglomeration
.
internalField
();
forAll
(
fld
,
cellI
)
{
fld
[
cellI
]
=
cellToCoarse
[
cellI
];
}
fld
/=
max
(
fld
);
scalarAgglomeration
.
correctBoundaryConditions
();
scalarAgglomeration
.
write
();
Info
<<
"Writing initial cell distribution to "
<<
runTime
.
timeName
()
<<
endl
;
}
for
(
label
level
=
0
;
level
<
agglom
.
size
();
level
++
)
{
runTime
.
setTime
(
dimensionedScalar
(
"time"
,
dimTime
,
level
),
level
)
;
runTime
++
;
Info
<<
"
Level
= "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
Info
<<
"
Time
= "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
const
labelList
&
addr
=
agglom
.
restrictAddressing
(
level
);
label
coarseSize
=
max
(
addr
)
+
1
;
Info
<<
" current size : "
<<
returnReduce
(
addr
.
size
(),
sumOp
<
label
>
())
<<
endl
;
Info
<<
" agglomerated size : "
Info
<<
"Level : "
<<
level
<<
endl
<<
returnReduce
(
addr
.
size
(),
sumOp
<
label
>
())
<<
endl
<<
" current size : "
<<
returnReduce
(
addr
.
size
(),
sumOp
<
label
>
())
<<
endl
<<
" agglomerated size : "
<<
returnReduce
(
coarseSize
,
sumOp
<
label
>
())
<<
endl
;
forAll
(
addr
,
fineI
)
...
...
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