Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sander, Oliver
dune-gfe
Commits
2e36b882
Commit
2e36b882
authored
12 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
factor out construction of the Lagrange nodes into a separate method
[[Imported from SVN: r8865]]
parent
6f643b7b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/nestednesstest.cc
+25
-12
25 additions, 12 deletions
test/nestednesstest.cc
with
25 additions
and
12 deletions
test/nestednesstest.cc
+
25
−
12
View file @
2e36b882
...
...
@@ -31,6 +31,25 @@ double diameter(const std::vector<TargetSpace>& v)
return
d
;
}
template
<
int
domainDim
>
std
::
vector
<
FieldVector
<
double
,
domainDim
>
>
lagrangeNodes
(
const
GeometryType
&
type
)
{
PQkLocalFiniteElementCache
<
double
,
double
,
domainDim
,
2
>
feCache
;
std
::
vector
<
FieldVector
<
double
,
domainDim
>
>
result
(
feCache
.
get
(
type
).
localBasis
().
size
());
// evaluate loF at the Lagrange points of the second-order function
const
Dune
::
GenericReferenceElement
<
double
,
domainDim
>&
refElement
=
Dune
::
GenericReferenceElements
<
double
,
domainDim
>::
general
(
type
);
for
(
size_t
i
=
0
;
i
<
feCache
.
get
(
type
).
localBasis
().
size
();
i
++
)
{
result
[
i
]
=
refElement
.
position
(
feCache
.
get
(
type
).
localCoefficients
().
localKey
(
i
).
subEntity
(),
feCache
.
get
(
type
).
localCoefficients
().
localKey
(
i
).
codim
());
}
return
result
;
}
template
<
int
domainDim
,
class
TargetSpace
>
...
...
@@ -40,19 +59,13 @@ void testNestedness(const LocalGeodesicFEFunction<domainDim,double,typename PQkL
PQkLocalFiniteElementCache
<
double
,
double
,
domainDim
,
2
>
feCache
;
typedef
typename
PQkLocalFiniteElementCache
<
double
,
double
,
domainDim
,
2
>::
FiniteElementType
LocalFiniteElement
;
std
::
vector
<
TargetSpace
>
nodalValues
(
feCache
.
get
(
loF
.
type
()).
localBasis
().
size
());
// Get the Lagrange nodes of the high-order function
std
::
vector
<
FieldVector
<
double
,
domainDim
>
>
lNodes
=
lagrangeNodes
<
domainDim
>
(
loF
.
type
());
// evaluate loF at the Lagrange points of the second-order function
const
Dune
::
GenericReferenceElement
<
double
,
domainDim
>&
refElement
=
Dune
::
GenericReferenceElements
<
double
,
domainDim
>::
general
(
loF
.
type
());
for
(
size_t
i
=
0
;
i
<
feCache
.
get
(
loF
.
type
()).
localBasis
().
size
();
i
++
)
{
nodalValues
[
i
]
=
loF
.
evaluate
(
refElement
.
position
(
feCache
.
get
(
loF
.
type
()).
localCoefficients
().
localKey
(
i
).
subEntity
(),
feCache
.
get
(
loF
.
type
()).
localCoefficients
().
localKey
(
i
).
codim
()));
}
// Evaluate low-order function at the high-order nodal values
std
::
vector
<
TargetSpace
>
nodalValues
(
lNodes
.
size
());
for
(
size_t
i
=
0
;
i
<
lNodes
.
size
();
i
++
)
nodalValues
[
i
]
=
loF
.
evaluate
(
lNodes
[
i
]);
LocalGeodesicFEFunction
<
domainDim
,
double
,
LocalFiniteElement
,
TargetSpace
>
hoF
(
feCache
.
get
(
loF
.
type
()),
nodalValues
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment