Skip to content
GitLab
Menu
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
9791f45d
Commit
9791f45d
authored
Jan 31, 2020
by
Praetorius, Simon
Browse files
workaround for communicators in blocked bases, use SequentialCommunication if not flat MultiIndex
parent
e11f58ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/amdis/functions/ParallelGlobalBasis.hpp
View file @
9791f45d
...
@@ -23,12 +23,13 @@
...
@@ -23,12 +23,13 @@
#include
<dune/typetree/treepath.hh>
#include
<dune/typetree/treepath.hh>
#include
<amdis/common/Concepts.hpp>
#include
<amdis/common/TypeTraits.hpp>
#include
<amdis/linearalgebra/Traits.hpp>
#include
<amdis/AdaptiveGrid.hpp>
#include
<amdis/AdaptiveGrid.hpp>
#include
<amdis/Observer.hpp>
#include
<amdis/Observer.hpp>
#include
<amdis/Output.hpp>
#include
<amdis/Output.hpp>
#include
<amdis/common/Concepts.hpp>
#include
<amdis/common/TypeTraits.hpp>
#include
<amdis/linearalgebra/Traits.hpp>
#include
<amdis/typetree/MultiIndex.hpp>
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
#include
<dune/functions/functionspacebases/defaultlocalindexset.hh>
#include
<dune/functions/functionspacebases/defaultlocalindexset.hh>
...
@@ -65,7 +66,9 @@ namespace AMDiS
...
@@ -65,7 +66,9 @@ namespace AMDiS
using
LocalView
=
Dune
::
Functions
::
DefaultLocalView
<
Self
>
;
using
LocalView
=
Dune
::
Functions
::
DefaultLocalView
<
Self
>
;
/// Type of the communicator
/// Type of the communicator
using
Comm
=
typename
BackendTraits
<
Self
>::
Comm
;
using
Comm
=
std
::
conditional_t
<
Traits
::
IsFlatIndex
<
typename
Super
::
MultiIndex
>::
value
,
typename
BackendTraits
<
Self
>::
Comm
,
SequentialCommunication
>
;
struct
DummyImpl
{};
struct
DummyImpl
{};
using
ADH
=
Dune
::
AdaptDataHandle
<
Grid
,
DummyImpl
>
;
using
ADH
=
Dune
::
AdaptDataHandle
<
Grid
,
DummyImpl
>
;
...
...
src/amdis/typetree/MultiIndex.hpp
View file @
9791f45d
...
@@ -5,6 +5,21 @@
...
@@ -5,6 +5,21 @@
namespace
AMDiS
namespace
AMDiS
{
{
namespace
Traits
{
template
<
class
T
>
struct
IsFlatIndex
:
std
::
is_integral
<
T
>
{};
template
<
class
I
>
struct
IsFlatIndex
<
Dune
::
Functions
::
FlatMultiIndex
<
I
>
>
:
std
::
true_type
{};
template
<
class
I
>
struct
IsFlatIndex
<
Dune
::
ReservedVector
<
I
,
1
>
>
:
std
::
true_type
{};
}
inline
std
::
size_t
flatMultiIndex
(
std
::
size_t
idx
)
inline
std
::
size_t
flatMultiIndex
(
std
::
size_t
idx
)
{
{
return
idx
;
return
idx
;
...
...
Write
Preview
Supports
Markdown
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