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
4b1f156d
Commit
4b1f156d
authored
13 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove special implementations for UnitVectors and RealTuples
[[Imported from SVN: r8044]]
parent
caf15e25
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
+3
-60
3 additions, 60 deletions
test/localgeodesicfefunctiontest.cc
with
3 additions
and
60 deletions
test/localgeodesicfefunctiontest.cc
+
3
−
60
View file @
4b1f156d
...
...
@@ -289,63 +289,6 @@ void testDerivativeOfGradientWRTCoefficients(const std::vector<TargetSpace>& cor
}
template
<
int
domainDim
>
void
testRealTuples
()
{
std
::
cout
<<
" --- Testing RealTuple<1>, domain dimension: "
<<
domainDim
<<
" ---"
<<
std
::
endl
;
typedef
RealTuple
<
1
>
TargetSpace
;
std
::
vector
<
TargetSpace
>
corners
=
{
TargetSpace
(
1
),
TargetSpace
(
2
),
TargetSpace
(
3
)};
testPermutationInvariance
<
domainDim
>
(
corners
);
testDerivative
<
domainDim
>
(
corners
);
}
template
<
int
domainDim
>
void
testUnitVector2d
()
{
std
::
cout
<<
" --- Testing UnitVector<2>, domain dimension: "
<<
domainDim
<<
" ---"
<<
std
::
endl
;
typedef
UnitVector
<
2
>
TargetSpace
;
std
::
vector
<
TargetSpace
>
testPoints
;
ValueFactory
<
TargetSpace
>::
get
(
testPoints
);
int
nTestPoints
=
testPoints
.
size
();
// Set up elements of S^1
std
::
vector
<
TargetSpace
>
corners
(
domainDim
+
1
);
MultiIndex
<
domainDim
+
1
>
index
(
nTestPoints
);
int
numIndices
=
index
.
cycle
();
for
(
int
i
=
0
;
i
<
numIndices
;
i
++
,
++
index
)
{
for
(
int
j
=
0
;
j
<
domainDim
+
1
;
j
++
)
corners
[
j
]
=
testPoints
[
index
[
j
]];
bool
spreadOut
=
false
;
for
(
int
j
=
0
;
j
<
domainDim
+
1
;
j
++
)
for
(
int
k
=
0
;
k
<
domainDim
+
1
;
k
++
)
if
(
UnitVector
<
2
>::
distance
(
corners
[
j
],
corners
[
k
])
>
M_PI
*
0.98
)
spreadOut
=
true
;
if
(
spreadOut
)
continue
;
//testPermutationInvariance(corners);
testDerivative
<
domainDim
>
(
corners
);
testDerivativeOfValueWRTCoefficients
<
domainDim
>
(
corners
);
testDerivativeOfGradientWRTCoefficients
<
domainDim
>
(
corners
);
}
}
template
<
class
TargetSpace
,
int
domainDim
>
void
test
()
{
...
...
@@ -388,10 +331,10 @@ int main()
std
::
cout
<<
std
::
setw
(
15
)
<<
std
::
setprecision
(
12
);
testRealTuple
s
<
1
>
();
testUnitVector
2d
<
1
>
();
test
<
RealTuple
<
1
>
,
1
>
();
test
<
UnitVector
<
2
>
,
1
>
();
test
<
UnitVector
<
3
>
,
1
>
();
testUnitVector
2d
<
2
>
();
test
<
UnitVector
<
2
>
,
2
>
();
test
<
UnitVector
<
3
>
,
2
>
();
test
<
Rotation
<
3
,
double
>
,
1
>
();
...
...
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