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
e704ae7c
Commit
e704ae7c
authored
19 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
- hasCopy(...) function added
- NFather(...) added - PositionInFather(...) added [[Imported from SVN: r2998]]
parent
b1e22266
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
+27
-0
27 additions, 0 deletions
grid/uggrid/ugfunctions.hh
grid/uggrid/ugfunctions3d.hh
+28
-0
28 additions, 0 deletions
grid/uggrid/ugfunctions3d.hh
with
55 additions
and
0 deletions
grid/uggrid/ugfunctions.hh
+
27
−
0
View file @
e704ae7c
...
...
@@ -49,8 +49,12 @@ namespace Dune {
enum
{
COARSEN_CE
=
UG2d
::
COARSEN_CE
};
enum
{
REFINECLASS_CE
=
UG2d
::
REFINECLASS_CE
};
enum
{
RED
=
UG2d
::
RED
};
enum
{
YELLOW_CLASS
=
UG2d
::
YELLOW_CLASS
};
enum
{
COARSE
=
UG2d
::
COARSE
};
enum
{
GM_OK
=
UG2d
::
GM_OK
};
...
...
@@ -123,6 +127,18 @@ namespace Dune {
return
LEVEL
(
theElement
);
}
static
int
myLevel
(
TargetType
<
2
,
2
>::
T
*
theNode
)
{
using
UG2d
::
NODE
;
return
LEVEL
(
theNode
);
}
//! return true if element has an exact copy on the next level
static
bool
hasCopy
(
TargetType
<
0
,
2
>::
T
*
theElement
)
{
using
UG2d
::
ELEMENT
;
using
UG2d
::
control_entries
;
return
REFINECLASS
(
theElement
)
==
YELLOW_CLASS
;
}
//! \todo Please doc me!
static
int
Sides_Of_Elem
(
TargetType
<
0
,
2
>::
T
*
theElement
)
{
using
UG2d
::
element_descriptors
;
...
...
@@ -394,6 +410,17 @@ namespace Dune {
return
EFATHER
(
theElement
);
}
//! get father element of vertex
static
TargetType
<
0
,
2
>::
T
*
NFather
(
TargetType
<
2
,
2
>::
T
*
theNode
)
{
return
theNode
->
myvertex
->
iv
.
father
;
}
//! get father element of vertex
static
void
PositionInFather
(
TargetType
<
2
,
2
>::
T
*
theNode
,
FieldVector
<
double
,
2
>&
local
)
{
local
[
0
]
=
theNode
->
myvertex
->
iv
.
xi
[
0
];
local
[
1
]
=
theNode
->
myvertex
->
iv
.
xi
[
1
];
}
static
unsigned
int
ReadCW
(
void
*
obj
,
int
ce
)
{
return
UG2d
::
ReadCW
(
obj
,
ce
);
}
...
...
This diff is collapsed.
Click to expand it.
grid/uggrid/ugfunctions3d.hh
+
28
−
0
View file @
e704ae7c
...
...
@@ -46,8 +46,12 @@ namespace Dune {
enum
{
COARSEN_CE
=
UG3d
::
COARSEN_CE
};
enum
{
REFINECLASS_CE
=
UG2d
::
REFINECLASS_CE
};
enum
{
RED
=
UG3d
::
RED
};
enum
{
YELLOW_CLASS
=
UG2d
::
YELLOW_CLASS
};
enum
{
COARSE
=
UG3d
::
COARSE
};
enum
{
GM_OK
=
UG3d
::
GM_OK
};
...
...
@@ -118,6 +122,13 @@ namespace Dune {
return
UG3d
::
UG_GlobalToLocal
(
n
,
cornerCoords
,
EvalPoint
,
localCoord
);
}
//! return true if element has an exact copy on the next level
static
bool
hasCopy
(
TargetType
<
0
,
3
>::
T
*
theElement
)
{
using
UG3d
::
ELEMENT
;
using
UG3d
::
control_entries
;
return
REFINECLASS
(
theElement
)
==
YELLOW_CLASS
;
}
//! \todo Please doc me!
static
int
Sides_Of_Elem
(
TargetType
<
0
,
3
>::
T
*
theElement
)
{
using
UG3d
::
element_descriptors
;
...
...
@@ -178,6 +189,23 @@ namespace Dune {
return
LEVEL
(
theElement
);
}
static
int
myLevel
(
TargetType
<
3
,
3
>::
T
*
theNode
)
{
using
UG3d
::
NODE
;
return
LEVEL
(
theNode
);
}
//! get father element of vertex
static
TargetType
<
0
,
3
>::
T
*
NFather
(
TargetType
<
3
,
3
>::
T
*
theNode
)
{
return
theNode
->
myvertex
->
iv
.
father
;
}
//! get father element of vertex
static
void
PositionInFather
(
TargetType
<
3
,
3
>::
T
*
theNode
,
FieldVector
<
double
,
3
>&
local
)
{
local
[
0
]
=
theNode
->
myvertex
->
iv
.
xi
[
0
];
local
[
1
]
=
theNode
->
myvertex
->
iv
.
xi
[
1
];
local
[
2
]
=
theNode
->
myvertex
->
iv
.
xi
[
2
];
}
static
int
GetSons
(
const
UG3d
::
element
*
element
,
UG3d
::
element
*
sonList
[
MAX_SONS
])
{
return
UG3d
::
GetSons
(
element
,
sonList
);
}
...
...
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