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
3ff5756b
Commit
3ff5756b
authored
Apr 14, 2020
by
Praetorius, Simon
Browse files
Remove check for class template argument deduction
parent
bf6a91cb
Changes
10
Hide whitespace changes
Inline
Side-by-side
amdis/BiLinearForm.hpp
View file @
3ff5756b
...
...
@@ -180,7 +180,7 @@ namespace AMDiS
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// deduction guides
template
<
class
RB
,
class
CB
>
BiLinearForm
(
RB
&&
,
CB
&&
)
->
BiLinearForm
<
Underlying_t
<
RB
>
,
Underlying_t
<
CB
>>
;
...
...
@@ -188,7 +188,7 @@ namespace AMDiS
template
<
class
RB
>
BiLinearForm
(
RB
&&
)
->
BiLinearForm
<
Underlying_t
<
RB
>
,
Underlying_t
<
RB
>>
;
#endif
template
<
class
T
=
double
,
class
RB
,
class
CB
>
auto
makeBiLinearForm
(
RB
&&
rowBasis
,
CB
&&
colBasis
)
...
...
amdis/DOFVector.hpp
View file @
3ff5756b
...
...
@@ -218,11 +218,12 @@ namespace AMDiS
std
::
shared_ptr
<
GlobalBasis
const
>
basis_
;
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// deduction guides
template
<
class
GB
>
DOFVector
(
GB
&&
basis
,
DataTransferOperation
op
=
DataTransferOperation
::
INTERPOLATE
)
->
DOFVector
<
ParallelGlobalBasis
<
typename
Underlying_t
<
GB
>::
PreBasis
>>
;
#endif
/// \brief Create a DOFVector from a basis.
/**
...
...
amdis/LinearForm.hpp
View file @
3ff5756b
...
...
@@ -117,11 +117,11 @@ namespace AMDiS
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// deduction guide
template
<
class
GB
>
LinearForm
(
GB
&&
basis
)
->
LinearForm
<
Underlying_t
<
GB
>>
;
#endif
template
<
class
T
=
double
,
class
GB
>
auto
makeLinearForm
(
GB
&&
basis
)
...
...
amdis/Marker.hpp
View file @
3ff5756b
...
...
@@ -401,13 +401,12 @@ namespace AMDiS
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// Deduction guide for GridFunctionMarker class
template
<
class
Grid
,
class
GF
>
GridFunctionMarker
(
std
::
string
const
&
name
,
std
::
shared_ptr
<
Grid
>
const
&
grid
,
GF
&&
gf
)
->
GridFunctionMarker
<
Grid
,
TYPEOF
(
makeGridFunction
(
FWD
(
gf
),
grid
->
leafGridView
())
)
>
;
#endif
// Generator function for GridFunctionMarker class
template
<
class
Grid
,
class
PreGridFct
>
...
...
amdis/ProblemInstat.hpp
View file @
3ff5756b
...
...
@@ -86,8 +86,7 @@ namespace AMDiS
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// Deduction rule
// Deduction guides
template
<
class
Traits
>
ProblemInstat
(
std
::
string
const
&
name
,
ProblemStat
<
Traits
>&
prob
)
->
ProblemInstat
<
Traits
>
;
...
...
@@ -95,7 +94,7 @@ namespace AMDiS
template
<
class
Traits
>
ProblemInstat
(
std
::
string
const
&
name
,
ProblemStat
<
Traits
>&
prob
,
ProblemStatBase
&
initialProb
)
->
ProblemInstat
<
Traits
>
;
#endif
// Generator for ProblemInstat with given ProblemStat
template
<
class
Traits
>
...
...
amdis/ProblemStat.hpp
View file @
3ff5756b
...
...
@@ -516,12 +516,11 @@ namespace AMDiS
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// Deduction rule
// Deduction guide
template
<
class
Grid
,
class
GlobalBasis
>
ProblemStat
(
std
::
string
const
&
name
,
Grid
&
grid
,
GlobalBasis
&
globalBasis
)
->
ProblemStat
<
DefaultProblemTraits
<
GlobalBasis
>>
;
#endif
// Generator for ProblemStat with given Grid and GlobalBasis
template
<
class
Grid
,
class
GlobalBasis
>
...
...
amdis/gridfunctions/DiscreteFunction.hpp
View file @
3ff5756b
...
...
@@ -31,11 +31,12 @@ namespace AMDiS
template
<
class
Coeff
,
class
GB
,
class
TreePath
=
Dune
::
TypeTree
::
HybridTreePath
<
>
>
class
DiscreteFunction
;
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
// deduction guide
template
<
class
Coeff
,
class
GB
,
class
TreePath
=
RootTreePath
>
DiscreteFunction
(
Coeff
&
,
GB
const
&
,
TreePath
=
{})
->
DiscreteFunction
<
Coeff
,
GB
,
TreePath_t
<
TreePath
>>
;
#endif
/// A Generator for a mutable \ref DiscreteFunction
template
<
class
Coeff
,
class
GB
,
class
Path
=
RootTreePath
,
...
...
test/DOFVectorTest.cpp
View file @
3ff5756b
...
...
@@ -89,10 +89,8 @@ int main(int argc, char** argv)
auto
vec4
=
makeDOFVector
<
double
>
(
basis
);
test_dofvector
(
vec4
);
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
DOFVector
vec5
(
basis
);
test_dofvector
(
vec5
);
#endif
}
// test automatic updates
...
...
test/DiscreteFunctionTest.cpp
View file @
3ff5756b
...
...
@@ -62,10 +62,9 @@ int main(int argc, char** argv)
auto
const
&
U_c
=
*
prob
.
solutionVector
();
auto
&
U_m
=
*
prob
.
solutionVector
();
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
DiscreteFunction
u0_c
(
U_c
.
coefficients
(),
*
U_c
.
basis
());
DiscreteFunction
u0_m
(
U_m
.
coefficients
(),
*
U_m
.
basis
());
#endif
auto
u1_c
=
makeDiscreteFunction
(
U_c
);
auto
u1_m
=
makeDiscreteFunction
(
U_m
);
...
...
test/MarkerTest.cpp
View file @
3ff5756b
...
...
@@ -38,11 +38,8 @@ int main(int argc, char** argv)
return
{
1.0
/
(
0.1
+
std
::
min
(
distance
(
x0
,
x
),
distance
(
x1
,
x
)))
};
};
#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
GridFunctionMarker
marker
(
"mymarker"
,
prob
.
grid
(),
markerFunc
);
#else
auto
marker
=
makeGridFunctionMarker
(
"mymarker"
,
prob
.
grid
(),
markerFunc
);
#endif
auto
marker2
=
makeGridFunctionMarker
(
"mymarker"
,
prob
.
grid
(),
markerFunc
);
prob
.
addMarker
(
marker
);
...
...
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