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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
podlesny
dune-tectonic
Commits
582dbd93
Commit
582dbd93
authored
Dec 21, 2011
by
Elias Pipping
Committed by
Elias Pipping
Dec 21, 2011
Browse files
Options
Downloads
Patches
Plain Diff
Make VTKFunctionPtr const
parent
efca17ef
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/tectonic/myvtkwriter.hh
+2
-1
2 additions, 1 deletion
dune/tectonic/myvtkwriter.hh
src/one-body-sample.cc
+4
-5
4 additions, 5 deletions
src/one-body-sample.cc
with
6 additions
and
6 deletions
dune/tectonic/myvtkwriter.hh
+
2
−
1
View file @
582dbd93
// copied from <dune/grid/io/file/vtk/vtkwriter.hh>
// copied from <dune/grid/io/file/vtk/vtkwriter.hh>
// so that VTKFunctionPtr can be a const pointer
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
// vi: set et ts=4 sw=2 sts=2:
...
@@ -87,7 +88,7 @@ template <class GridView> class MyVTKWriter {
...
@@ -87,7 +88,7 @@ template <class GridView> class MyVTKWriter {
public
:
public
:
typedef
Dune
::
VTKFunction
<
GridView
>
VTKFunction
;
typedef
Dune
::
VTKFunction
<
GridView
>
VTKFunction
;
typedef
shared_ptr
<
VTKFunction
>
VTKFunctionPtr
;
typedef
shared_ptr
<
VTKFunction
const
>
VTKFunctionPtr
;
protected
:
protected
:
typedef
typename
std
::
list
<
VTKFunctionPtr
>::
const_iterator
FunctionIterator
;
typedef
typename
std
::
list
<
VTKFunctionPtr
>::
const_iterator
FunctionIterator
;
...
...
This diff is collapsed.
Click to expand it.
src/one-body-sample.cc
+
4
−
5
View file @
582dbd93
...
@@ -374,12 +374,11 @@ int main(int argc, char *argv[]) {
...
@@ -374,12 +374,11 @@ int main(int argc, char *argv[]) {
Dune
::
MyVTKWriter
<
GridView
>
writer
(
leafView
);
Dune
::
MyVTKWriter
<
GridView
>
writer
(
leafView
);
std
::
string
filename
((
boost
::
format
(
"obs%d"
)
%
run
).
str
());
std
::
string
filename
((
boost
::
format
(
"obs%d"
)
%
run
).
str
());
// Note: These pointers cannot be const.
auto
const
displacement_ptr
=
auto
const
displacement_ptr
=
Dune
::
make_shared
<
VTKBasisGridFunction
<
P1Basis
,
VectorType
>>
(
Dune
::
make_shared
<
VTKBasisGridFunction
<
P1Basis
,
VectorType
>
const
>
(
p1Basis
,
u4
,
"displacement"
);
p1Basis
,
u4
,
"displacement"
);
auto
const
vonmises_ptr
=
auto
const
vonmises_ptr
=
Dune
::
make_shared
<
Dune
::
make_shared
<
VTKBasisGridFunction
<
P0Basis
,
CellVectorType
>>
(
VTKBasisGridFunction
<
P0Basis
,
CellVectorType
>
const
>
(
p0Basis
,
vonMisesStress
,
"stress"
);
p0Basis
,
vonMisesStress
,
"stress"
);
writer
.
addVertexData
(
displacement_ptr
);
writer
.
addVertexData
(
displacement_ptr
);
writer
.
addCellData
(
vonmises_ptr
);
writer
.
addCellData
(
vonmises_ptr
);
...
...
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