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
08bbf755
Commit
08bbf755
authored
6 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
Some improvements.
parent
3ac4ef62
No related branches found
No related tags found
1 merge request
!4
Latest features added to dune-fem-dg.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/fem-dg/models/modelwrapper.hh
+4
-4
4 additions, 4 deletions
dune/fem-dg/models/modelwrapper.hh
dune/fem-dg/operator/dg/primaloperator.hh
+2
-1
2 additions, 1 deletion
dune/fem-dg/operator/dg/primaloperator.hh
dune/fem-dg/solver/dg.hh
+10
-6
10 additions, 6 deletions
dune/fem-dg/solver/dg.hh
with
16 additions
and
11 deletions
dune/fem-dg/models/modelwrapper.hh
+
4
−
4
View file @
08bbf755
...
...
@@ -167,10 +167,10 @@ namespace Fem
template
<
class
Entity
>
void
setEntity
(
const
Entity
&
entity
)
const
{
//
if( hasAdvection )
//
advection_.init( entity )
;
//
if( hasDiffusion )
//
diffusion_.init( entity );
if
(
hasAdvection
)
advection_
.
init
(
entity
);
if
(
hasDiffusion
)
diffusion_
.
init
(
entity
);
}
inline
bool
hasStiffSource
()
const
{
return
AdditionalType
::
hasStiffSource
;
}
...
...
This diff is collapsed.
Click to expand it.
dune/fem-dg/operator/dg/primaloperator.hh
+
2
−
1
View file @
08bbf755
...
...
@@ -415,6 +415,7 @@ namespace Fem
void
operator
()(
const
DestinationType
&
arg
,
DestinationType
&
dest
)
const
{
++
operatorCalled_
;
std
::
cout
<<
"Operator call."
<<
std
::
endl
;
pass2_
(
arg
,
dest
);
}
...
...
@@ -458,7 +459,7 @@ namespace Fem
// copy U to uTmp_
if
(
polOrd
>
0
)
{
//
std::cout << "Called extra limit" << std::endl;
std
::
cout
<<
"Called extra limit"
<<
std
::
endl
;
if
(
!
uTmp_
)
uTmp_
.
reset
(
new
LimiterDestinationType
(
"limitTmp"
,
limiterSpace_
)
);
...
...
This diff is collapsed.
Click to expand it.
dune/fem-dg/solver/dg.hh
+
10
−
6
View file @
08bbf755
...
...
@@ -10,6 +10,7 @@
#include
<dune/fem/operator/common/spaceoperatorif.hh>
// dune-fem-dg includes
#include
<dune/fem-dg/algorithm/evolution.hh>
#include
<dune/fem-dg/operator/fluxes/advection/fluxes.hh>
#include
<dune/fem-dg/operator/fluxes/euler/fluxes.hh>
#include
<dune/fem-dg/operator/dg/operatortraits.hh>
...
...
@@ -81,7 +82,8 @@ namespace Fem
DGOperator
(
const
DiscreteFunctionSpaceType
&
space
,
const
AdvectionModel
&
advectionModel
,
const
DiffusionModel
&
diffusionModel
)
const
DiffusionModel
&
diffusionModel
,
const
TimeSteppingParameters
&
param
=
TimeSteppingParameters
()
)
:
space_
(
space
),
extra_
(),
tp_
(
space_
.
gridPart
().
comm
()),
...
...
@@ -92,10 +94,8 @@ namespace Fem
rkSolver_
(
tp_
,
fullOperator_
,
explOperator_
,
implOperator_
,
name
()
),
initialized_
(
false
)
{
std
::
string
keyPrefix
(
"femdg.stepper."
);
const
double
maxTimeStep
=
Dune
::
Fem
::
Parameter
::
getValue
<
double
>
(
keyPrefix
+
"maxtimestep"
,
1e-4
);
fixedTimeStep_
=
Dune
::
Fem
::
Parameter
::
getValue
<
double
>
(
keyPrefix
+
"fixedtimestep"
,
0.0
);
const
double
maxTimeStep
=
1e-3
;
//param.maxTimeStep();
fixedTimeStep_
=
param
.
fixedTimeStep
();
// start first time step with prescribed fixed time step
// if it is not 0 otherwise use the internal estimate
tp_
.
provideTimeStepEstimate
(
maxTimeStep
);
...
...
@@ -127,15 +127,19 @@ namespace Fem
{
if
(
!
initialized_
)
{
const
double
dt
=
tp_
.
timeStepEstimate
();
//
const double dt = tp_.timeStepEstimate();
rkSolver_
.
initialize
(
dest
);
initialized_
=
true
;
// tp_.provideTimeStepEstimate( dt );
}
std
::
cout
<<
"Start operator solve!"
<<
std
::
endl
;
Dune
::
Timer
timer
;
// limit( dest );
rkSolver_
.
solve
(
dest
,
monitor_
);
std
::
cout
<<
"Operator solve called: "
<<
timer
.
elapsed
()
<<
std
::
endl
;
// next time step is prescribed by fixedTimeStep
if
(
fixedTimeStep_
>
1e-20
)
tp_
.
next
(
fixedTimeStep_
);
...
...
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