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
29aaa9f4
Commit
29aaa9f4
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
also test UnitVector<2>
[[Imported from SVN: r5735]]
parent
5e0ce874
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/localgeodesicfefunctiontest.cc
+23
-3
23 additions, 3 deletions
test/localgeodesicfefunctiontest.cc
with
23 additions
and
3 deletions
test/localgeodesicfefunctiontest.cc
+
23
−
3
View file @
29aaa9f4
...
...
@@ -24,15 +24,16 @@ void testDerivativeTangentiality(const RealTuple<1>& x,
}
// the columns of the derivative must be tangential to the manifold
void
testDerivativeTangentiality
(
const
UnitVector
<
3
>&
x
,
const
FieldMatrix
<
double
,
3
,
dim
>&
derivative
)
template
<
int
vectorDim
>
void
testDerivativeTangentiality
(
const
UnitVector
<
vectorDim
>&
x
,
const
FieldMatrix
<
double
,
vectorDim
,
dim
>&
derivative
)
{
for
(
int
i
=
0
;
i
<
dim
;
i
++
)
{
// The i-th column is a tangent vector if its scalar product with the global coordinates
// of x vanishes.
double
sp
=
0
;
for
(
int
j
=
0
;
j
<
3
;
j
++
)
for
(
int
j
=
0
;
j
<
vectorDim
;
j
++
)
sp
+=
x
.
globalCoordinates
()[
j
]
*
derivative
[
j
][
i
];
...
...
@@ -150,6 +151,24 @@ void testUnitVectors()
testDerivative
(
corners
);
}
void
testUnitVectors2
()
{
typedef
UnitVector
<
2
>
TargetSpace
;
std
::
vector
<
TargetSpace
>
corners
(
dim
+
1
);
FieldVector
<
double
,
2
>
input
;
input
[
0
]
=
1
;
input
[
1
]
=
0
;
corners
[
0
]
=
input
;
input
[
0
]
=
1
;
input
[
1
]
=
0
;
corners
[
1
]
=
input
;
input
[
0
]
=
0
;
input
[
1
]
=
1
;
corners
[
2
]
=
input
;
testPermutationInvariance
(
corners
);
testDerivative
(
corners
);
}
void
testRotations
()
{
typedef
Rotation
<
3
,
double
>
TargetSpace
;
...
...
@@ -179,5 +198,6 @@ int main()
//testRealTuples();
testUnitVectors
();
testUnitVectors2
();
//testRotations();
}
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