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
2b79e2e7
Commit
2b79e2e7
authored
11 years ago
by
Oliver Sander
Committed by
sander
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove trailing whitespace
[[Imported from SVN: r9266]]
parent
13b9d625
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
harmonicmaps.cc
+17
-17
17 additions, 17 deletions
harmonicmaps.cc
with
17 additions
and
17 deletions
harmonicmaps.cc
+
17
−
17
View file @
2b79e2e7
...
...
@@ -67,9 +67,9 @@ BlockVector<FieldVector<double,3> >
computeEmbeddedDifference
(
const
std
::
vector
<
TargetSpace
>&
a
,
const
std
::
vector
<
TargetSpace
>&
b
)
{
assert
(
a
.
size
()
==
b
.
size
());
BlockVector
<
FieldVector
<
double
,
3
>
>
difference
(
a
.
size
());
for
(
int
i
=
0
;
i
<
a
.
size
();
i
++
)
difference
[
i
]
=
a
[
i
].
globalCoordinates
()
-
b
[
i
].
globalCoordinates
();
...
...
@@ -112,7 +112,7 @@ int main (int argc, char *argv[]) try
// Create the grid
// ///////////////////////////////////////
typedef
std
::
conditional
<
dim
==
1
,
OneDGrid
,
UGGrid
<
dim
>
>::
type
GridType
;
shared_ptr
<
GridType
>
gridPtr
;
if
(
parameterSet
.
get
<
std
::
string
>
(
"gridType"
)
==
"structured"
)
{
array
<
unsigned
int
,
dim
>
elements
;
...
...
@@ -141,7 +141,7 @@ int main (int argc, char *argv[]) try
BitSetVector
<
blocksize
>
dirichletNodes
(
grid
.
size
(
dim
));
for
(
int
i
=
0
;
i
<
dirichletNodes
.
size
();
i
++
)
dirichletNodes
[
i
]
=
dirichletBoundary
.
containsVertex
(
i
);
// //////////////////////////
// Initial solution
// //////////////////////////
...
...
@@ -208,17 +208,17 @@ int main (int argc, char *argv[]) try
#if defined ROTATION2 || defined REALTUPLE1
v
[
0
]
=
0.5
*
M_PI
;
#endif
}
}
#if defined UNITVECTOR2 || defined UNITVECTOR3 || defined UNITVECTOR4 || defined ROTATION3 || defined REALTUPLE1
x
[
idx
]
=
TargetSpace
(
v
);
#endif
#if defined ROTATION2
#if defined ROTATION2
x
[
idx
]
=
v
[
0
];
#endif
}
// backup for error measurement later
SolutionType
initialIterate
=
x
;
...
...
@@ -238,7 +238,7 @@ int main (int argc, char *argv[]) try
// /////////////////////////////////////////////////
RiemannianTrustRegionSolver
<
GridType
,
TargetSpace
>
solver
;
solver
.
setup
(
grid
,
solver
.
setup
(
grid
,
&
assembler
,
x
,
dirichletNodes
,
...
...
@@ -251,11 +251,11 @@ int main (int argc, char *argv[]) try
baseIterations
,
baseTolerance
,
instrumented
);
// /////////////////////////////////////////////////////
// Solve!
// /////////////////////////////////////////////////////
std
::
cout
<<
"Energy: "
<<
assembler
.
computeEnergy
(
x
)
<<
std
::
endl
;
//exit(0);
...
...
@@ -296,11 +296,11 @@ int main (int argc, char *argv[]) try
amiramesh
.
addGrid
(
grid
.
leafView
());
amiramesh
.
addVertexData
(
xEmbedded
,
grid
.
leafView
());
amiramesh
.
write
(
"resultGrid"
,
1
);
// //////////////////////////////////////////////////////////
// Recompute and compare against exact solution
// //////////////////////////////////////////////////////////
SolutionType
exactSolution
=
x
;
// //////////////////////////////////////////////////////////////////////
...
...
@@ -339,20 +339,20 @@ int main (int argc, char *argv[]) try
double
oldError
=
h1Norm
(
difference
);
int
i
;
for
(
i
=
0
;
i
<
maxTrustRegionSteps
;
i
++
)
{
// /////////////////////////////////////////////////////
// Read iteration from file
// /////////////////////////////////////////////////////
char
iSolFilename
[
100
];
sprintf
(
iSolFilename
,
"tmp/intermediateSolution_%04d"
,
i
);
FILE
*
fp
=
fopen
(
iSolFilename
,
"rb"
);
if
(
!
fp
)
DUNE_THROW
(
IOError
,
"Couldn't open intermediate solution '"
<<
iSolFilename
<<
"'"
);
for
(
int
j
=
0
;
j
<
intermediateSolution
.
size
();
j
++
)
{
fread
(
&
intermediateSolution
[
j
],
sizeof
(
TargetSpace
),
1
,
fp
);
}
fclose
(
fp
);
// /////////////////////////////////////////////////////
...
...
@@ -360,7 +360,7 @@ int main (int argc, char *argv[]) try
// /////////////////////////////////////////////////////
difference
=
computeEmbeddedDifference
(
exactSolution
,
intermediateSolution
);
//error = std::sqrt(EnergyNorm<BCRSMatrix<FieldMatrix<double, blocksize, blocksize> >, BlockVector<FieldVector<double,blocksize> > >::normSquared(geodesicDifference, hessian));
error
=
h1Norm
(
difference
);
...
...
@@ -375,7 +375,7 @@ int main (int argc, char *argv[]) try
break
;
oldError
=
error
;
}
// //////////////////////////////
...
...
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