Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Praetorius, Simon
dune-amdis
Commits
33c122c5
Commit
33c122c5
authored
Oct 01, 2018
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed usage of hierarchic vector wrapper where not necessary
parent
af1bf33d
Pipeline
#1243
failed with stage
in 10 minutes and 38 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
src/amdis/DirichletBC.hpp
src/amdis/DirichletBC.hpp
+2
-5
test/DOFVectorTest.cpp
test/DOFVectorTest.cpp
+9
-1
No files found.
src/amdis/DirichletBC.hpp
View file @
33c122c5
...
...
@@ -11,7 +11,6 @@
#include <amdis/Output.hpp>
#include <amdis/common/Concepts.hpp>
#include <amdis/common/ValueCategory.hpp>
#include <amdis/linear_algebra/HierarchicWrapper.hpp>
#include <amdis/utility/RangeType.hpp>
#include <amdis/utility/TreeData.hpp>
...
...
@@ -84,14 +83,12 @@ namespace AMDiS
using
Dune
::
Functions
::
interpolate
;
Dune
::
Hybrid
::
ifElse
(
std
::
is_same
<
RangeType_t
<
typename
RowBasis
::
LocalView
::
Tree
>
,
Range
>
{},
[
&
](
auto
id
)
{
auto
rhsWrapper
=
hierarchicVectorWrapper
(
rhs
.
vector
());
interpolate
(
id
(
rowBasis
),
rhsWrapper
,
values_
,
dirichletNodes_
);
interpolate
(
id
(
rowBasis
),
rhs
,
values_
,
dirichletNodes_
);
});
Dune
::
Hybrid
::
ifElse
(
std
::
is_same
<
RangeType_t
<
typename
ColBasis
::
LocalView
::
Tree
>
,
Range
>
{},
[
&
](
auto
id
)
{
auto
solutionWrapper
=
hierarchicVectorWrapper
(
solution
.
vector
());
interpolate
(
id
(
colBasis
),
solutionWrapper
,
values_
,
dirichletNodes_
);
interpolate
(
id
(
colBasis
),
solution
,
values_
,
dirichletNodes_
);
});
// subtract columns of dirichlet nodes from rhs
...
...
test/DOFVectorTest.cpp
View file @
33c122c5
#include "config.h"
#include <dune/common/filledarray.hh>
#include <dune/grid/yaspgrid.hh>
#include <dune/functions/backends/concepts.hh>
#include <dune/functions/functionspacebases/compositebasis.hh>
#include <dune/functions/functionspacebases/powerbasis.hh>
#include <dune/functions/functionspacebases/lagrangebasis.hh>
...
...
@@ -23,10 +26,15 @@ void test_dofvector(B const& basis, DOFVector<B,T>& vec)
auto
m1
=
std
::
max_element
(
std
::
begin
(
vec
.
vector
()),
std
::
end
(
vec
.
vector
()));
AMDIS_TEST
(
*
m0
==
T
(
0
)
);
AMDIS_TEST
(
*
m1
==
T
(
1
)
);
// DOFVector models the concept of a VectorBackend in Dune::Functions
static_assert
(
Dune
::
models
<
Dune
::
Functions
::
Concept
::
VectorBackend
<
B
>
,
decltype
(
vec
)
>
(),
""
);
}
int
main
()
int
main
(
int
argc
,
char
**
argv
)
{
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
// create grid
Dune
::
FieldVector
<
double
,
2
>
L
;
L
=
1.0
;
auto
s
=
Dune
::
filledArray
<
2
>
(
1
);
...
...
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