Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
9098621f
Commit
9098621f
authored
Mar 04, 2022
by
Happel, Lea
Committed by
Praetorius, Simon
Mar 04, 2022
Browse files
Changed the checkInside Method
parent
113b86d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
amdis/gridfunctions/CoarsenedGridFunction.hpp
View file @
9098621f
...
@@ -41,8 +41,10 @@ public:
...
@@ -41,8 +41,10 @@ public:
/// \brief Type of the grid element the LocalFunction can be bound to
/// \brief Type of the grid element the LocalFunction can be bound to
using
Element
=
typename
EntitySet
::
Element
;
using
Element
=
typename
EntitySet
::
Element
;
using
Grid
=
typename
GV
::
Grid
;
using
Geometry
=
typename
Element
::
Geometry
;
template
<
class
ES
,
class
LF
>
template
<
class
ES
,
class
LF
>
class
CoarsenedLocalFunction
class
CoarsenedLocalFunction
{
{
...
@@ -107,13 +109,17 @@ public:
...
@@ -107,13 +109,17 @@ public:
{
{
if
(
childs_
.
empty
())
if
(
childs_
.
empty
())
return
localFct_
(
x
);
return
localFct_
(
x
);
for
(
auto
const
&
child
:
childs_
)
{
// calculate checkInsideTolerance
auto
refElem
=
referenceElement
(
*
child
.
it
);
typename
Grid
::
ctype
const
checkInsideTolerance
=
std
::
sqrt
(
std
::
numeric_limits
<
typename
Grid
::
ctype
>::
epsilon
());
auto
local
=
child
.
local
(
x
);
for
(
auto
const
&
child
:
childs_
)
{
if
(
refElem
.
checkInside
(
local
))
{
auto
refElem
=
referenceElement
(
*
child
.
it
);
localFct_
.
bind
(
*
child
.
it
);
auto
local
=
child
.
local
(
x
);
return
localFct_
(
local
);
auto
refTypeId
=
refElem
.
type
().
id
();
bool
isInside
=
Dune
::
Geo
::
Impl
::
checkInside
(
refTypeId
,
Geometry
::
mydimension
,
local
,
checkInsideTolerance
);
if
(
isInside
)
{
localFct_
.
bind
(
*
child
.
it
);
return
localFct_
(
local
);
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment