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
641f68bf
Commit
641f68bf
authored
20 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
implemented checkInside() and removed a few obsolete member variables
[[Imported from SVN: r1789]]
parent
0b2ad995
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
+52
-0
52 additions, 0 deletions
grid/uggrid/uggridgeometry.cc
grid/uggrid/uggridgeometry.hh
+1
-17
1 addition, 17 deletions
grid/uggrid/uggridgeometry.hh
with
53 additions
and
17 deletions
grid/uggrid/uggridgeometry.cc
+
52
−
0
View file @
641f68bf
...
...
@@ -147,6 +147,58 @@ operator [](int i) const
return
coord_
[
i
];
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
bool
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
checkInside
(
const
FieldVector
<
UGCtype
,
coorddim
>
&
global
)
const
{
FieldVector
<
UGCtype
,
mydim
>
loc
=
local
(
global
);
switch
(
mydim
)
{
case
0
:
// vertex
return
false
;
case
1
:
// line
return
0
<=
loc
[
0
]
&&
loc
[
0
]
<=
1
;
case
2
:
#ifdef _2
switch
(
UG_NS
<
coorddim
>::
Tag
(
target_
))
{
case
UG2d
::
TRIANGLE
:
return
0
<=
loc
[
0
]
&&
0
<=
loc
[
1
]
&&
(
loc
[
0
]
+
loc
[
1
])
<=
1
;
case
UG2d
::
QUADRILATERAL
:
return
0
<=
loc
[
0
]
&&
loc
[
0
]
<=
1
&&
0
<=
loc
[
1
]
&&
loc
[
1
]
<=
1
;
default
:
DUNE_THROW
(
GridError
,
"UGGridGeometry::checkInside(): ERROR: Unknown type "
<<
UG_NS
<
coorddim
>::
Tag
(
target_
)
<<
" found!"
);
}
#endif
case
3
:
switch
(
UG_NS
<
coorddim
>::
Tag
(
target_
))
{
#ifdef _3
case
UG3d
::
TETRAHEDRON
:
return
0
<=
loc
[
0
]
&&
0
<=
loc
[
1
]
&&
0
<=
loc
[
2
]
&&
(
loc
[
0
]
+
loc
[
1
]
+
loc
[
2
])
<=
1
;
case
UG3d
::
PYRAMID
:
return
0
<=
loc
[
0
]
&&
0
<=
loc
[
1
]
&&
0
<=
loc
[
2
]
&&
(
loc
[
0
]
+
loc
[
2
])
<=
1
&&
(
loc
[
1
]
+
loc
[
2
])
<=
1
;
case
UG3d
::
PRISM
:
return
0
<=
loc
[
0
]
&&
0
<=
loc
[
1
]
&&
(
loc
[
0
]
+
loc
[
1
])
<=
1
&&
0
<=
loc
[
2
]
&&
loc
[
2
]
<=
1
;
case
UG3d
::
HEXAHEDRON
:
return
0
<=
loc
[
0
]
&&
loc
[
0
]
<=
1
&&
0
<=
loc
[
1
]
&&
loc
[
1
]
<=
1
&&
0
<=
loc
[
2
]
&&
loc
[
2
]
<=
1
;
default
:
DUNE_THROW
(
GridError
,
"UGGridGeometry::checkInside(): ERROR: Unknown type "
<<
UG_NS
<
coorddim
>::
Tag
(
target_
)
<<
" found!"
);
#endif
}
}
}
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
inline
FieldVector
<
UGCtype
,
coorddim
>
UGGridGeometry
<
mydim
,
coorddim
,
GridImp
>::
...
...
This diff is collapsed.
Click to expand it.
grid/uggrid/uggridgeometry.hh
+
1
−
17
View file @
641f68bf
...
...
@@ -128,11 +128,7 @@ namespace Dune {
FieldVector
<
UGCtype
,
mydim
>
local
(
const
FieldVector
<
UGCtype
,
coorddim
>&
global
)
const
;
//! Returns true if the point is in the current element
/** \todo Not implemented yet! */
bool
checkInside
(
const
FieldVector
<
UGCtype
,
coorddim
>
&
global
)
const
{
DUNE_THROW
(
GridError
,
"UGGridGeometry::checkInside() not implemented yet!"
);
return
true
;
}
bool
checkInside
(
const
FieldVector
<
UGCtype
,
coorddim
>
&
global
)
const
;
/**
Integration over a general element is done by integrating over the reference element
...
...
@@ -171,12 +167,6 @@ namespace Dune {
//! The jacobian inverse
mutable
FieldMatrix
<
UGCtype
,
coorddim
,
coorddim
>
jac_inverse_
;
//! storage for global coords
FieldVector
<
UGCtype
,
coorddim
>
globalCoord_
;
//! storage for local coords
FieldVector
<
UGCtype
,
mydim
>
localCoord_
;
typename
TargetType
<
coorddim
-
mydim
,
coorddim
>::
T
*
target_
;
};
...
...
@@ -260,12 +250,6 @@ namespace Dune {
//! The jacobian inverse
mutable
FieldMatrix
<
UGCtype
,
3
,
3
>
jac_inverse_
;
//! storage for global coords
FieldVector
<
UGCtype
,
4
>
globalCoord_
;
//! storage for local coords
FieldVector
<
UGCtype
,
2
>
localCoord_
;
};
...
...
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