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
d0383532
Commit
d0383532
authored
19 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
move the method implementation outside of namespace Dune
[[Imported from SVN: r3966]]
parent
7c318747
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grid/uggrid/uggridgeometry.cc
+21
-19
21 additions, 19 deletions
grid/uggrid/uggridgeometry.cc
grid/uggrid/uggridgeometry.hh
+3
-3
3 additions, 3 deletions
grid/uggrid/uggridgeometry.hh
with
24 additions
and
22 deletions
grid/uggrid/uggridgeometry.cc
+
21
−
19
View file @
d0383532
...
...
@@ -8,7 +8,6 @@
#include
<algorithm>
///////////////////////////////////////////////////////////////////////
//
// General implementation of UGGridGeometry mydim-> coorddim
...
...
@@ -17,7 +16,7 @@
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
NewGeometryType
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
type
()
const
inline
Dune
::
NewGeometryType
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
type
()
const
{
switch
(
mydim
)
{
...
...
@@ -56,14 +55,14 @@ inline NewGeometryType UGGridGeometry<mydim,coorddim,GridImp>::type() const
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
int
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
corners
()
const
inline
int
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
corners
()
const
{
return
UG_NS
<
coorddim
>::
Corners_Of_Elem
(
target_
);
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
const
FieldVector
<
typename
GridImp
::
ctype
,
coorddim
>&
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
inline
const
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
coorddim
>&
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
operator
[](
int
i
)
const
{
// This geometry is a vertex
...
...
@@ -83,6 +82,8 @@ operator [](int i) const
// ////////////////////////////////
assert
(
mydim
==
coorddim
);
//i = UGGridRenumberer<mydim>::verticesDUNEtoUG(i,type);
#if 1
// Renumber the vertices of Dune numbering to UG numbering
if
(
mydim
==
3
&&
type
().
isHexahedron
())
{
// Dune numbers the vertices of a hexahedron differently than UG.
...
...
@@ -97,6 +98,7 @@ operator [](int i) const
const
int
renumbering
[
4
]
=
{
0
,
1
,
3
,
2
};
i
=
renumbering
[
i
];
}
#endif
if
(
mode_
==
element_mode
)
{
typename
UGTypes
<
coorddim
>::
Node
*
corner
=
UG_NS
<
coorddim
>::
Corner
(((
typename
UGTypes
<
coorddim
>::
Element
*
)
target_
),
i
);
...
...
@@ -108,7 +110,7 @@ operator [](int i) const
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
FieldVector
<
typename
GridImp
::
ctype
,
coorddim
>
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
inline
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
coorddim
>
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
global
(
const
FieldVector
<
UGCtype
,
mydim
>&
local
)
const
{
FieldVector
<
UGCtype
,
coorddim
>
globalCoord
;
...
...
@@ -134,8 +136,8 @@ global(const FieldVector<UGCtype, mydim>& local) const
// Maps a global coordinate within the element to a
// local coordinate in its reference element
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
FieldVector
<
typename
GridImp
::
ctype
,
mydim
>
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
local
(
const
FieldVector
<
typename
GridImp
::
ctype
,
coorddim
>&
global
)
const
inline
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
mydim
>
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
local
(
const
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
coorddim
>&
global
)
const
{
FieldVector
<
UGCtype
,
mydim
>
result
;
UGCtype
localCoords
[
mydim
];
...
...
@@ -170,8 +172,8 @@ local (const FieldVector<typename GridImp::ctype, coorddim>& global) const
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
bool
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
checkInside
(
const
FieldVector
<
UGCtype
,
mydim
>
&
loc
)
const
inline
bool
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
checkInside
(
const
Dune
::
FieldVector
<
UGCtype
,
mydim
>
&
loc
)
const
{
switch
(
mydim
)
{
...
...
@@ -221,16 +223,16 @@ checkInside(const FieldVector<UGCtype, mydim> &loc) const
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
typename
GridImp
::
ctype
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
integrationElement
(
const
FieldVector
<
typename
GridImp
::
ctype
,
mydim
>&
local
)
const
inline
typename
GridImp
::
ctype
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
integrationElement
(
const
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
mydim
>&
local
)
const
{
return
std
::
abs
(
1
/
jacobianInverseTransposed
(
local
).
determinant
());
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
const
FieldMatrix
<
typename
GridImp
::
ctype
,
mydim
,
mydim
>&
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
jacobianInverseTransposed
(
const
FieldVector
<
typename
GridImp
::
ctype
,
mydim
>&
local
)
const
inline
const
Dune
::
FieldMatrix
<
typename
GridImp
::
ctype
,
mydim
,
mydim
>&
Dune
::
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
jacobianInverseTransposed
(
const
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
mydim
>&
local
)
const
{
if
(
mode_
==
element_mode
)
{
...
...
@@ -265,7 +267,7 @@ jacobianInverseTransposed (const FieldVector<typename GridImp::ctype, mydim>& lo
// Specialization for dim==1, coorddim==2. This is necessary
// because we specialized the whole class
template
<
class
GridImp
>
inline
FieldVector
<
typename
GridImp
::
ctype
,
2
>
UGGridGeometry
<
1
,
2
,
GridImp
>::
inline
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
2
>
Dune
::
UGGridGeometry
<
1
,
2
,
GridImp
>::
global
(
const
FieldVector
<
typename
GridImp
::
ctype
,
1
>&
local
)
const
{
FieldVector
<
UGCtype
,
2
>
globalCoord
;
...
...
@@ -280,7 +282,7 @@ global(const FieldVector<typename GridImp::ctype, 1>& local) const
// Specialization for dim==2, coorddim==3. This is necessary
// because we specialized the whole class
template
<
class
GridImp
>
inline
FieldVector
<
typename
GridImp
::
ctype
,
3
>
UGGridGeometry
<
2
,
3
,
GridImp
>::
inline
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
3
>
Dune
::
UGGridGeometry
<
2
,
3
,
GridImp
>::
global
(
const
FieldVector
<
typename
GridImp
::
ctype
,
2
>&
local
)
const
{
...
...
@@ -310,8 +312,8 @@ global(const FieldVector<typename GridImp::ctype, 2>& local) const
}
template
<
class
GridImp
>
inline
typename
GridImp
::
ctype
UGGridGeometry
<
1
,
2
,
GridImp
>::
integrationElement
(
const
FieldVector
<
typename
GridImp
::
ctype
,
1
>&
local
)
const
inline
typename
GridImp
::
ctype
Dune
::
UGGridGeometry
<
1
,
2
,
GridImp
>::
integrationElement
(
const
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
1
>&
local
)
const
{
FieldVector
<
UGCtype
,
2
>
diff
=
coord_
[
0
];
diff
-=
coord_
[
1
];
...
...
@@ -319,8 +321,8 @@ integrationElement (const FieldVector<typename GridImp::ctype, 1>& local) const
}
template
<
class
GridImp
>
inline
typename
GridImp
::
ctype
UGGridGeometry
<
2
,
3
,
GridImp
>::
integrationElement
(
const
FieldVector
<
typename
GridImp
::
ctype
,
2
>&
local
)
const
inline
typename
GridImp
::
ctype
Dune
::
UGGridGeometry
<
2
,
3
,
GridImp
>::
integrationElement
(
const
Dune
::
FieldVector
<
typename
GridImp
::
ctype
,
2
>&
local
)
const
{
FieldVector
<
UGCtype
,
3
>
normal
;
FieldVector
<
UGCtype
,
3
>
ba
=
coord_
[
1
]
-
coord_
[
0
];
...
...
This diff is collapsed.
Click to expand it.
grid/uggrid/uggridgeometry.hh
+
3
−
3
View file @
d0383532
...
...
@@ -396,9 +396,9 @@ namespace Dune {
};
// Include method definitions
#include
"uggridgeometry.cc"
}
// namespace Dune
// Include method definitions
#include
"uggridgeometry.cc"
#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