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
6665e13b
Commit
6665e13b
authored
19 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
Two new functions to ask for level of an element and coordinates of corners
in local coordinates. [[Imported from SVN: r2971]]
parent
ebade644
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grid/uggrid/ugfunctions.hh
+19
-2
19 additions, 2 deletions
grid/uggrid/ugfunctions.hh
grid/uggrid/ugfunctions3d.hh
+15
-0
15 additions, 0 deletions
grid/uggrid/ugfunctions3d.hh
with
34 additions
and
2 deletions
grid/uggrid/ugfunctions.hh
+
19
−
2
View file @
6665e13b
...
...
@@ -118,6 +118,11 @@ namespace Dune {
return
UG2d
::
UG_GlobalToLocal
(
n
,
cornerCoords
,
EvalPoint
,
localCoord
);
}
static
int
myLevel
(
TargetType
<
0
,
2
>::
T
*
theElement
)
{
using
UG2d
::
ELEMENT
;
return
LEVEL
(
theElement
);
}
//! \todo Please doc me!
static
int
Sides_Of_Elem
(
TargetType
<
0
,
2
>::
T
*
theElement
)
{
using
UG2d
::
element_descriptors
;
...
...
@@ -197,6 +202,15 @@ namespace Dune {
return
0
;
}
//! get corner in local coordinates, corner number in UG's numbering system
template
<
class
T
>
static
void
getCornerLocal
(
const
TargetType
<
0
,
2
>::
T
*
theElement
,
int
corner
,
FieldVector
<
T
,
2
>&
local
)
{
using
UG2d
::
element_descriptors
;
local
[
0
]
=
LOCAL_COORD_OF_TAG
(
TAG
(
theElement
),
corner
)[
0
];
local
[
1
]
=
LOCAL_COORD_OF_TAG
(
TAG
(
theElement
),
corner
)[
1
];
}
//! Next element in the UG element lists
static
TargetType
<
0
,
2
>::
T
*
succ
(
const
TargetType
<
0
,
2
>::
T
*
theElement
)
{
return
theElement
->
ge
.
succ
;
...
...
@@ -243,11 +257,13 @@ namespace Dune {
//! Gets the level index of a UG sidevector
static
int
&
levelIndex
(
UGVectorType
<
2
>::
T
*
theVector
)
{
DUNE_THROW
(
GridError
,
"levelIndex in side vector only in 3D!"
);
return
reinterpret_cast
<
int
&>
(
theVector
->
index
);
}
//! Gets the level index of a UG sidevector
static
const
int
&
levelIndex
(
const
UGVectorType
<
2
>::
T
*
theVector
)
{
DUNE_THROW
(
GridError
,
"levelIndex in side vector only in 3D!"
);
return
reinterpret_cast
<
const
int
&>
(
theVector
->
index
);
}
...
...
@@ -285,12 +301,12 @@ namespace Dune {
return
theElement
->
ge
.
leafIndex
;
}
//! Gets the le
vel
index of a UG sidevector
//! Gets the le
af
index of a UG sidevector
static
int
&
leafIndex
(
UGVectorType
<
2
>::
T
*
theVector
)
{
return
reinterpret_cast
<
int
&>
(
theVector
->
skip
);
}
//! Gets the le
vel
index of a UG sidevector
//! Gets the le
af
index of a UG sidevector
static
const
int
&
leafIndex
(
const
UGVectorType
<
2
>::
T
*
theVector
)
{
return
reinterpret_cast
<
const
int
&>
(
theVector
->
skip
);
}
...
...
@@ -374,6 +390,7 @@ namespace Dune {
//! access side vector from element (this is just a dummy to compile code also in 2d)
static
UGVectorType
<
2
>::
T
*
SideVector
(
TargetType
<
0
,
2
>::
T
*
theElement
,
int
i
)
{
DUNE_THROW
(
GridError
,
"side vector only in 3D!"
);
return
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
grid/uggrid/ugfunctions3d.hh
+
15
−
0
View file @
6665e13b
...
...
@@ -173,6 +173,11 @@ namespace Dune {
return
UG3d
::
ReadCW
(
element
,
UG3d
::
NSONS_CE
);
}
static
int
myLevel
(
TargetType
<
0
,
3
>::
T
*
theElement
)
{
using
UG3d
::
ELEMENT
;
return
LEVEL
(
theElement
);
}
static
int
GetSons
(
const
UG3d
::
element
*
element
,
UG3d
::
element
*
sonList
[
MAX_SONS
])
{
return
UG3d
::
GetSons
(
element
,
sonList
);
}
...
...
@@ -199,6 +204,16 @@ namespace Dune {
return
0
;
}
//! get corner in local coordinates, corner number in UG's numbering system
template
<
class
T
>
static
void
getCornerLocal
(
const
TargetType
<
0
,
3
>::
T
*
theElement
,
int
corner
,
FieldVector
<
T
,
3
>&
local
)
{
using
UG2d
::
element_descriptors
;
local
[
0
]
=
LOCAL_COORD_OF_TAG
(
TAG
(
theElement
),
corner
)[
0
];
local
[
1
]
=
LOCAL_COORD_OF_TAG
(
TAG
(
theElement
),
corner
)[
1
];
local
[
2
]
=
LOCAL_COORD_OF_TAG
(
TAG
(
theElement
),
corner
)[
2
];
}
//! Next element in the UG element lists
static
TargetType
<
0
,
3
>::
T
*
succ
(
const
TargetType
<
0
,
3
>::
T
*
theElement
)
{
return
theElement
->
ge
.
succ
;
...
...
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