Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-xt
Commits
74c80e7c
Commit
74c80e7c
authored
5 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[grid.functors] add optional logging
parent
2d8a2a71
No related branches found
No related tags found
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/xt/grid/functors/interfaces.hh
+35
-7
35 additions, 7 deletions
dune/xt/grid/functors/interfaces.hh
with
35 additions
and
7 deletions
dune/xt/grid/functors/interfaces.hh
+
35
−
7
View file @
74c80e7c
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#ifndef DUNE_XT_GRID_FUNCTORS_INTERFACES_HH
#ifndef DUNE_XT_GRID_FUNCTORS_INTERFACES_HH
#define DUNE_XT_GRID_FUNCTORS_INTERFACES_HH
#define DUNE_XT_GRID_FUNCTORS_INTERFACES_HH
#include
<dune/xt/common/timedlogging.hh>
#include
<dune/xt/grid/boundaryinfo.hh>
#include
<dune/xt/grid/boundaryinfo.hh>
#include
<dune/xt/grid/entity.hh>
#include
<dune/xt/grid/entity.hh>
#include
<dune/xt/grid/intersection.hh>
#include
<dune/xt/grid/intersection.hh>
...
@@ -22,6 +23,9 @@ namespace XT {
...
@@ -22,6 +23,9 @@ namespace XT {
namespace
Grid
{
namespace
Grid
{
template
<
class
GL
>
class
ElementFunctor
;
/**
/**
* \brief Interface for functors which are applied to elements (codim 0 entities) of a grid layer by the Walker.
* \brief Interface for functors which are applied to elements (codim 0 entities) of a grid layer by the Walker.
*
*
...
@@ -30,13 +34,12 @@ namespace Grid {
...
@@ -30,13 +34,12 @@ namespace Grid {
* \sa ElementAndIntersectionFunctor
* \sa ElementAndIntersectionFunctor
*/
*/
template
<
class
GL
>
template
<
class
GL
>
class
ElementFunctor
class
ElementFunctor
:
public
Common
::
WithLogger
<
ElementFunctor
<
GL
>>
{
{
static_assert
(
is_layer
<
GL
>::
value
,
""
);
static_assert
(
is_layer
<
GL
>::
value
,
""
);
protected:
protected:
//! force implementors to use copy() method
//! force implementors to use copy() method
ElementFunctor
(
const
ElementFunctor
<
GL
>&
)
=
default
;
public:
public:
using
GridViewType
=
GL
;
using
GridViewType
=
GL
;
...
@@ -45,7 +48,13 @@ public:
...
@@ -45,7 +48,13 @@ public:
using
GV
=
GridViewType
;
using
GV
=
GridViewType
;
using
E
=
ElementType
;
using
E
=
ElementType
;
ElementFunctor
()
=
default
;
ElementFunctor
(
const
std
::
string
&
log_prefix
=
""
,
const
std
::
string
&
log_id
=
""
,
const
bool
log_disabled
=
true
)
:
Common
::
WithLogger
<
ElementFunctor
<
GL
>>
(
log_prefix
.
empty
()
?
"xt.grid"
:
log_prefix
,
log_id
.
empty
()
?
"ElementFunctor"
:
log_id
,
log_disabled
)
{}
ElementFunctor
(
const
ElementFunctor
<
GL
>&
)
=
default
;
virtual
~
ElementFunctor
()
=
default
;
virtual
~
ElementFunctor
()
=
default
;
virtual
ElementFunctor
<
GridViewType
>*
copy
()
=
0
;
virtual
ElementFunctor
<
GridViewType
>*
copy
()
=
0
;
...
@@ -58,6 +67,9 @@ public:
...
@@ -58,6 +67,9 @@ public:
};
// class ElementFunctor
};
// class ElementFunctor
template
<
class
GL
>
class
IntersectionFunctor
;
/**
/**
* \brief Interface for functors which are applied to intersections (codim 1 entities) of a grid layer by the Walker.
* \brief Interface for functors which are applied to intersections (codim 1 entities) of a grid layer by the Walker.
*
*
...
@@ -66,7 +78,7 @@ public:
...
@@ -66,7 +78,7 @@ public:
* \sa ElementAndIntersectionFunctor
* \sa ElementAndIntersectionFunctor
*/
*/
template
<
class
GL
>
template
<
class
GL
>
class
IntersectionFunctor
class
IntersectionFunctor
:
public
Common
::
WithLogger
<
IntersectionFunctor
<
GL
>>
{
{
static_assert
(
is_layer
<
GL
>::
value
,
""
);
static_assert
(
is_layer
<
GL
>::
value
,
""
);
...
@@ -83,7 +95,13 @@ public:
...
@@ -83,7 +95,13 @@ public:
using
E
=
ElementType
;
using
E
=
ElementType
;
using
I
=
IntersectionType
;
using
I
=
IntersectionType
;
IntersectionFunctor
()
=
default
;
IntersectionFunctor
(
const
std
::
string
&
log_prefix
=
""
,
const
std
::
string
&
log_id
=
""
,
const
bool
log_disabled
=
true
)
:
Common
::
WithLogger
<
IntersectionFunctor
<
GL
>>
(
log_prefix
.
empty
()
?
"xt.grid"
:
log_prefix
,
log_id
.
empty
()
?
"IntersectionFunctor"
:
log_id
,
log_disabled
)
{}
virtual
~
IntersectionFunctor
()
=
default
;
virtual
~
IntersectionFunctor
()
=
default
;
virtual
IntersectionFunctor
<
GridViewType
>*
copy
()
=
0
;
virtual
IntersectionFunctor
<
GridViewType
>*
copy
()
=
0
;
...
@@ -104,6 +122,9 @@ public:
...
@@ -104,6 +122,9 @@ public:
};
// class IntersectionFunctor
};
// class IntersectionFunctor
template
<
class
GL
>
class
ElementAndIntersectionFunctor
;
/**
/**
* \brief Interface for functors which are applied to entities and intersections of a grid layer by the Walker.
* \brief Interface for functors which are applied to entities and intersections of a grid layer by the Walker.
*
*
...
@@ -112,7 +133,7 @@ public:
...
@@ -112,7 +133,7 @@ public:
* \sa IntersectionFunctor
* \sa IntersectionFunctor
*/
*/
template
<
class
GL
>
template
<
class
GL
>
class
ElementAndIntersectionFunctor
class
ElementAndIntersectionFunctor
:
public
Common
::
WithLogger
<
ElementAndIntersectionFunctor
<
GL
>>
{
{
static_assert
(
is_layer
<
GL
>::
value
,
""
);
static_assert
(
is_layer
<
GL
>::
value
,
""
);
...
@@ -129,7 +150,14 @@ public:
...
@@ -129,7 +150,14 @@ public:
using
E
=
ElementType
;
using
E
=
ElementType
;
using
I
=
IntersectionType
;
using
I
=
IntersectionType
;
ElementAndIntersectionFunctor
()
=
default
;
ElementAndIntersectionFunctor
(
const
std
::
string
&
log_prefix
=
""
,
const
std
::
string
&
log_id
=
""
,
const
bool
log_disabled
=
true
)
:
Common
::
WithLogger
<
ElementAndIntersectionFunctor
<
GL
>>
(
log_prefix
.
empty
()
?
"xt.grid"
:
log_prefix
,
log_id
.
empty
()
?
"ElementAndIntersectionFunctor"
:
log_id
,
log_disabled
)
{}
virtual
~
ElementAndIntersectionFunctor
()
=
default
;
virtual
~
ElementAndIntersectionFunctor
()
=
default
;
virtual
ElementAndIntersectionFunctor
<
GL
>*
copy
()
=
0
;
virtual
ElementAndIntersectionFunctor
<
GL
>*
copy
()
=
0
;
...
...
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