Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
podlesny
dune-tectonic
Commits
f89016a9
Commit
f89016a9
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Produce a stream of data
parent
a73445a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/one-body-sample.cc
+10
-7
10 additions, 7 deletions
src/one-body-sample.cc
with
10 additions
and
7 deletions
src/one-body-sample.cc
+
10
−
7
View file @
f89016a9
...
...
@@ -43,6 +43,8 @@
#include
<dune/tectonic/myconvexproblem.hh>
#include
<dune/tectonic/myblockproblem.hh>
#include
"boost/format.hpp"
int
const
dim
=
2
;
template
<
class
GridView
>
...
...
@@ -225,6 +227,14 @@ int main() {
solver_tolerance
,
&
energyNorm
,
Solver
::
FULL
);
// Solver::QUIET);
solver
.
solve
();
Dune
::
VTKWriter
<
GridType
::
LeafGridView
>
writer
(
leafView
);
std
::
string
filename
((
boost
::
format
(
"obs%d"
)
%
run
).
str
());
Dune
::
shared_ptr
<
Dune
::
VTKBasisGridFunction
<
P1Basis
,
VectorType
>>
ptr
(
new
Dune
::
VTKBasisGridFunction
<
P1Basis
,
VectorType
>
(
p1Basis
,
u1
,
"displacement"
));
writer
.
addVertexData
(
ptr
);
writer
.
write
(
filename
.
c_str
());
}
// Use a linear solver for comparison; should return roughly the
...
...
@@ -242,13 +252,6 @@ int main() {
}
}
Dune
::
shared_ptr
<
Dune
::
VTKBasisGridFunction
<
P1Basis
,
VectorType
>>
ptr
(
new
Dune
::
VTKBasisGridFunction
<
P1Basis
,
VectorType
>
(
p1Basis
,
u1
,
"displacement"
));
Dune
::
VTKWriter
<
GridType
::
LeafGridView
>
writer
(
leafView
);
writer
.
addVertexData
(
ptr
);
writer
.
write
(
"weeee"
);
VectorType
diff
=
u2
;
diff
-=
u1
;
std
::
cout
<<
"Infinity norm of the difference of the two solutions: "
...
...
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