Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
amdis
amdis-core
Commits
11938c90
Commit
11938c90
authored
6 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
max and min refinement level initialized in base class only
parent
90517409
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/amdis/Marker.hpp
+7
-19
7 additions, 19 deletions
src/amdis/Marker.hpp
with
7 additions
and
19 deletions
src/amdis/Marker.hpp
+
7
−
19
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
...
...
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