Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
dune-fem
dune-fem-dg
Commits
9210f2ec
Commit
9210f2ec
authored
11 years ago
by
Robert Kloefkorn
Browse files
Options
Downloads
Patches
Plain Diff
added FlopCounter.
parent
b271a022
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
dune/fem-dg/main/main_pol.cc
+17
-5
17 additions, 5 deletions
dune/fem-dg/main/main_pol.cc
with
17 additions
and
5 deletions
dune/fem-dg/main/main_pol.cc
+
17
−
5
View file @
9210f2ec
...
...
@@ -59,6 +59,8 @@
#include
<dune/grid/io/visual/grapedatadisplay.hh>
#include
<dune/fem/misc/flops.hh>
#if POLORDER == 0
#define LOOPSPACE DG_P0
#elif POLORDER == 1
...
...
@@ -85,14 +87,17 @@ namespace LOOPSPACE {
{
Dune
::
Fem
::
FemEoc
::
clear
();
// create Flop counter, needs PAPI
Dune
::
Fem
::
FlopCounter
flopCounter
;
const
bool
countFlops
=
Dune
::
Fem
::
Parameter
::
getValue
<
bool
>
(
"femdg.flopcounter"
,
false
);
// if flop count is enabled count floating point operations
if
(
countFlops
)
flopCounter
.
start
();
typedef
Dune
::
GridSelector
::
GridType
GridType
;
typedef
ProblemGenerator
<
GridType
>
ProblemTraits
;
// ProblemType is a Dune::Function that evaluates to $u_0$ and also has a
// method that gives you the exact solution.
//typedef NSProblemType< GridType > ProblemType;
//ProblemType problem;
// Note to me: problem description is for FemEOC
const
std
::
string
advFlux
=
ProblemTraits
::
advectionFluxName
();
const
std
::
string
diffFlux
=
ProblemTraits
::
diffusionFluxName
();
...
...
@@ -119,6 +124,13 @@ namespace LOOPSPACE {
compute
(
*
stepper
);
delete
stepper
;
delete
gridptr
;
// print floating point results
if
(
countFlops
)
{
flopCounter
.
stop
();
flopCounter
.
print
(
std
::
cout
);
}
}
}
// end namespace LOOPSPACE
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