Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-vtk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
iwr
dune-vtk
Commits
f2d0d57b
Commit
f2d0d57b
authored
5 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
yasp-datacollector writes only on initial gridview level
parent
cdc91a18
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/vtk/datacollectors/yaspdatacollector.hh
+14
-13
14 additions, 13 deletions
dune/vtk/datacollectors/yaspdatacollector.hh
dune/vtk/vtkwriter.hh
+4
-4
4 additions, 4 deletions
dune/vtk/vtkwriter.hh
with
18 additions
and
17 deletions
dune/vtk/datacollectors/yaspdatacollector.hh
+
14
−
13
View file @
f2d0d57b
...
...
@@ -26,7 +26,7 @@ public:
,
extent_
(
filledArray
<
6
,
int
>
(
0
))
,
origin_
(
0.0
)
,
spacing_
(
0.0
)
,
level_
(
gridView
.
template
begin
<
0
,
All_Partition
>()
->
level
()
)
,
level_
(
0
)
{}
std
::
array
<
int
,
6
>
const
&
wholeExtentImpl
()
const
...
...
@@ -53,12 +53,13 @@ public:
{
Super
::
updateImpl
();
level_
=
gridView_
.
template
begin
<
0
,
All_Partition
>()
->
level
();
for
(
int
i
=
0
;
i
<
dim
;
++
i
)
{
wholeExtent_
[
2
*
i
]
=
0
;
wholeExtent_
[
2
*
i
+
1
]
=
grid
(
gridView_
).
levelSize
(
level_
,
i
);
wholeExtent_
[
2
*
i
+
1
]
=
grid
(
gridView_
.
grid
()
).
levelSize
(
level_
,
i
);
}
auto
const
&
gl
=
*
grid
(
gridView_
).
begin
(
level_
);
auto
const
&
gl
=
*
grid
(
gridView_
.
grid
()
).
begin
(
level_
);
auto
const
&
g
=
gl
.
interior
[
0
];
auto
const
&
gc
=
*
g
.
dataBegin
();
for
(
int
i
=
0
;
i
<
dim
;
++
i
)
{
...
...
@@ -66,7 +67,7 @@ public:
extent_
[
2
*
i
+
1
]
=
gc
.
max
(
i
)
+
1
;
}
auto
it
=
grid
(
gridView_
).
begin
(
level_
);
auto
it
=
grid
(
gridView_
.
grid
()
).
begin
(
level_
);
initGeometry
(
it
->
coords
);
}
...
...
@@ -99,7 +100,7 @@ public:
template
<
class
T
>
std
::
array
<
std
::
vector
<
T
>
,
3
>
coordinatesImpl
()
const
{
auto
it
=
grid
(
gridView_
).
begin
(
level_
);
auto
it
=
grid
(
gridView_
.
grid
()
).
begin
(
level_
);
auto
const
&
coords
=
it
->
coords
;
std
::
array
<
std
::
vector
<
T
>
,
3
>
ordinates
{};
...
...
@@ -122,18 +123,18 @@ private:
template
<
class
G
>
using
HostGrid
=
decltype
(
std
::
declval
<
G
>
().
hostGrid
());
template
<
class
G
V
,
std
::
enable_if_t
<
Std
::
is_detected
<
HostGrid
,
typename
GV
::
Grid
>
::
value
,
int
>
=
0
>
auto
const
&
grid
(
G
V
const
&
g
ridView
)
const
template
<
class
G
,
std
::
enable_if_t
<
not
Std
::
is_detected
<
HostGrid
,
G
>
::
value
,
int
>
=
0
>
auto
const
&
grid
(
G
const
&
g
)
const
{
return
g
ridView
.
grid
().
hostGrid
()
;
return
g
;
}
template
<
class
G
V
,
std
::
enable_if_t
<
not
Std
::
is_detected
<
HostGrid
,
typename
GV
::
Grid
>
::
value
,
int
>
=
0
>
auto
const
&
grid
(
G
V
const
&
g
ridView
)
const
template
<
class
G
,
std
::
enable_if_t
<
Std
::
is_detected
<
HostGrid
,
G
>
::
value
,
int
>
=
0
>
auto
const
&
grid
(
G
const
&
g
)
const
{
return
grid
View
.
g
rid
();
return
grid
(
g
.
hostG
rid
()
)
;
}
protected
:
...
...
This diff is collapsed.
Click to expand it.
dune/vtk/vtkwriter.hh
+
4
−
4
View file @
f2d0d57b
...
...
@@ -41,19 +41,19 @@ namespace Dune
namespace
Impl
{
// A structured grid with co
nstant spacing
in x, y, and z direction
.
// A structured grid with co
ordinates
in x, y, and z direction
with arbitrary spacing
template
<
class
GridView
,
int
dim
,
class
Coordinates
>
struct
VtkWriterImpl
<
GridView
,
YaspGrid
<
dim
,
Coordinates
>>
{
using
type
=
Vtk
ImageData
Writer
<
GridView
,
YaspDataCollector
<
GridView
>>
;
using
type
=
Vtk
RectilinearGrid
Writer
<
GridView
,
YaspDataCollector
<
GridView
>>
;
};
#if HAVE_DUNE_SPGRID
// A structured grid with co
nstant spacing
in x, y, and z direction
.
// A structured grid with co
ordinates
in x, y, and z direction
with arbitrary spacing
template
<
class
GridView
,
class
ct
,
int
dim
,
template
<
int
>
class
Ref
,
class
Comm
>
struct
VtkWriterImpl
<
GridView
,
SPGrid
<
ct
,
dim
,
Ref
,
Comm
>>
{
using
type
=
Vtk
ImageData
Writer
<
GridView
,
SPDataCollector
<
GridView
>>
;
using
type
=
Vtk
RectilinearGrid
Writer
<
GridView
,
SPDataCollector
<
GridView
>>
;
};
#endif
...
...
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