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
11938c90
Commit
11938c90
authored
Oct 19, 2018
by
Praetorius, Simon
Browse files
max and min refinement level initialized in base class only
parent
90517409
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/Marker.hpp
View file @
11938c90
...
...
@@ -121,10 +121,10 @@ namespace AMDiS
int
elMarkCoarsen_
=
0
;
/// Maximal level of all elements.
int
maxRefineLevel_
=
-
1
;
int
maxRefineLevel_
=
std
::
numeric_limits
<
int
>::
max
()
;
/// Minimal level of all elements.
int
minRefineLevel_
=
-
1
;
int
minRefineLevel_
=
0
;
/// Allow elements to be marked for refinement
bool
refineAllowed_
=
true
;
...
...
@@ -380,18 +380,10 @@ namespace AMDiS
public:
/// Constructor.
template
<
class
GF
>
GridFunctionMarker
(
std
::
string
const
&
name
,
std
::
shared_ptr
<
Grid
>
const
&
grid
,
GF
&&
gf
,
Dune
::
Std
::
optional
<
int
>
maxRef
=
{
/*max*/
},
Dune
::
Std
::
optional
<
int
>
minRef
=
{
/*0*/
})
GridFunctionMarker
(
std
::
string
const
&
name
,
std
::
shared_ptr
<
Grid
>
const
&
grid
,
GF
&&
gf
)
:
Super
{
name
,
grid
}
,
gridFct_
{
makeGridFunction
(
std
::
forward
<
GF
>
(
gf
),
grid
->
leafGridView
())}
{
this
->
maxRefineLevel_
=
maxRef
?
maxRef
.
value
()
:
(
this
->
maxRefineLevel_
==
-
1
?
std
::
numeric_limits
<
int
>::
max
()
:
this
->
maxRefineLevel_
);
this
->
minRefineLevel_
=
minRef
?
minRef
.
value
()
:
(
this
->
minRefineLevel_
==
-
1
?
0
:
this
->
minRefineLevel_
);
}
{}
/// \brief Implementation of \ref Marker::markElement. Does nothing since marking is
/// done in \ref markGrid().
...
...
@@ -411,9 +403,7 @@ namespace AMDiS
// Deduction guide for GridFunctionMarker class
template
<
class
Grid
,
class
PreGridFct
>
GridFunctionMarker
(
std
::
string
const
&
name
,
std
::
shared_ptr
<
Grid
>
const
&
grid
,
PreGridFct
&&
preGridFct
,
Dune
::
Std
::
optional
<
int
>
maxRef
=
{},
Dune
::
Std
::
optional
<
int
>
minRef
=
{})
PreGridFct
&&
preGridFct
)
->
GridFunctionMarker
<
Grid
,
std
::
decay_t
<
decltype
(
makeGridFunction
(
std
::
forward
<
PreGridFct
>
(
preGridFct
),
grid
->
leafGridView
()))
>>
;
#endif
...
...
@@ -421,13 +411,11 @@ namespace AMDiS
// Generator function for GridFunctionMarker class
template
<
class
Grid
,
class
PreGridFct
>
auto
makeGridFunctionMarker
(
std
::
string
const
&
name
,
std
::
shared_ptr
<
Grid
>
const
&
grid
,
PreGridFct
&&
preGridFct
,
Dune
::
Std
::
optional
<
int
>
maxRef
=
{
/*max*/
},
Dune
::
Std
::
optional
<
int
>
minRef
=
{
/*0*/
})
PreGridFct
&&
preGridFct
)
{
auto
gridFct
=
makeGridFunction
(
std
::
forward
<
PreGridFct
>
(
preGridFct
),
grid
->
leafGridView
());
using
GridFct
=
decltype
(
gridFct
);
return
GridFunctionMarker
<
Grid
,
GridFct
>
{
name
,
grid
,
gridFct
,
maxRef
,
minRef
};
return
GridFunctionMarker
<
Grid
,
GridFct
>
{
name
,
grid
,
gridFct
};
}
}
// end namespace AMDiS
...
...
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