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
6e00674f
Commit
6e00674f
authored
Mar 23, 2020
by
niklas.baumgarten
Browse files
using shared pointers
parent
8c1946b2
Changes
4
Hide whitespace changes
Inline
Side-by-side
mlmc/src/assemble/DGEllipticAssemble.h
View file @
6e00674f
...
...
@@ -8,14 +8,15 @@
class
DGEllipticAssemble
:
public
EllipticAssemble
,
public
DGUtils
{
public:
DGDiscretization
*
disc
;
shared_ptr
<
DGDiscretization
>
disc
;
double
penalty
=
1.0
;
int
sign
=
1
;
DGEllipticAssemble
(
Discretization
*
disc
,
StochasticEllipticProblem
*
problem
)
:
EllipticAssemble
(
disc
,
problem
)
{
this
->
disc
=
dynamic_cast
<
DGDiscretization
*>
(
disc
);
DGEllipticAssemble
(
shared_ptr
<
Discretization
>
disc
,
shared_ptr
<
StochasticEllipticProblem
>
problem
)
:
EllipticAssemble
(
move
(
disc
),
move
(
problem
))
{
this
->
disc
=
dynamic_pointer_cast
<
DGDiscretization
>
(
disc
);
config
.
get
(
"penalty"
,
penalty
);
config
.
get
(
"sign"
,
sign
);
}
...
...
mlmc/src/assemble/EllipticAssemble.h
View file @
6e00674f
...
...
@@ -3,19 +3,21 @@
#include
"m++.h"
#include
"problem/StochasticEllipticProblem.hpp"
#include
<memory>
class
EllipticAssemble
:
public
Assemble
{
public:
Discretization
*
disc
;
StochasticEllipticProblem
*
problem
;
std
::
shared_ptr
<
Discretization
>
disc
;
std
::
shared_ptr
<
StochasticEllipticProblem
>
problem
;
EllipticAssemble
(
std
::
shared_ptr
<
Discretization
>
disc
,
std
::
shared_ptr
<
StochasticEllipticProblem
>
problem
)
:
disc
(
move
(
disc
)),
problem
(
move
(
problem
))
{}
string
sampleDir
=
""
;
Plot
*
plot
;
EllipticAssemble
(
Discretization
*
disc
,
StochasticEllipticProblem
*
problem
)
:
disc
(
disc
),
problem
(
problem
)
{}
virtual
~
EllipticAssemble
()
=
default
;
virtual
Element
*
getElement
(
const
cell
&
c
,
const
Vector
&
u
)
const
;
...
...
mlmc/src/assemble/HybridEllipticAssemble.h
View file @
6e00674f
...
...
@@ -6,8 +6,9 @@
class
HybridEllipticAssemble
:
public
MixedEllipticAssemble
{
public:
HybridEllipticAssemble
(
Discretization
*
disc
,
StochasticEllipticProblem
*
problem
)
:
MixedEllipticAssemble
(
disc
,
problem
)
{}
HybridEllipticAssemble
(
shared_ptr
<
Discretization
>
disc
,
shared_ptr
<
StochasticEllipticProblem
>
problem
)
:
MixedEllipticAssemble
(
move
(
disc
),
move
(
problem
))
{}
Scalar
getValue
(
const
cell
&
c
,
const
Vector
&
u
,
Element
*
elem
,
int
q
)
const
override
;
...
...
mlmc/src/assemble/MixedEllipticAssemble.h
View file @
6e00674f
...
...
@@ -6,8 +6,9 @@
class
MixedEllipticAssemble
:
public
EllipticAssemble
{
public:
MixedEllipticAssemble
(
Discretization
*
disc
,
StochasticEllipticProblem
*
problem
)
:
EllipticAssemble
(
disc
,
problem
)
{}
MixedEllipticAssemble
(
shared_ptr
<
Discretization
>
disc
,
shared_ptr
<
StochasticEllipticProblem
>
problem
)
:
EllipticAssemble
(
move
(
disc
),
move
(
problem
))
{}
Element
*
getElement
(
const
cell
&
c
,
const
Vector
&
u
)
const
override
;
...
...
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