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
095370dd
Commit
095370dd
authored
Apr 14, 2020
by
Praetorius, Simon
Browse files
use std::void_t instead of Dune::void_t
parent
c243b2b0
Changes
8
Hide whitespace changes
Inline
Side-by-side
amdis/ContextGeometry.hpp
View file @
095370dd
...
...
@@ -10,7 +10,7 @@ namespace AMDiS
{
namespace
Impl
{
template
<
class
E
,
class
=
Dune
::
void_t
<
>
>
template
<
class
E
,
class
=
std
::
void_t
<
>
>
struct
ContextTypes
{
using
Entity
=
E
;
...
...
@@ -19,7 +19,7 @@ namespace AMDiS
// specialization for intersections
template
<
class
I
>
struct
ContextTypes
<
I
,
Dune
::
void_t
<
decltype
(
std
::
declval
<
I
>
().
inside
())
>>
struct
ContextTypes
<
I
,
std
::
void_t
<
decltype
(
std
::
declval
<
I
>
().
inside
())
>>
{
using
Entity
=
typename
I
::
Entity
;
using
LocalGeometry
=
typename
I
::
LocalGeometry
;
...
...
amdis/common/ConceptsBase.hpp
View file @
095370dd
...
...
@@ -20,19 +20,17 @@
namespace
AMDiS
{
using
Dune
::
void_t
;
namespace
Concepts
{
namespace
Impl_
{
template
<
class
Concept
,
class
=
void_t
<
>
>
template
<
class
Concept
,
class
=
std
::
void_t
<
>
>
struct
models
:
std
::
false_type
{};
template
<
class
Concept
,
class
...
Ts
>
struct
models
<
Concept
(
Ts
...),
void_t
<
decltype
(
std
::
declval
<
Concept
>
().
require
(
std
::
declval
<
Ts
>
()...))
>>
struct
models
<
Concept
(
Ts
...),
std
::
void_t
<
decltype
(
std
::
declval
<
Concept
>
().
require
(
std
::
declval
<
Ts
>
()...))
>>
:
std
::
true_type
{};
...
...
amdis/functions/GlobalIdSet.hpp
View file @
095370dd
...
...
@@ -36,7 +36,7 @@ namespace Dune
namespace
AMDiS
{
// forward declaration
template
<
class
PreBasis
,
class
TP
,
class
=
void
>
template
<
class
PreBasis
,
class
TP
,
class
NodeTag
=
typename
Node_t
<
PreBasis
,
TP
>
::
NodeTag
>
class
NodeIdSet
;
/// \brief Type of a global used used to represent DOFs uniquely
...
...
@@ -102,7 +102,7 @@ namespace AMDiS
* ```
*
**/
template
<
class
GB
,
class
=
void
>
template
<
class
GB
,
class
=
std
::
void_t
<
>
>
class
GlobalBasisIdSet
{
public:
...
...
@@ -192,7 +192,7 @@ namespace AMDiS
// Specialization for SubspaceBasis
template
<
class
Basis
>
class
GlobalBasisIdSet
<
Basis
,
void_t
<
typename
Basis
::
RootBasis
>>
class
GlobalBasisIdSet
<
Basis
,
std
::
void_t
<
typename
Basis
::
RootBasis
>>
:
public
GlobalBasisIdSet
<
typename
Basis
::
RootBasis
>
{
public:
...
...
@@ -202,7 +202,7 @@ namespace AMDiS
};
template
<
class
PB
,
class
TP
,
class
>
template
<
class
PB
,
class
TP
,
class
NodeTag
>
class
NodeIdSet
{
public:
...
...
@@ -284,7 +284,7 @@ namespace AMDiS
// Specialization for PowerBasis
template
<
class
PreBasis
,
class
TP
>
class
NodeIdSet
<
PreBasis
,
TP
,
void_t
<
typename
PreBasis
::
SubPreBasis
>
>
class
NodeIdSet
<
PreBasis
,
TP
,
Dune
::
TypeTree
::
PowerNodeTag
>
{
public:
using
Node
=
Node_t
<
PreBasis
,
TP
>
;
...
...
@@ -344,7 +344,7 @@ namespace AMDiS
// Specialization for CompositePreBasis
template
<
class
PreBasis
,
class
TP
>
class
NodeIdSet
<
PreBasis
,
TP
,
void_t
<
typename
PreBasis
::
SubPreBases
>
>
class
NodeIdSet
<
PreBasis
,
TP
,
Dune
::
TypeTree
::
CompositeNodeTag
>
{
public:
using
Node
=
Node_t
<
PreBasis
,
TP
>
;
...
...
@@ -420,7 +420,7 @@ namespace AMDiS
template
<
class
GV
,
class
MI
,
bool
HI
,
class
TP
>
class
NodeIdSet
<
Dune
::
Functions
::
TaylorHoodPreBasis
<
GV
,
MI
,
HI
>
,
TP
>
class
NodeIdSet
<
Dune
::
Functions
::
TaylorHoodPreBasis
<
GV
,
MI
,
HI
>
,
TP
,
Dune
::
TypeTree
::
CompositeNodeTag
>
{
public:
using
PreBasis
=
Dune
::
Functions
::
TaylorHoodPreBasis
<
GV
,
MI
,
HI
>
;
...
...
amdis/gridfunctions/Derivative.hpp
View file @
095370dd
...
...
@@ -10,9 +10,9 @@ namespace AMDiS
{
/// The derivative of a localfunction as localfunction itself
template
<
class
LocalFunction
,
class
Type
,
REQUIRES
(
std
::
is_convertible_v
<
tag
::
derivative_type
,
Type
>),
class
=
void_t
<
decltype
(
std
::
declval
<
LocalFunction
>
().
makeDerivative
(
std
::
declval
<
Type
>
()))
>
>
REQUIRES
(
std
::
is_convertible_v
<
tag
::
derivative_type
,
Type
>)
>
auto
derivative
(
LocalFunction
const
&
lf
,
Type
const
&
type
)
->
decltype
(
lf
.
makeDerivative
(
type
))
{
return
lf
.
makeDerivative
(
type
);
}
...
...
amdis/gridfunctions/DiscreteFunction.hpp
View file @
095370dd
...
...
@@ -39,7 +39,7 @@ namespace AMDiS
/// A Generator for a mutable \ref DiscreteFunction
template
<
class
Coeff
,
class
GB
,
class
Path
=
RootTreePath
,
class
=
void_t
<
decltype
(
std
::
declval
<
GB
>().
localView
())
>
>
class
=
std
::
void_t
<
decltype
(
std
::
declval
<
GB
>().
localView
())
>
>
auto
makeDiscreteFunction
(
Coeff
&
coefficients
,
GB
const
&
basis
,
Path
const
&
path
=
{})
{
return
DiscreteFunction
<
Coeff
,
GB
,
TreePath_t
<
Path
>>
{
coefficients
,
basis
,
path
};
...
...
amdis/gridfunctions/GridFunction.hpp
View file @
095370dd
#pragma once
#include
<type_traits>
#include
<dune/common/typeutilities.hh>
#include
<amdis/common/Concepts.hpp>
...
...
@@ -10,9 +12,9 @@
namespace
AMDiS
{
// The localFunction of a GridFunction
template
<
class
GridFunction
,
class
=
void_t
<
decltype
(
std
::
declval
<
GridFunction
>().
makeLocalFunction
())
>
>
template
<
class
GridFunction
>
auto
localFunction
(
GridFunction
const
&
gf
)
->
decltype
(
gf
.
makeLocalFunction
())
{
return
gf
.
makeLocalFunction
();
}
...
...
@@ -46,7 +48,7 @@ namespace AMDiS
struct
HasGridFunctionTypes
{
template
<
class
GF
>
auto
require
(
GF
const
&
/*gf*/
)
->
void_t
<
auto
require
(
GF
const
&
/*gf*/
)
->
std
::
void_t
<
typename
GF
::
Range
,
typename
GF
::
Domain
,
typename
GF
::
EntitySet
...
...
amdis/gridfunctions/Order.hpp
View file @
095370dd
#pragma once
#include
<type_traits>
#include
<amdis/common/Concepts.hpp>
namespace
AMDiS
{
// polynomial order of local functions
template
<
class
LocalFunction
,
class
=
void_t
<
decltype
(
std
::
declval
<
LocalFunction
>().
order
())
>
>
int
order
(
LocalFunction
const
&
lf
)
template
<
class
LocalFunction
>
auto
order
(
LocalFunction
const
&
lf
)
->
decltype
(
lf
.
order
()
)
{
return
lf
.
order
();
}
...
...
amdis/linearalgebra/VectorFacade.hpp
View file @
095370dd
...
...
@@ -60,7 +60,7 @@ namespace AMDiS
/// Constructor. Forwards the basis to the implementation class and
/// constructs a (type-erased) size-info object.
template
<
class
GlobalBasis
,
class
=
void_t
<
decltype
(
std
::
declval
<
GlobalBasis
>().
dimension
())
>
>
class
=
std
::
void_t
<
decltype
(
std
::
declval
<
GlobalBasis
>().
dimension
())
>
>
VectorFacade
(
GlobalBasis
const
&
basis
)
:
impl_
(
basis
)
{
...
...
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