Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
b990f698
Commit
b990f698
authored
Jan 13, 2019
by
Praetorius, Simon
Browse files
corrected bug in convection-diffusion when assigning a FieldVector<1> to a FieldVector<N>
parent
04e259ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/assembler/ConvectionDiffusionOperator.hpp
View file @
b990f698
...
...
@@ -104,7 +104,7 @@ namespace AMDiS
jacobian
.
mv
(
shapeGradients
[
i
][
0
],
gradients
[
i
]);
const
auto
A
=
localFctA
(
local
);
WorldVector
b
;
b
=
localFctB
(
local
);
WorldVector
b
=
makeB
(
localFctB
(
local
)
)
;
const
auto
c
=
localFctC
(
local
);
IF_CONSTEXPR
(
conserving
)
{
...
...
@@ -194,6 +194,21 @@ namespace AMDiS
[]
(
auto
)
{
return
0
;
});
}
template
<
class
T
,
int
N
>
static
FieldVector
<
T
,
dow
>
makeB
(
FieldVector
<
T
,
N
>
const
&
b
)
{
return
b
;
}
template
<
class
T
,
int
N
>
static
FieldVector
<
T
,
dow
>
makeB
(
FieldVector
<
T
,
N
>&&
b
)
{
return
std
::
move
(
b
);
}
template
<
class
T
>
static
FieldVector
<
T
,
dow
>
makeB
(
FieldVector
<
T
,
1
>
const
&
b
)
{
return
{
T
(
b
)};
}
template
<
class
T
>
static
FieldVector
<
T
,
dow
>
makeB
(
FieldVector
<
T
,
1
>&&
b
)
{
return
{
T
(
b
)};
}
template
<
class
T
,
std
::
enable_if_t
<
std
::
is_arithmetic
<
T
>
::
value
,
int
>
=
0
>
static
FieldVector
<
T
,
dow
>
makeB
(
T
b
)
{
return
{
b
};
}
private:
GridFctA
gridFctA_
;
GridFctB
gridFctB_
;
...
...
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