Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
71e073eb
Commit
71e073eb
authored
Nov 11, 2020
by
niklas.baumgarten
Browse files
Revert "new approach to HybridFluxGenerator"
This reverts commit
f6cfb624
.
parent
f2ac59fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
mlmc/src/generators/HybridFluxGenerator.hpp
View file @
71e073eb
...
...
@@ -12,68 +12,14 @@
class
HybridFluxGenerator
:
public
SampleGenerator
{
private:
PDESolver
*
pdeSolver
;
MatrixGraphs
*
mGraphs
;
protected:
void
drawSample
(
const
SampleID
&
id
)
override
{
if
(
!
id
.
coarse
)
{
generateFineSample
(
id
);
// if (plotting)
// plotter->PlotVector("flux", *cellFlux, 3,
// id.level.fine, "CellData");
}
else
{
generateCoarseSample
(
id
);
// if (plotting)
// plotter->PlotVector("flux", *cellFlux, 3,
// id.level.coarse, "CellData");
}
}
void
generateFineSample
(
const
SampleID
&
id
)
{
SampleSolution
solution
(
mGraphs
,
id
);
pdeSolver
->
DrawSample
(
id
);
pdeSolver
->
Run
(
solution
);
// auto cellFlux = new Vector(cellMGraphs[id.MGLevel()]);
// auto faceValues = new Vector(faceMGraphs[id.MGLevel()]);
// auto faceFlux = new Vector(faceMGraphs[id.MGLevel()]);
// pdeSolver->GetAssemble()->SetNormalFlux(*faceValues, *faceFlux);
// pdeSolver->GetAssemble()->SetFlux(*faceValues, *cellFlux);
}
void
generateCoarseSample
(
const
SampleID
&
id
)
{
generateFineSample
(
id
);
};
public:
HybridFluxGenerator
(
Meshes
&
meshes
)
:
SampleGenerator
(
meshes
)
{
std
::
string
problemName
=
"StochasticLaplace2D"
;
pdeSolver
=
PDESolverCreator
(
meshes
).
WithModel
(
"HybridElliptic"
).
WithProblem
(
problemName
).
Create
();
mGraphs
=
pdeSolver
->
CreateSolutionMatrixGraphs
(
meshes
);
}
// VectorField EvalVectorFieldSample(const cell &c) override {
// RTLagrangeElement elem(*pdeSolver->GetDisc(), *faceFlux, c);
// VectorField F = zero;
// double area = 0;
// for (int q = 0; q < elem.nQ(); ++q) {
// double w = elem.QWeight(q);
// area += w;
// F += w * elem.VelocityField(q, *faceFlux);
// }
// F *= (1 / area);
// return F;
// }
//
// Scalar EvalScalarSample(int face, const cell &c) override {
// RTLagrangeElement elem(*pdeSolver->GetDisc(), *faceFlux, c);
// RTFaceElementT<> faceElem(*pdeSolver->GetDisc(), *faceFlux, c, face);
// return (*faceFlux)(elem[face], 0) * elem.Sign(face) / faceElem.Area();
// }
};
class
MultilevelHybridFluxGenerator
:
public
SampleGenerator
{
...
...
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