Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Core Modules
dune-common
Commits
0f96949f
Commit
0f96949f
authored
20 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
ostream operators for some enums
[[Imported from SVN: r1822]]
parent
9f8dda76
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grid/common/grid.hh
+45
-0
45 additions, 0 deletions
grid/common/grid.hh
with
45 additions
and
0 deletions
grid/common/grid.hh
+
45
−
0
View file @
0f96949f
...
...
@@ -125,6 +125,33 @@ namespace Dune {
}
}
inline
std
::
string
GeometryName
(
GeometryType
type
){
switch
(
type
)
{
case
vertex
:
return
"vertex"
;
case
line
:
return
"line"
;
case
triangle
:
return
"triangle"
;
case
quadrilateral
:
return
"quadrilateral"
;
case
tetrahedron
:
return
"tetrahedron"
;
case
pyramid
:
return
"pyramid"
;
case
prism
:
return
"prism"
;
case
hexahedron
:
return
"hexahedron"
;
case
iso_triangle
:
return
"iso_triangle"
;
case
iso_quadrilateral
:
return
"iso_quadrilateral"
;
case
unknown
:
return
"unknown"
;
}
}
/*! GridIndexType specifies which Index of the Entities of the grid
should be used, i.e. globalIndex() or index()
*/
...
...
@@ -559,4 +586,22 @@ namespace Dune {
#include
"grid.cc"
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
Dune
::
GeometryType
t
)
{
s
<<
Dune
::
GeometryName
(
t
);
return
s
;
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
Dune
::
PartitionType
t
)
{
s
<<
Dune
::
PartitionName
(
t
);
return
s
;
}
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
Dune
::
GridIdentifier
t
)
{
s
<<
Dune
::
transformToGridName
(
t
);
return
s
;
}
#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