Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dorie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
dorie
dorie
Commits
18726c03
Commit
18726c03
authored
Sep 05, 2018
by
Santiago Ospina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added .cc files to transport
parent
a3cf7245
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
41 deletions
+68
-41
dune/dorie/test/test-simulation-dummy-transport.hh
dune/dorie/test/test-simulation-dummy-transport.hh
+4
-5
dune/dorie/transport.cc
dune/dorie/transport.cc
+64
-36
No files found.
dune/dorie/test/test-simulation-dummy-transport.hh
View file @
18726c03
...
...
@@ -2,12 +2,11 @@
#define DUNE_DORIE_DUMMY_TRANSPORT_SIMULATION_HH
#include "../interface/transport_simulation.hh"
#include "../interface/transport_simulation.cc"
#include "../solver/adapters/saturation.hh"
#include "../solver/adapters/water_content.hh"
#include "../solver/adapters/conductivity.hh"
#include <dune/pdelab/adaptivity/adaptivity.hh>
namespace
Dune
{
namespace
Dorie
{
...
...
@@ -50,11 +49,11 @@ public:
auto
gfWaterFlux
=
std
::
make_shared
<
ConstGridFunctionVector
<
BaseTraits
>>
(
_grid
->
leafGridView
(),
flux
);
auto
gfSaturation
=
std
::
make_shared
<
ConstGridFunctionScalar
<
BaseTraits
>>
(
_grid
->
leafGridView
(),
sat
);
this
->
set
WaterF
lux
(
interval
,
gfWaterFlux
);
this
->
set
S
aturation
(
interval
,
gfSaturation
);
this
->
set
_waterf
lux
(
interval
,
gfWaterFlux
);
this
->
set
_s
aturation
(
interval
,
gfSaturation
);
// Write the flux and saturation for comparison
if
(
output_policy
()
!=
OutputPolicy
::
None
)
if
(
this
->
output_policy
()
!=
OutputPolicy
::
None
)
{
const
int
subsamling_lvl
=
_inifile
.
get
<
int
>
(
"output.subsamplingLevel"
,
0
);
const
auto
subsamling_intervals
=
Dune
::
refinementLevels
(
subsamling_lvl
);
...
...
dune/dorie/transport.cc
View file @
18726c03
...
...
@@ -9,21 +9,20 @@
#include <dune/common/parametertreeparser.hh>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/pdelab/function/callableadapter.hh>
#include "interface/coupled_simulation.hh"
#include "interface/coupled_simulation.cc" // FIXME
#include "solver/util_grid_creator.hh"
template
<
typename
Traits
>
using
Sim
=
Dune
::
Dorie
::
CoupledSimulation
<
Traits
>
;
template
<
int
dim
>
template
<
int
dim
,
int
Rorder
>
using
Cube
=
Dune
::
Dorie
::
CoupledSimulationTraits
<
Dune
::
Dorie
::
BaseTraits
<
Dune
::
YaspGrid
<
dim
>
,
Dune
::
GeometryType
::
BasicType
::
cube
>
,
1
,
0
>
;
Dune
::
GeometryType
::
BasicType
::
cube
>
,
Rorder
,
0
>
;
template
<
int
dim
>
template
<
int
dim
,
int
Rorder
>
using
CubeAdaptive
=
Dune
::
Dorie
::
CoupledSimulationTraits
<
Dune
::
Dorie
::
BaseTraits
<
Dune
::
UGGrid
<
dim
>
,
Dune
::
GeometryType
::
BasicType
::
cube
>
,
1
,
0
>
;
Dune
::
GeometryType
::
BasicType
::
cube
>
,
Rorder
,
0
>
;
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -61,8 +60,8 @@ using CubeAdaptive = Dune::Dorie::CoupledSimulationTraits<Dune::Dorie::BaseTrait
const
std
::
string
outputPath_transport
=
inifile_transport
.
get
<
std
::
string
>
(
"output.outputPath"
);
const
bool
adaptivity
=
inifile_richards
.
get
<
bool
>
(
"adaptivity.useAdaptivity"
)
|
inifile_transport
.
get
<
bool
>
(
"adaptivity.useAdaptivity"
);
//
if (adaptivity)
// DUNE_THROW(Dune::NotImplemented,"Adaptivity is not supported for transport simulation
!");
if
(
adaptivity
)
DUNE_THROW
(
Dune
::
NotImplemented
,
"Adaptivity is not supported for transport simulation yet
!"
);
if
(
FEorder_transport
)
DUNE_THROW
(
Dune
::
NotImplemented
,
"Finite Element Order (grid.FEorder) not supported for transport model yet!"
);
...
...
@@ -97,51 +96,80 @@ using CubeAdaptive = Dune::Dorie::CoupledSimulationTraits<Dune::Dorie::BaseTrait
if
(
dim
==
2
)
{
if
(
gtype
==
"rectangular"
)
{
if
(
gtype
==
"gmsh"
){
DUNE_THROW
(
Dune
::
NotImplemented
,
"Simplex grid not supported yet!"
);
}
else
if
(
gtype
==
"rectangular"
){
if
(
adaptivity
){
DUNE_THROW
(
Dune
::
NotImplemented
,
"Adaptivity not supported yet!"
);
// auto grid = Dune::Dorie::build_grid_cube<Dune::UGGrid<2>>(inifile_richards,helper); // FIXME
// Sim<CubeAdaptive<2>> sim(helper,grid,inifile_richards,inifile_transport);
// sim.run();
}
else
{
auto
grid
=
Dune
::
Dorie
::
build_grid_cube
<
Dune
::
YaspGrid
<
2
>>
(
inifile_richards
,
helper
);
// FIXME
Sim
<
Cube
<
2
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
// sim.set_policy(Dune::Dorie::OutputPolicy::All);
sim
.
run
();
}
else
{
// no adaptivity
auto
grid
=
Dune
::
Dorie
::
build_grid_cube
<
Dune
::
YaspGrid
<
2
>>
(
inifile_richards
,
helper
);
switch
(
FEorder_richards
){
case
1
:{
Sim
<
Cube
<
2
,
1
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
sim
.
run
();
break
;
}
case
2
:{
Sim
<
Cube
<
2
,
2
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
sim
.
run
();
break
;
}
case
3
:{
Sim
<
Cube
<
2
,
3
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
}
default:
DUNE_THROW
(
Dune
::
NotImplemented
,
"Finite Element Order (grid.FEorder) not supported!"
);
}
}
}
else
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"Grid Type not supported!"
);
}
}
}
else
if
(
dim
==
3
)
else
if
(
dim
==
3
)
{
if
(
gtype
==
"rectangular"
)
{
if
(
gtype
==
"gmsh"
){
DUNE_THROW
(
Dune
::
NotImplemented
,
"Simplex grid not supported yet!"
);
}
else
if
(
gtype
==
"rectangular"
){
if
(
adaptivity
){
DUNE_THROW
(
Dune
::
NotImplemented
,
"Adaptivity not supported yet!"
);
// auto grid = Dune::Dorie::build_grid_cube<Dune::UGGrid<3>>(inifile_richards,helper); // FIXME
// Sim<CubeAdaptive<3>> sim(helper,grid,inifile_richards,inifile_transport);
// sim.run();
}
else
{
auto
grid
=
Dune
::
Dorie
::
build_grid_cube
<
Dune
::
YaspGrid
<
3
>>
(
inifile_richards
,
helper
);
// FIXME
Sim
<
Cube
<
3
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
// sim.set_policy(Dune::Dorie::OutputPolicy::All);
sim
.
run
();
}
else
{
// no adaptivity
auto
grid
=
Dune
::
Dorie
::
build_grid_cube
<
Dune
::
YaspGrid
<
3
>>
(
inifile_richards
,
helper
);
switch
(
FEorder_richards
){
case
1
:{
Sim
<
Cube
<
3
,
1
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
sim
.
run
();
break
;
}
case
2
:{
Sim
<
Cube
<
3
,
2
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
sim
.
run
();
break
;
}
case
3
:{
Sim
<
Cube
<
3
,
3
>>
sim
(
helper
,
grid
,
inifile_richards
,
inifile_transport
);
sim
.
run
();
break
;
}
default:
DUNE_THROW
(
Dune
::
NotImplemented
,
"Finite Element Order (grid.FEorder) not supported!"
);
}
}
}
else
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"Grid Type not supported!"
);
}
}
else
// grid_dim != 2,3
{
// grid_dim != 2,3
else
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"Number of dimensions (grid.dimensions) not supported!"
);
}
if
(
helper
.
rank
()
==
0
){
std
::
cout
<<
"PROGRAM TERMINATED SUCCESSFULLY"
<<
std
::
endl
;
std
::
cout
<<
"::: Execution time "
...
...
Write
Preview
Markdown
is supported
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