Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
fd02b33a
Commit
fd02b33a
authored
Jan 15, 2020
by
niklas.baumgarten
Browse files
added perm plot
parent
018196fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
mlmc/src/stochastics/HybridFluxGenerator.C
View file @
fd02b33a
...
...
@@ -14,22 +14,37 @@ void HybridFluxGenerator2D::GetFineSample(Vector &fineField) {
Vector
perm
(
cellMatrixGraph
[
l
-
meshes
.
pLevel
()]);
Vector
solution
(
faceMatrixGraph
[
l
-
meshes
.
pLevel
()]);
permeabilityGenerator
.
GetFineSample
(
perm
);
bool
plotPermForTransport
=
false
;
config
.
get
(
"plotPermForTransport"
,
plotPermForTransport
);
if
(
plotPermForTransport
)
{
Plot
plot
(
meshes
[
l
],
2
);
plot
.
celldata
(
perm
,
1
);
plot
.
vtk_celldata
(
"permeability"
);
}
assemble
.
problem
->
LoadNewSample
(
&
perm
);
Preconditioner
*
pc
=
GetPC
(
faceMatrixGraph
,
assemble
,
"LIB_PS"
);
Solver
solver
(
pc
,
"GMRES"
);
Newton
newton
(
solver
);
newton
(
assemble
,
solution
);
assemble
.
setFlux
(
solution
,
fineField
);
newton
(
assemble
,
solution
);
assemble
.
setFlux
(
solution
,
fineField
);
}
void
HybridFluxGenerator2D
::
GetCoarseSample
(
const
Vector
&
fineField
,
Vector
&
coarseField
)
{
coarseField
=
0
;
mout
<<
OUTX
(
fineField
)
<<
endl
;
mout
<<
OUTX
(
coarseField
)
<<
endl
;
for
(
cell
c
=
coarseField
.
cells
();
c
!=
coarseField
.
cells_end
();
c
++
)
{
row
coarseRow
=
coarseField
.
find_row
(
c
());
for
(
int
k
=
0
;
k
<
c
.
Children
();
++
k
)
{
...
...
@@ -40,8 +55,4 @@ void HybridFluxGenerator2D::GetCoarseSample(const Vector &fineField,
for
(
int
i
=
0
;
i
<
coarseRow
.
n
();
++
i
)
coarseField
(
coarseRow
,
i
)
/=
c
.
Children
();
}
mout
<<
OUTX
(
fineField
)
<<
endl
;
mout
<<
OUTX
(
coarseField
)
<<
endl
;
}
\ No newline at end of file
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