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
ab369938
Commit
ab369938
authored
15 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
15 years ago
Browse files
Options
Downloads
Patches
Plain Diff
a test for local geodesic fe functions
[[Imported from SVN: r4147]]
parent
522a79bb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/Makefile.am
+3
-1
3 additions, 1 deletion
test/Makefile.am
test/localgeodesicfefunctiontest.cc
+70
-0
70 additions, 0 deletions
test/localgeodesicfefunctiontest.cc
with
73 additions
and
1 deletion
test/Makefile.am
+
3
−
1
View file @
ab369938
...
...
@@ -4,7 +4,7 @@
LDADD
=
$(
UG_LDFLAGS
)
$(
AMIRAMESH_LDFLAGS
)
$(
UG_LIBS
)
$(
AMIRAMESH_LIBS
)
AM_CPPFLAGS
+=
$(
UG_CPPFLAGS
)
$(
AMIRAMESH_CPPFLAGS
)
-Wall
check_PROGRAMS
=
frameinvariancetest rotationtest fdcheck
check_PROGRAMS
=
frameinvariancetest rotationtest fdcheck
localgeodesicfefunctiontest
frameinvariancetest_SOURCES
=
frameinvariancetest.cc
...
...
@@ -12,6 +12,8 @@ rotationtest_SOURCES = rotationtest.cc
fdcheck_SOURCES
=
fdcheck.cc
localgeodesicfefunctiontest_SOURCES
=
localgeodesicfefunctiontest.cc
# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS
=
foreign 1.5
This diff is collapsed.
Click to expand it.
test/localgeodesicfefunctiontest.cc
0 → 100644
+
70
−
0
View file @
ab369938
#include
<config.h>
#include
<iostream>
#include
<dune/common/fvector.hh>
#include
<dune/grid/common/quadraturerules.hh>
#include
<dune/src/rotation.hh>
#include
<dune/src/localgeodesicfefunction.hh>
using
namespace
Dune
;
int
main
()
{
typedef
Rotation
<
3
,
double
>
TargetSpace
;
const
int
dim
=
2
;
FieldVector
<
double
,
3
>
xAxis
(
0
);
xAxis
[
0
]
=
1
;
FieldVector
<
double
,
3
>
yAxis
(
0
);
yAxis
[
1
]
=
1
;
FieldVector
<
double
,
3
>
zAxis
(
0
);
zAxis
[
2
]
=
1
;
TargetSpace
v0
=
Rotation
<
3
,
double
>
(
xAxis
,
1
);
TargetSpace
v1
=
Rotation
<
3
,
double
>
(
yAxis
,
2
);
TargetSpace
v2
=
Rotation
<
3
,
double
>
(
zAxis
,
3
);
std
::
vector
<
TargetSpace
>
coef0
(
3
),
coef1
(
3
),
coef2
(
3
);
coef0
[
0
]
=
v0
;
coef0
[
1
]
=
v1
;
coef0
[
2
]
=
v2
;
coef1
[
0
]
=
v2
;
coef1
[
1
]
=
v0
;
coef1
[
2
]
=
v1
;
coef2
[
0
]
=
v1
;
coef2
[
1
]
=
v2
;
coef2
[
2
]
=
v0
;
GeometryType
triangle
;
triangle
.
makeTriangle
();
LocalGeodesicFEFunction
<
2
,
double
,
TargetSpace
>
f0
(
triangle
,
coef0
);
LocalGeodesicFEFunction
<
2
,
double
,
TargetSpace
>
f1
(
triangle
,
coef1
);
LocalGeodesicFEFunction
<
2
,
double
,
TargetSpace
>
f2
(
triangle
,
coef2
);
int
quadOrder
=
1
;
const
Dune
::
QuadratureRule
<
double
,
dim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
dim
>::
rule
(
triangle
,
quadOrder
);
for
(
size_t
pt
=
0
;
pt
<
quad
.
size
();
pt
++
)
{
const
Dune
::
FieldVector
<
double
,
dim
>&
quadPos
=
quad
[
pt
].
position
();
Dune
::
FieldVector
<
double
,
dim
>
l0
=
quadPos
;
Dune
::
FieldVector
<
double
,
dim
>
l1
,
l2
;
l1
[
0
]
=
1
-
quadPos
[
0
]
-
quadPos
[
1
];
l1
[
1
]
=
quadPos
[
0
];
l2
[
0
]
=
quadPos
[
1
];
l2
[
1
]
=
1
-
quadPos
[
0
]
-
quadPos
[
1
];
std
::
cout
<<
f0
.
evaluate
(
l0
)
<<
std
::
endl
;
std
::
cout
<<
f1
.
evaluate
(
l1
)
<<
std
::
endl
;
std
::
cout
<<
f2
.
evaluate
(
l2
)
<<
std
::
endl
;
}
}
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