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
964d0320
Commit
964d0320
authored
9 years ago
by
Sander, Oliver
Browse files
Options
Downloads
Patches
Plain Diff
More range-based for and auto
parent
00e6fbe8
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
dune/gfe/cosseratvtkwriter.hh
+47
-47
47 additions, 47 deletions
dune/gfe/cosseratvtkwriter.hh
with
47 additions
and
47 deletions
dune/gfe/cosseratvtkwriter.hh
+
47
−
47
View file @
964d0320
...
...
@@ -273,40 +273,40 @@ public:
std
::
vector
<
int
>
connectivity
(
connectivitySize
);
size_t
i
=
0
;
for
(
auto
it
=
gridView
.
template
begin
<
0
,
Dune
::
Interior_Partition
>();
it
!=
gridView
.
template
end
<
0
,
Dune
::
I
nterior
_Partition
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
,
Dune
::
Partitions
::
i
nterior
)
)
{
if
(
it
->
type
().
isQuadrilateral
())
if
(
element
.
type
().
isQuadrilateral
())
{
#ifdef SECOND_ORDER
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
2
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
8
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
6
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
5
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
7
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
3
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
2
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
8
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
6
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
5
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
7
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
3
);
#else // first order
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
3
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
2
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
3
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
2
);
#endif
}
if
(
it
->
type
().
isTriangle
())
if
(
element
.
type
().
isTriangle
())
{
#ifdef SECOND_ORDER
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
2
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
5
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
4
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
3
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
2
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
5
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
4
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
3
);
#else // first order
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
*
i
t
,
2
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
0
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
1
);
connectivity
[
i
++
]
=
basis
.
index
(
elemen
t
,
2
);
#endif
}
}
...
...
@@ -316,15 +316,15 @@ public:
std
::
vector
<
int
>
offsets
(
totalNumElements
);
i
=
0
;
int
offsetCounter
=
0
;
for
(
auto
it
=
gridView
.
template
begin
<
0
,
Dune
::
Interior_Partition
>();
it
!=
gridView
.
template
end
<
0
,
Dune
::
I
nterior
_Partition
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
,
Dune
::
Partitions
::
i
nterior
)
)
{
if
(
it
->
type
().
isQuadrilateral
())
if
(
element
.
type
().
isQuadrilateral
())
#ifdef SECOND_ORDER
offsetCounter
+=
8
;
#else
offsetCounter
+=
4
;
#endif
if
(
it
->
type
().
isTriangle
())
if
(
element
.
type
().
isTriangle
())
#ifdef SECOND_ORDER
offsetCounter
+=
6
;
#else
...
...
@@ -337,15 +337,15 @@ public:
std
::
vector
<
int
>
cellTypes
(
totalNumElements
);
i
=
0
;
for
(
auto
it
=
gridView
.
template
begin
<
0
,
Dune
::
Interior_Partition
>();
it
!=
gridView
.
template
end
<
0
,
Dune
::
I
nterior
_Partition
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
,
Dune
::
Partitions
::
i
nterior
)
)
{
if
(
it
->
type
().
isQuadrilateral
())
if
(
element
.
type
().
isQuadrilateral
())
#ifdef SECOND_ORDER
cellTypes
[
i
++
]
=
23
;
#else
cellTypes
[
i
++
]
=
9
;
#endif
if
(
it
->
type
().
isTriangle
())
if
(
element
.
type
().
isTriangle
())
#ifdef SECOND_ORDER
cellTypes
[
i
++
]
=
22
;
#else
...
...
@@ -452,7 +452,7 @@ public:
// Stupid: I can't directly get the number of Interior_Partition elements
size_t
numElements
=
0
;
for
(
auto
it
=
gridView
.
template
begin
<
0
,
Dune
::
Interior_Partition
>();
it
!=
gridView
.
template
end
<
0
,
Dune
::
I
nterior
_Partition
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
,
Dune
::
Partitions
::
i
nterior
)
)
numElements
++
;
std
::
ofstream
outFile
(
fullfilename
);
...
...
@@ -475,20 +475,20 @@ public:
outFile
<<
" <Cells>"
<<
std
::
endl
;
outFile
<<
" <DataArray type=
\"
Int32
\"
Name=
\"
connectivity
\"
NumberOfComponents=
\"
1
\"
format=
\"
ascii
\"
>"
<<
std
::
endl
;
for
(
auto
it
=
gridView
.
template
begin
<
0
,
Dune
::
Interior_Partition
>();
it
!=
gridView
.
template
end
<
0
,
Dune
::
I
nterior
_Partition
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
,
Dune
::
Partitions
::
i
nterior
)
)
{
outFile
<<
" "
;
if
(
it
->
type
().
isQuadrilateral
())
if
(
element
.
type
().
isQuadrilateral
())
{
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
0
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
2
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
8
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
6
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
1
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
5
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
7
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
*
i
t
,
3
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
0
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
2
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
8
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
6
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
1
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
5
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
7
)
<<
" "
;
outFile
<<
p2DeformationBasis
.
index
(
elemen
t
,
3
)
<<
" "
;
outFile
<<
std
::
endl
;
}
}
...
...
@@ -496,20 +496,20 @@ public:
outFile
<<
" <DataArray type=
\"
Int32
\"
Name=
\"
offsets
\"
NumberOfComponents=
\"
1
\"
format=
\"
ascii
\"
>"
<<
std
::
endl
;
size_t
offsetCounter
=
0
;
for
(
auto
it
=
gridView
.
template
begin
<
0
>();
it
!=
gridView
.
template
end
<
0
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
)
)
{
outFile
<<
" "
;
if
(
it
->
type
().
isQuadrilateral
())
if
(
element
.
type
().
isQuadrilateral
())
offsetCounter
+=
8
;
outFile
<<
offsetCounter
<<
std
::
endl
;
}
outFile
<<
" </DataArray>"
<<
std
::
endl
;
outFile
<<
" <DataArray type=
\"
UInt8
\"
Name=
\"
types
\"
NumberOfComponents=
\"
1
\"
format=
\"
ascii
\"
>"
<<
std
::
endl
;
for
(
auto
it
=
gridView
.
template
begin
<
0
>();
it
!=
gridView
.
template
end
<
0
>();
++
it
)
for
(
const
auto
&
element
:
elements
(
gridView
)
)
{
outFile
<<
" "
;
if
(
it
->
type
().
isQuadrilateral
())
if
(
element
.
type
().
isQuadrilateral
())
outFile
<<
"23"
<<
std
::
endl
;
}
outFile
<<
" </DataArray>"
<<
std
::
endl
;
...
...
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