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
Core Modules
dune-localfunctions
Commits
52d168b8
Commit
52d168b8
authored
Nov 05, 2021
by
Christoph Grüninger
Browse files
Merge branch 'feature/deprecation-dune-28' into 'master'
Handle Dune 2.8 deprecations See merge request
!208
parents
e4f25850
39325ce1
Changes
25
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
52d168b8
# Master (will become release 2.9)
## Deprecations and removals
-
Deprecated many of the Lagrange headers, use
`lagrange(cube|prism|pyramid|simplex).hh`
instead.
# Release 2.8
*
Passing functions that support
`f.evaluate(x,y)`
to
`interpolate()`
...
...
dune/localfunctions/dualmortarbasis/test/test-biorthogonality.cc
View file @
52d168b8
...
...
@@ -10,8 +10,8 @@
#include <dune/geometry/affinegeometry.hh>
#include <dune/geometry/referenceelements.hh>
#include <dune/localfunctions/lagrange/
p1
.hh>
#include <dune/localfunctions/lagrange/
q1
.hh>
#include <dune/localfunctions/lagrange/
lagrangecube
.hh>
#include <dune/localfunctions/lagrange/
lagrangesimplex
.hh>
#include <dune/localfunctions/dualmortarbasis/dualp1.hh>
#include <dune/localfunctions/dualmortarbasis/dualq1.hh>
...
...
@@ -169,27 +169,27 @@ int main(int argc, char** argv)
{
bool
success
=
true
;
Dune
::
DualP1LocalFiniteElement
<
double
,
double
,
1
>
dualP1lfem1D
;
Dune
::
P1
LocalFiniteElement
<
double
,
double
,
1
>
p1lfem1D
;
Dune
::
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
1
,
1
>
p1lfem1D
;
success
=
testBiorthogonality
(
dualP1lfem1D
,
p1lfem1D
)
and
success
;
Dune
::
DualP1LocalFiniteElement
<
double
,
double
,
2
>
dualP1lfem2D
;
Dune
::
P1
LocalFiniteElement
<
double
,
double
,
2
>
p1lfem2D
;
Dune
::
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
p1lfem2D
;
success
=
testBiorthogonality
(
dualP1lfem2D
,
p1lfem2D
)
and
success
;
Dune
::
DualP1LocalFiniteElement
<
double
,
double
,
3
>
dualP1lfem3D
;
Dune
::
P1
LocalFiniteElement
<
double
,
double
,
3
>
p1lfem3D
;
Dune
::
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
1
>
p1lfem3D
;
success
=
testBiorthogonality
(
dualP1lfem3D
,
p1lfem3D
)
and
success
;
Dune
::
DualQ1LocalFiniteElement
<
double
,
double
,
1
>
dualQ1lfem1D
;
Dune
::
Q1
LocalFiniteElement
<
double
,
double
,
1
>
q1lfem1D
;
Dune
::
LagrangeCube
LocalFiniteElement
<
double
,
double
,
1
,
1
>
q1lfem1D
;
success
=
testBiorthogonality
(
dualQ1lfem1D
,
q1lfem1D
)
and
success
;
Dune
::
DualQ1LocalFiniteElement
<
double
,
double
,
2
>
dualQ1lfem2D
;
Dune
::
Q1
LocalFiniteElement
<
double
,
double
,
2
>
q1lfem2D
;
Dune
::
LagrangeCube
LocalFiniteElement
<
double
,
double
,
2
,
1
>
q1lfem2D
;
success
=
testBiorthogonality
(
dualQ1lfem2D
,
q1lfem2D
)
and
success
;
Dune
::
DualQ1LocalFiniteElement
<
double
,
double
,
3
>
dualQ1lfem3D
;
Dune
::
Q1
LocalFiniteElement
<
double
,
double
,
3
>
q1lfem3D
;
Dune
::
LagrangeCube
LocalFiniteElement
<
double
,
double
,
3
,
1
>
q1lfem3D
;
success
=
testBiorthogonality
(
dualQ1lfem3D
,
q1lfem3D
)
and
success
;
Dune
::
DualP1LocalFiniteElement
<
double
,
double
,
1
,
true
>
dualFaceP1lfem1D
;
...
...
dune/localfunctions/hierarchical/hierarchicalp2.hh
View file @
52d168b8
...
...
@@ -6,7 +6,7 @@
#include <dune/geometry/type.hh>
#include <dune/localfunctions/common/localfiniteelementtraits.hh>
#include <dune/localfunctions/lagrange/
pk
.hh>
#include <dune/localfunctions/lagrange/
lagrangesimplex
.hh>
#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh"
#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh"
...
...
@@ -28,7 +28,7 @@ namespace Dune
*/
typedef
LocalFiniteElementTraits
<
HierarchicalSimplexP2LocalBasis
<
D
,
R
,
dim
>
,
typename
Pk
LocalFiniteElement
<
D
,
R
,
dim
,
2
>::
Traits
::
LocalCoefficientsType
,
typename
LagrangeSimplex
LocalFiniteElement
<
D
,
R
,
dim
,
2
>::
Traits
::
LocalCoefficientsType
,
HierarchicalSimplexP2LocalInterpolation
<
HierarchicalSimplexP2LocalBasis
<
D
,
R
,
dim
>
>
>
Traits
;
/** \todo Please doc me !
...
...
dune/localfunctions/lagrange.hh
View file @
52d168b8
...
...
@@ -17,27 +17,12 @@
// Headers for Lagrange elements with compile-time order
#include <dune/localfunctions/lagrange/lagrangecube.hh>
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#include <dune/localfunctions/lagrange/p0.hh>
#include <dune/localfunctions/lagrange/p1.hh>
#include <dune/localfunctions/lagrange/p2.hh>
#include <dune/localfunctions/lagrange/p23d.hh>
#include <dune/localfunctions/lagrange/pk.hh>
#include <dune/localfunctions/lagrange/pk1d.hh>
#include <dune/localfunctions/lagrange/pk2d.hh>
#include <dune/localfunctions/lagrange/pk3d.hh>
#include <dune/localfunctions/lagrange/pq22d.hh>
#include <dune/localfunctions/lagrange/q1.hh>
#include <dune/localfunctions/lagrange/q2.hh>
#include <dune/localfunctions/lagrange/qk.hh>
#include <dune/localfunctions/lagrange/prismp1.hh>
#include <dune/localfunctions/lagrange/prismp2.hh>
#include <dune/localfunctions/lagrange/pyramidp1.hh>
#include <dune/localfunctions/lagrange/pyramidp2.hh>
namespace
Dune
{
/**
...
...
dune/localfunctions/lagrange/lagrangelfecache.hh
View file @
52d168b8
...
...
@@ -9,13 +9,11 @@
#include <dune/geometry/type.hh>
#include <dune/geometry/typeindex.hh>
#include <dune/localfunctions/lagrange/lagrangecube.hh>
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#include <dune/localfunctions/lagrange/p0.hh>
#include <dune/localfunctions/lagrange/pk.hh>
#include <dune/localfunctions/lagrange/qk.hh>
#include <dune/localfunctions/lagrange/prismp1.hh>
#include <dune/localfunctions/lagrange/prismp2.hh>
#include <dune/localfunctions/lagrange/pyramidp1.hh>
#include <dune/localfunctions/lagrange/pyramidp2.hh>
#include <dune/localfunctions/common/localfiniteelementvariantcache.hh>
...
...
@@ -34,8 +32,8 @@ namespace Impl {
static
auto
getImplementations
()
{
return
std
::
make_tuple
(
std
::
make_pair
(
index
(
GeometryTypes
::
simplex
(
dim
)),
[]()
{
return
Pk
LocalFiniteElement
<
D
,
R
,
dim
,
order
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
cube
(
dim
)),
[]()
{
return
Qk
LocalFiniteElement
<
D
,
R
,
dim
,
order
>
();
})
std
::
make_pair
(
index
(
GeometryTypes
::
simplex
(
dim
)),
[]()
{
return
LagrangeSimplex
LocalFiniteElement
<
D
,
R
,
dim
,
order
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
cube
(
dim
)),
[]()
{
return
LagrangeCube
LocalFiniteElement
<
D
,
R
,
dim
,
order
>
();
})
);
}
};
...
...
@@ -76,10 +74,10 @@ namespace Impl {
static
auto
getImplementations
()
{
return
std
::
make_tuple
(
std
::
make_pair
(
index
(
GeometryTypes
::
tetrahedron
),
[]()
{
return
Pk
LocalFiniteElement
<
D
,
R
,
3
,
1
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
hexahedron
),
[]()
{
return
Qk
LocalFiniteElement
<
D
,
R
,
3
,
1
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
prism
),
[]()
{
return
Prism
P1
LocalFiniteElement
<
D
,
R
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
pyramid
),
[]()
{
return
Pyramid
P1
LocalFiniteElement
<
D
,
R
>
();
})
std
::
make_pair
(
index
(
GeometryTypes
::
tetrahedron
),
[]()
{
return
LagrangeSimplex
LocalFiniteElement
<
D
,
R
,
3
,
1
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
hexahedron
),
[]()
{
return
LagrangeCube
LocalFiniteElement
<
D
,
R
,
3
,
1
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
prism
),
[]()
{
return
Lagrange
PrismLocalFiniteElement
<
D
,
R
,
1
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
pyramid
),
[]()
{
return
Lagrange
PyramidLocalFiniteElement
<
D
,
R
,
1
>
();
})
);
}
};
...
...
@@ -91,10 +89,10 @@ namespace Impl {
static
auto
getImplementations
()
{
return
std
::
make_tuple
(
std
::
make_pair
(
index
(
GeometryTypes
::
tetrahedron
),
[]()
{
return
Pk
LocalFiniteElement
<
D
,
R
,
3
,
2
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
hexahedron
),
[]()
{
return
Qk
LocalFiniteElement
<
D
,
R
,
3
,
2
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
prism
),
[]()
{
return
Prism
P2
LocalFiniteElement
<
D
,
R
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
pyramid
),
[]()
{
return
Pyramid
P2
LocalFiniteElement
<
D
,
R
>
();
})
std
::
make_pair
(
index
(
GeometryTypes
::
tetrahedron
),
[]()
{
return
LagrangeSimplex
LocalFiniteElement
<
D
,
R
,
3
,
2
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
hexahedron
),
[]()
{
return
LagrangeCube
LocalFiniteElement
<
D
,
R
,
3
,
2
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
prism
),
[]()
{
return
Lagrange
PrismLocalFiniteElement
<
D
,
R
,
2
>
();
}),
std
::
make_pair
(
index
(
GeometryTypes
::
pyramid
),
[]()
{
return
Lagrange
PyramidLocalFiniteElement
<
D
,
R
,
2
>
();
})
);
}
};
...
...
dune/localfunctions/lagrange/p1.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -16,7 +18,9 @@ namespace Dune
\deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
,
int
dim
>
using
P1LocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
dim
,
1
>
;
using
P1LocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
dim
,
1
>
;
}
...
...
dune/localfunctions/lagrange/p2.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -13,7 +15,9 @@ namespace Dune
\deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
,
int
d
>
using
P2LocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
d
,
2
>
;
using
P2LocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
d
,
2
>
;
}
...
...
dune/localfunctions/lagrange/p23d.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -16,7 +18,9 @@ namespace Dune
* \deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
>
using
P23DLocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
3
,
2
>
;
using
P23DLocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
3
,
2
>
;
}
...
...
dune/localfunctions/lagrange/pk.hh
View file @
52d168b8
...
...
@@ -6,10 +6,17 @@
#include<dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
/**
* \deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
,
int
d
,
int
k
>
using
PkLocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
d
,
k
>
;
using
PkLocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
d
,
k
>
;
}
#endif
dune/localfunctions/lagrange/pk1d.hh
View file @
52d168b8
...
...
@@ -11,6 +11,8 @@
#include <dune/localfunctions/common/localtoglobaladaptors.hh>
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -19,7 +21,9 @@ namespace Dune
\deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
,
unsigned
int
k
>
using
Pk1DLocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
1
,
k
>
;
using
Pk1DLocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
1
,
k
>
;
//! Langrange finite element of arbitrary order on triangles
...
...
dune/localfunctions/lagrange/pk2d.hh
View file @
52d168b8
...
...
@@ -11,6 +11,8 @@
#include <dune/localfunctions/common/localtoglobaladaptors.hh>
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -19,7 +21,9 @@ namespace Dune
\deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
,
unsigned
int
k
>
using
Pk2DLocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
2
,
k
>
;
using
Pk2DLocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
2
,
k
>
;
//! Langrange finite element of arbitrary order on triangles
...
...
dune/localfunctions/lagrange/pk3d.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -13,7 +15,9 @@ namespace Dune
\deprecated This class is obsolete. Please use LagrangeSimplexLocalFiniteElement instead!
*/
template
<
class
D
,
class
R
,
unsigned
int
k
>
using
Pk3DLocalFiniteElement
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
3
,
k
>
;
using
Pk3DLocalFiniteElement
[[
deprecated
(
"use LagrangeSimplexLocalFiniteElement instead"
)]]
=
LagrangeSimplexLocalFiniteElement
<
D
,
R
,
3
,
k
>
;
}
...
...
dune/localfunctions/lagrange/pqkfactory.hh
View file @
52d168b8
...
...
@@ -10,14 +10,11 @@
#include <dune/localfunctions/common/virtualinterface.hh>
#include <dune/localfunctions/common/virtualwrappers.hh>
#include <dune/localfunctions/lagrange/lagrangecube.hh>
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
#include <dune/localfunctions/lagrange/p0.hh>
#include <dune/localfunctions/lagrange/pk.hh>
#include <dune/localfunctions/lagrange/q1.hh>
#include <dune/localfunctions/lagrange/qk.hh>
#include <dune/localfunctions/lagrange/prismp1.hh>
#include <dune/localfunctions/lagrange/prismp2.hh>
#include <dune/localfunctions/lagrange/pyramidp1.hh>
#include <dune/localfunctions/lagrange/pyramidp2.hh>
namespace
Dune
{
...
...
@@ -46,10 +43,10 @@ namespace Dune
struct
DimSpecificPQkLocalFiniteElementFactory
<
D
,
R
,
3
,
k
>
{
typedef
typename
P0LocalFiniteElement
<
D
,
R
,
3
>::
Traits
::
LocalBasisType
::
Traits
T
;
typedef
PrismP1LocalFiniteElement
<
D
,
R
>
PrismP1
;
typedef
PrismP2LocalFiniteElement
<
D
,
R
>
PrismP2
;
typedef
PyramidP1LocalFiniteElement
<
D
,
R
>
PyramidP1
;
typedef
PyramidP2LocalFiniteElement
<
D
,
R
>
PyramidP2
;
using
PrismP1
=
LagrangePrism
LocalFiniteElement
<
D
,
R
,
1
>
;
using
PrismP2
=
LagrangePrism
LocalFiniteElement
<
D
,
R
,
2
>
;
using
PyramidP1
=
LagrangePyramid
LocalFiniteElement
<
D
,
R
,
1
>
;
using
PyramidP2
=
LagrangePyramid
LocalFiniteElement
<
D
,
R
,
2
>
;
//! create finite element for given GeometryType
static
LocalFiniteElementVirtualInterface
<
T
>*
create
(
const
GeometryType
&
gt
)
...
...
@@ -75,9 +72,9 @@ namespace Dune
{
typedef
typename
P0LocalFiniteElement
<
D
,
R
,
dim
>::
Traits
::
LocalBasisType
::
Traits
T
;
typedef
LocalFiniteElementVirtualInterface
<
T
>
FiniteElementType
;
typedef
P0LocalFiniteElement
<
D
,
R
,
dim
>
P0
;
typedef
Pk
LocalFiniteElement
<
D
,
R
,
dim
,
k
>
Pk
;
typedef
Qk
LocalFiniteElement
<
D
,
R
,
dim
,
k
>
Qk
;
using
P0
=
P0LocalFiniteElement
<
D
,
R
,
dim
>
;
using
Pk
=
LagrangeSimplex
LocalFiniteElement
<
D
,
R
,
dim
,
k
>
;
using
Qk
=
LagrangeCube
LocalFiniteElement
<
D
,
R
,
dim
,
k
>
;
//! create finite element for given GeometryType
...
...
dune/localfunctions/lagrange/prismp1.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -13,7 +15,9 @@ namespace Dune
* \deprecated Please use LagrangePrismLocalFiniteElement<D,R,2> instead!
*/
template
<
class
D
,
class
R
>
using
PrismP1LocalFiniteElement
=
LagrangePrismLocalFiniteElement
<
D
,
R
,
1
>
;
using
PrismP1LocalFiniteElement
[[
deprecated
(
"use LagrangePrismLocalFiniteElement instead"
)]]
=
LagrangePrismLocalFiniteElement
<
D
,
R
,
1
>
;
}
...
...
dune/localfunctions/lagrange/prismp2.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -13,7 +15,9 @@ namespace Dune
* \deprecated Please use LagrangePrismLocalFiniteElement<D,R,2> instead!
*/
template
<
class
D
,
class
R
>
using
PrismP2LocalFiniteElement
=
LagrangePrismLocalFiniteElement
<
D
,
R
,
2
>
;
using
PrismP2LocalFiniteElement
[[
deprecated
(
"use LagrangePrismLocalFiniteElement instead"
)]]
=
LagrangePrismLocalFiniteElement
<
D
,
R
,
2
>
;
}
...
...
dune/localfunctions/lagrange/pyramidp1.hh
View file @
52d168b8
...
...
@@ -6,6 +6,8 @@
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -14,7 +16,9 @@ namespace Dune
* \deprecated Please use LagrangePyramidLocalFiniteElement<D,R,1> instead!
*/
template
<
class
D
,
class
R
>
using
PyramidP1LocalFiniteElement
=
LagrangePyramidLocalFiniteElement
<
D
,
R
,
1
>
;
using
PyramidP1LocalFiniteElement
[[
deprecated
(
"use LagrangePyramidLocalFiniteElement instead"
)]]
=
LagrangePyramidLocalFiniteElement
<
D
,
R
,
1
>
;
}
...
...
dune/localfunctions/lagrange/pyramidp2.hh
View file @
52d168b8
...
...
@@ -5,6 +5,8 @@
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -13,7 +15,9 @@ namespace Dune
* \deprecated Please use LagrangePyramidLocalFiniteElement<D,R,2> instead!
*/
template
<
class
D
,
class
R
>
using
PyramidP2LocalFiniteElement
=
LagrangePyramidLocalFiniteElement
<
D
,
R
,
2
>
;
using
PyramidP2LocalFiniteElement
[[
deprecated
(
"use LagrangePyramidLocalFiniteElement instead"
)]]
=
LagrangePyramidLocalFiniteElement
<
D
,
R
,
2
>
;
}
...
...
dune/localfunctions/lagrange/q1.hh
View file @
52d168b8
...
...
@@ -10,6 +10,8 @@
#include <dune/localfunctions/common/localtoglobaladaptors.hh>
#include <dune/localfunctions/lagrange/lagrangecube.hh>
#warning This header is deprecated
namespace
Dune
{
...
...
@@ -20,95 +22,11 @@ namespace Dune
\deprecated This class is deprecated! Please use LagrangeCubeLocalFiniteElement instead.
*/
// The test test-q1.cc triggers compiler bugs in gcc-6 and earlier when Q1LocalFiniteElement
// is simply redefined as LagrangeCubeLocalFiniteElement: it grabs more and more main memory,
// and eventually stalls the machine. Since I didn't find the real cause for this let's just
// keep the relevant parts of Q1LocalFiniteElement until we can retire the problematic gcc versions.
#if !defined __GNUC__ || __GNUC__ > 6
template
<
class
D
,
class
R
,
int
dim
>
using
Q1LocalFiniteElement
=
LagrangeCubeLocalFiniteElement
<
D
,
R
,
dim
,
1
>
;
#else
template
<
int
dim
>
class
Q1LocalCoefficients
{
public:
//! \brief Standard constructor
Q1LocalCoefficients
()
:
li
(
1
<<
dim
)
{
for
(
std
::
size_t
i
=
0
;
i
<
(
1
<<
dim
);
i
++
)
li
[
i
]
=
LocalKey
(
i
,
dim
,
0
);
}
//! number of coefficients
std
::
size_t
size
()
const
{
return
1
<<
dim
;
}
//! get i'th index
const
LocalKey
&
localKey
(
std
::
size_t
i
)
const
{
return
li
[
i
];
}
private:
std
::
vector
<
LocalKey
>
li
;
};
template
<
class
D
,
class
R
,
int
dim
>
class
Q1LocalFiniteElement
{
public:
// user-defined default constructor is required for clang 3.8,
// see https://gitlab.dune-project.org/core/dune-localfunctions/merge_requests/60
/** default constructor */
Q1LocalFiniteElement
()
{}
/** \todo Please doc me !
*/
typedef
LocalFiniteElementTraits
<
Impl
::
LagrangeCubeLocalBasis
<
D
,
R
,
dim
,
1
>
,
Q1LocalCoefficients
<
dim
>
,
Impl
::
LagrangeCubeLocalInterpolation
<
Impl
::
LagrangeCubeLocalBasis
<
D
,
R
,
dim
,
1
>
>
>
Traits
;
using
Q1LocalFiniteElement
[[
deprecated
(
"use LagrangeCubeLocalFiniteElement instead"
)]]
=
LagrangeCubeLocalFiniteElement
<
D
,
R
,
dim
,
1
>
;
/** \todo Please doc me !
*/
const
typename
Traits
::
LocalBasisType
&
localBasis
()
const
{
return
basis
;
}
/** \todo Please doc me !
*/
const
typename
Traits
::
LocalCoefficientsType
&
localCoefficients
()
const
{
return
coefficients
;
}
/** \todo Please doc me !
*/
const
typename
Traits
::
LocalInterpolationType
&
localInterpolation
()
const
{
return
interpolation
;
}
/** \brief Number of shape functions in this finite element */
unsigned
int
size
()
const
{
return
basis
.
size
();
}
/** \todo Please doc me !
*/
static
constexpr
GeometryType
type
()
{
return
GeometryTypes
::
cube
(
dim
);
}
private:
Impl
::
LagrangeCubeLocalBasis
<
D
,
R
,
dim
,
1
>
basis
;
Q1LocalCoefficients
<
dim
>
coefficients
;
Impl
::
LagrangeCubeLocalInterpolation
<
Impl
::
LagrangeCubeLocalBasis
<
D
,
R
,
dim
,
1
>
>
interpolation
;
};
#endif
//! Factory for global-valued Q1 elements
/**
...
...
@@ -119,27 +37,15 @@ namespace Dune
template
<
class
Geometry
,
class
RF
>
class
Q1FiniteElementFactory
:
public
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
#if !defined __GNUC__ || __GNUC__ > 6
LagrangeCubeLocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
,
1
>
,
#else
Q1LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
>
,
#endif
Geometry
>
{
#if !defined __GNUC__ || __GNUC__ > 6
typedef
LagrangeCubeLocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
,
1
>
LFE
;
#else
typedef
Q1LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
>
LFE
;
#endif
typedef
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
LFE
,
Geometry
>
Base
;
static
const
LFE
lfe
;
...
...
dune/localfunctions/lagrange/q2.hh
View file @
52d168b8
...
...
@@ -8,8 +8,9 @@
#include <dune/localfunctions/common/localfiniteelementtraits.hh>
#include <dune/localfunctions/common/localtoglobaladaptors.hh>
#include "pk.hh"
#include "qk.hh"
#include <dune/localfunctions/lagrange/lagrangecube.hh>
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
namespace
Dune
{
...
...
@@ -23,13 +24,13 @@ namespace Dune
class
Q2FiniteElementFactory
:
public
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
typename
std
::
conditional
<
Geometry
::
mydimension
==
1
,
Pk
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
1
,
2
>
,
Qk
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
,
2
>
>::
type
,
LagrangeSimplex
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
1
,
2
>
,
LagrangeCube
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
,
2
>
>::
type
,
Geometry
>
{
typedef
typename
std
::
conditional
<
Geometry
::
mydimension
==
1
,
Pk
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
1
,
2
>
,
Qk
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
,
2
>
>::
type
LFE
;
LagrangeSimplex
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
1
,
2
>
,
LagrangeCube
LocalFiniteElement
<
typename
Geometry
::
ctype
,
RF
,
Geometry
::
mydimension
,
2
>
>::
type
LFE
;
typedef
ScalarLocalToGlobalFiniteElementAdaptorFactory
<
LFE
,
Geometry
>
Base
;
static
const
LFE
lfe
;
...
...
dune/localfunctions/lagrange/qk.hh
View file @
52d168b8
...
...
@@ -6,6 +6,8 @@