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
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
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
Timo Koch
dune-common
Commits
3ed5d3d7
Commit
3ed5d3d7
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
NewGeometryType --> GeometryType
NewGeometryType is still existent as a typedef. [[Imported from SVN: r4106]]
parent
6862f069
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/geometrytype.hh
+13
-12
13 additions, 12 deletions
common/geometrytype.hh
with
13 additions
and
12 deletions
common/geometrytype.hh
+
13
−
12
View file @
3ed5d3d7
...
...
@@ -16,7 +16,7 @@ namespace Dune {
This class has to be extended if a grid implementation with new entity types
is added to DUNE.
*/
class
New
GeometryType
class
GeometryType
{
public:
/** \brief Each entity can be tagged by one of these basic types
...
...
@@ -32,19 +32,18 @@ namespace Dune {
short
dim_
;
public
:
/** \brief Default constructor, not initializing anything */
New
GeometryType
()
{}
GeometryType
()
{}
/** \brief Constructor */
New
GeometryType
(
BasicType
basicType
,
unsigned
int
dim
)
GeometryType
(
BasicType
basicType
,
unsigned
int
dim
)
:
basicType_
(
basicType
),
dim_
(
dim
)
{}
/** \brief Constructor for vertices and segments
\todo Add check for dim={0,1} when compiled with a suitable flag
*/
explicit
New
GeometryType
(
unsigned
int
dim
)
explicit
GeometryType
(
unsigned
int
dim
)
:
basicType_
(
cube
),
dim_
(
dim
)
{}
...
...
@@ -125,18 +124,18 @@ namespace Dune {
/*@}*/
/** \brief Check for equality */
bool
operator
==
(
const
New
GeometryType
&
other
)
const
{
bool
operator
==
(
const
GeometryType
&
other
)
const
{
return
(
(
dim
()
==
0
&&
other
.
dim
()
==
0
)
||
(
dim
()
==
1
&&
other
.
dim
()
==
1
)
||
(
dim
()
==
other
.
dim
()
&&
basicType_
==
other
.
basicType_
)
);
}
/** \brief Check for inequality */
bool
operator
!=
(
const
New
GeometryType
&
other
)
const
{
bool
operator
!=
(
const
GeometryType
&
other
)
const
{
return
!
((
*
this
)
==
other
);
}
bool
operator
<
(
const
New
GeometryType
&
other
)
const
{
bool
operator
<
(
const
GeometryType
&
other
)
const
{
if
(
dim
()
!=
other
.
dim
())
return
dim
()
<
other
.
dim
();
else
if
(
dim
()
==
0
||
dim
()
==
1
)
...
...
@@ -146,7 +145,7 @@ namespace Dune {
}
/** \brief Prints the type to an output stream */
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
New
GeometryType
&
a
)
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
GeometryType
&
a
)
{
switch
(
a
.
basicType_
)
{
case
simplex
:
...
...
@@ -167,8 +166,11 @@ namespace Dune {
};
/** \brief Prints a NewGeometryType::BasicType to an output stream */
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
NewGeometryType
::
BasicType
type
)
//! to be removed soon
typedef
GeometryType
NewGeometryType
;
/** \brief Prints a GeometryType::BasicType to an output stream */
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
GeometryType
::
BasicType
type
)
{
switch
(
type
)
{
case
NewGeometryType
::
simplex
:
s
<<
"simplex"
;
break
;
...
...
@@ -177,7 +179,6 @@ namespace Dune {
case
NewGeometryType
::
prism
:
s
<<
"prism"
;
break
;
default
:
s
<<
"[unknown NewGeometryType::BasicType: "
<<
int
(
type
)
<<
"]"
;
}
return
s
;
}
}
...
...
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