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
806782ca
Commit
806782ca
authored
Oct 21, 2021
by
Christoph Grüninger
Browse files
Don't use deprecated Lagrange classes and headers
parent
75eef2ee
Changes
8
Hide whitespace changes
Inline
Side-by-side
dune/localfunctions/dualmortarbasis/test/test-biorthogonality.cc
View file @
806782ca
...
...
@@ -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 @
806782ca
...
...
@@ -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 @
806782ca
...
...
@@ -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 @
806782ca
...
...
@@ -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/pqkfactory.hh
View file @
806782ca
...
...
@@ -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/q2.hh
View file @
806782ca
...
...
@@ -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/test/lagrangeshapefunctiontest.cc
View file @
806782ca
...
...
@@ -7,20 +7,12 @@
#include <fenv.h>
#include <dune/localfunctions/lagrange/p0.hh>
#include <dune/localfunctions/lagrange/p1.hh>
#include <dune/localfunctions/lagrange/p23d.hh>
#include <dune/localfunctions/lagrange/pk1d.hh>
#include <dune/localfunctions/lagrange/pk2d.hh>
#include <dune/localfunctions/lagrange/pk3d.hh>
#include <dune/localfunctions/lagrange/pk.hh>
#include <dune/localfunctions/lagrange/q1.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/lagrange/pq22d.hh>
#include <dune/localfunctions/lagrange/lagrangelfecache.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/test/test-localfe.hh>
...
...
@@ -112,13 +104,13 @@ int main (int argc, char *argv[])
//////////////////////////////////////////////////////////
// Test for the Lagrange property
//////////////////////////////////////////////////////////
P1
LocalFiniteElement
<
double
,
double
,
1
>
p11d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
1
,
1
>
p11d
;
success
&=
testPk
(
p11d
);
P1
LocalFiniteElement
<
double
,
double
,
2
>
p12d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
p12d
;
success
&=
testPk
(
p12d
);
P1
LocalFiniteElement
<
double
,
double
,
3
>
p13d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
1
>
p13d
;
success
&=
testPk
(
p13d
);
// P23DLocalFiniteElement does not fulfill above assumption on the
...
...
@@ -126,22 +118,22 @@ int main (int argc, char *argv[])
// P23DLocalFiniteElement<double,double> p23d;
// testPk(p23d);
Pk2D
LocalFiniteElement
<
double
,
double
,
1
>
pk12d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
pk12d
;
success
&=
testPk
(
pk12d
);
Pk2D
LocalFiniteElement
<
double
,
double
,
2
>
pk22d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
2
>
pk22d
;
success
&=
testPk
(
pk22d
);
Pk2D
LocalFiniteElement
<
double
,
double
,
3
>
pk32d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
3
>
pk32d
;
success
&=
testPk
(
pk32d
);
Pk2D
LocalFiniteElement
<
double
,
double
,
4
>
pk42d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
4
>
pk42d
;
success
&=
testPk
(
pk42d
);
Pk3D
LocalFiniteElement
<
double
,
double
,
1
>
pk13d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
1
>
pk13d
;
success
&=
testPk
(
pk13d
);
Pk3D
LocalFiniteElement
<
double
,
double
,
2
>
pk23d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
2
>
pk23d
;
success
&=
testPk
(
pk23d
);
Pk3D
LocalFiniteElement
<
double
,
double
,
3
>
pk33d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
3
>
pk33d
;
success
&=
testPk
(
pk33d
);
Pk3D
LocalFiniteElement
<
double
,
double
,
4
>
pk43d
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
4
>
pk43d
;
success
&=
testPk
(
pk43d
);
//////////////////////////////////////////////////////////
...
...
@@ -151,101 +143,101 @@ int main (int argc, char *argv[])
GeometryTypes
::
simplex
(
2
));
TEST_FE
(
p0lfem
);
P1
LocalFiniteElement
<
double
,
double
,
1
>
p11dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
1
,
1
>
p11dlfem
;
TEST_FE3
(
p11dlfem
,
DisableNone
,
2
);
P1
LocalFiniteElement
<
double
,
double
,
2
>
p12dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
p12dlfem
;
TEST_FE3
(
p12dlfem
,
DisableNone
,
2
);
P1
LocalFiniteElement
<
double
,
double
,
3
>
p13dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
1
>
p13dlfem
;
TEST_FE3
(
p13dlfem
,
DisableNone
,
2
);
Q1
LocalFiniteElement
<
double
,
double
,
1
>
q11dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
1
,
1
>
q11dlfem
;
TEST_FE
(
q11dlfem
);
Q1
LocalFiniteElement
<
double
,
double
,
2
>
q12dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
q12dlfem
;
TEST_FE
(
q12dlfem
);
Q1
LocalFiniteElement
<
double
,
double
,
3
>
q13dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
1
>
q13dlfem
;
TEST_FE
(
q13dlfem
);
Pk1D
LocalFiniteElement
<
double
,
double
,
2
>
p11dfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
p11dfem
;
TEST_FE
(
p11dfem
);
PQ22DLocalFiniteElement
<
double
,
double
>
pq22dlfem
(
GeometryTypes
::
simplex
(
2
));
TEST_FE
(
pq22dlfem
);
P23D
LocalFiniteElement
<
double
,
double
>
p23dlfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
2
>
p23dlfem
;
TEST_FE
(
p23dlfem
);
Prism
P1
LocalFiniteElement
<
double
,
double
>
prismp1fem
;
Lagrange
PrismLocalFiniteElement
<
double
,
double
,
1
>
prismp1fem
;
TEST_FE3
(
prismp1fem
,
DisableNone
,
2
);
Prism
P2
LocalFiniteElement
<
double
,
double
>
prismp2fem
;
Lagrange
PrismLocalFiniteElement
<
double
,
double
,
2
>
prismp2fem
;
TEST_FE3
(
prismp2fem
,
DisableNone
,
1
);
// Pyramid shapefunctions are not differentiable on the plane where xi[0]=xi[1].
// So let's skip test points on this plane
auto
xySkip
=
[](
const
FieldVector
<
double
,
3
>&
xi
){
return
std
::
abs
(
xi
[
0
]
-
xi
[
1
])
<
1e-8
;};
Pyramid
P1
LocalFiniteElement
<
double
,
double
>
pyramidp1fem
;
Lagrange
PyramidLocalFiniteElement
<
double
,
double
,
1
>
pyramidp1fem
;
TEST_FE4
(
pyramidp1fem
,
DisableNone
,
1
,
xySkip
);
Pyramid
P2
LocalFiniteElement
<
double
,
double
>
pyramidp2fem
;
Lagrange
PyramidLocalFiniteElement
<
double
,
double
,
2
>
pyramidp2fem
;
TEST_FE4
(
pyramidp2fem
,
DisableNone
,
1
,
xySkip
);
Hybrid
::
forEach
(
std
::
make_index_sequence
<
4
>
{},[
&
success
](
auto
i
)
{
Pk
LocalFiniteElement
<
double
,
double
,
1
,
i
>
pklfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
1
,
i
>
pklfem
;
TEST_FE
(
pklfem
);
});
Hybrid
::
forEach
(
std
::
make_index_sequence
<
5
>
{},[
&
success
](
auto
i
)
{
Pk
LocalFiniteElement
<
double
,
double
,
2
,
i
>
pklfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
i
>
pklfem
;
TEST_FE3
(
pklfem
,
DisableNone
,
2
);
});
Hybrid
::
forEach
(
std
::
make_index_sequence
<
6
>
{},[
&
success
](
auto
i
)
{
Pk
LocalFiniteElement
<
double
,
double
,
3
,
i
>
pklfem
;
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
3
,
i
>
pklfem
;
TEST_FE
(
pklfem
);
});
// --------------------------------------------------------
// Test some instantiations of
Qk
LocalFiniteElement
// Test some instantiations of
LagrangeCube
LocalFiniteElement
// --------------------------------------------------------
Qk
LocalFiniteElement
<
double
,
double
,
1
,
1
>
qk11dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
1
,
1
>
qk11dlfem
;
TEST_FE3
(
qk11dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
2
,
0
>
qk02dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
2
,
0
>
qk02dlfem
;
TEST_FE3
(
qk02dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
2
,
1
>
qk12dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
2
,
1
>
qk12dlfem
;
TEST_FE3
(
qk12dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
2
,
2
>
qk22dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
2
,
2
>
qk22dlfem
;
TEST_FE3
(
qk22dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
2
,
3
>
qk32dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
2
,
3
>
qk32dlfem
;
TEST_FE3
(
qk32dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
3
,
0
>
qk03dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
3
,
0
>
qk03dlfem
;
TEST_FE3
(
qk03dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
3
,
1
>
qk13dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
3
,
1
>
qk13dlfem
;
TEST_FE3
(
qk13dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
3
,
2
>
qk23dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
3
,
2
>
qk23dlfem
;
TEST_FE3
(
qk23dlfem
,
DisableNone
,
2
);
Qk
LocalFiniteElement
<
double
,
double
,
3
,
3
>
qk33dlfem
;
LagrangeCube
LocalFiniteElement
<
double
,
double
,
3
,
3
>
qk33dlfem
;
TEST_FE3
(
qk33dlfem
,
DisableNone
,
2
);
// test virtualized FEs
// notice that testFE add another level of virtualization
LocalFiniteElementVirtualImp
<
P1
LocalFiniteElement
<
double
,
double
,
2
>
>
LocalFiniteElementVirtualImp
<
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
>
p12dlfemVirtual
(
p12dlfem
);
TEST_FE
(
p12dlfemVirtual
);
...
...
@@ -255,7 +247,7 @@ int main (int argc, char *argv[])
LocalFiniteElementVirtualImp
<
LocalFiniteElementVirtualImp
<
P1
LocalFiniteElement
<
double
,
double
,
2
>
>
>
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>
>
>
p12dlfemVirtualVirtual
(
p12dlfemVirtual
);
TEST_FE
(
p12dlfemVirtualVirtual
);
...
...
@@ -265,7 +257,7 @@ int main (int argc, char *argv[])
pq22dlfemVirtualVirtual
(
pq22dlfemVirtual
);
TEST_FE
(
pq22dlfemVirtualVirtual
);
typedef
LocalFiniteElementVirtualInterface
<
P1
LocalFiniteElement
<
double
,
double
,
2
>::
Traits
::
LocalBasisType
::
Traits
>
Interface
;
typedef
LocalFiniteElementVirtualInterface
<
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>::
Traits
::
LocalBasisType
::
Traits
>
Interface
;
TEST_FE
(
static_cast
<
const
Interface
&>
(
p12dlfemVirtual
));
// Test the LagrangeLocalFiniteElementCache
...
...
dune/localfunctions/test/virtualshapefunctiontest.cc
View file @
806782ca
...
...
@@ -13,7 +13,7 @@
#include <dune/localfunctions/common/virtualwrappers.hh>
#include <dune/localfunctions/lagrange/p0.hh>
#include <dune/localfunctions/lagrange/
p1
.hh>
#include <dune/localfunctions/lagrange/
lagrangesimplex
.hh>
#include <dune/localfunctions/lagrange/pq22d.hh>
#include <dune/localfunctions/monomial.hh>
...
...
@@ -152,7 +152,7 @@ void testLocalFiniteElement(const LocalFiniteElementVirtualInterface<T>* localFi
int
main
(
int
argc
,
char
*
argv
[])
{
typedef
Dune
::
P1
LocalFiniteElement
<
double
,
double
,
2
>::
Traits
::
LocalBasisType
::
Traits
LBTraits
;
typedef
Dune
::
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>::
Traits
::
LocalBasisType
::
Traits
LBTraits
;
const
Dune
::
P0LocalFiniteElement
<
double
,
double
,
2
>
p0FE
(
Dune
::
GeometryTypes
::
cube
(
2
));
const
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
P0LocalFiniteElement
<
double
,
double
,
2
>
>
p0VFE
(
p0FE
);
...
...
@@ -164,11 +164,11 @@ int main (int argc, char *argv[])
const
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
PQ22DLocalFiniteElement
<
double
,
double
>
>
pq2VFE
(
pq2FE
);
testLocalFiniteElement
<
LBTraits
>
(
&
pq2VFE
);
const
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
P1
LocalFiniteElement
<
double
,
double
,
2
>
>
p1VFE
;
const
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
LagrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>>
p1VFE
;
testLocalFiniteElement
<
LBTraits
>
(
&
p1VFE
);
const
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
L
ocalFiniteElementVirtualImp
<
Dune
::
P1
LocalFiniteElement
<
double
,
double
,
2
>
>
>
p1VVFE
;
const
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
LocalFiniteElementVirtualImp
<
Dune
::
L
agrangeSimplex
LocalFiniteElement
<
double
,
double
,
2
,
1
>>
>
p1VVFE
;
testLocalFiniteElement
<
LBTraits
>
(
&
p1VVFE
);
typedef
Dune
::
MonomialLocalFiniteElement
<
double
,
double
,
2
,
7
>
Monom7
;
...
...
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