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
665f39e0
Commit
665f39e0
authored
19 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
face renumbering in 2D->3D geometries
[[Imported from SVN: r2975]]
parent
d8962b4e
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
grid/uggrid/uggridgeometry.hh
+21
-4
21 additions, 4 deletions
grid/uggrid/uggridgeometry.hh
with
21 additions
and
4 deletions
grid/uggrid/uggridgeometry.hh
+
21
−
4
View file @
665f39e0
...
...
@@ -47,6 +47,13 @@ namespace Dune {
void
setNumberOfCorners
(
int
n
)
{
this
->
realGeometry
.
setNumberOfCorners
(
n
);
}
// UG doesn't actually have Subfaces. Therefore, this method should never be
// called. It is only here to calm the compiler
void
setToTarget
(
void
*
target
)
{
DUNE_THROW
(
NotImplemented
,
"You have called UGMakeableGeometry<2,3>::setToTarget"
);
}
};
template
<
class
GridImp
>
...
...
@@ -208,8 +215,18 @@ namespace Dune {
int
corners
()
const
{
return
(
elementType_
==
simplex
)
?
3
:
4
;}
//! access to coordinates of corners. Index is the number of the corner
const
FieldVector
<
UGCtype
,
3
>&
operator
[]
(
int
i
)
const
{
return
coord_
[
i
];
const
FieldVector
<
UGCtype
,
3
>&
operator
[]
(
int
i
)
const
{
if
(
elementType_
==
cube
)
{
// Dune numbers the vertices of a hexahedron and quadrilaterals differently than UG.
// The following two lines do the transformation
// The renumbering scheme is {0,1,3,2} for quadrilaterals, therefore, the
// following code works for 2d and 3d.
// It also works in both directions UG->DUNE, DUNE->UG !
const
int
renumbering
[
8
]
=
{
0
,
1
,
3
,
2
,
4
,
5
,
7
,
6
};
return
coord_
[
renumbering
[
i
]];
}
else
return
coord_
[
i
];
}
//! maps a local coordinate within reference element to
...
...
@@ -287,6 +304,7 @@ namespace Dune {
//! access to coordinates of corners. Index is the number of the corner
const
FieldVector
<
UGCtype
,
2
>&
operator
[]
(
int
i
)
const
{
// 1D -> 2D, nothing to renumber
return
coord_
[
i
];
}
...
...
@@ -303,8 +321,7 @@ namespace Dune {
//! Returns true if the point is in the current element
/** \todo Not implemented yet! */
bool
checkInside
(
const
FieldVector
<
UGCtype
,
1
>&
local
)
const
{
DUNE_THROW
(
GridError
,
"UGGridGeometry<1,2>::checkInside() not implemented yet!"
);
return
true
;
return
local
[
0
]
>=
0
&&
local
[
0
]
<=
1
;
}
// A(l)
...
...
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