Commit bec57d36 authored by Santiago Ospina's avatar Santiago Ospina

* Fixed FEorder keyword

* Split common categories and simulation specific categories in the xml
Signed-off-by: Santiago Ospina De Los Ríos's avatarSantiago Ospina <santiago.ospina@iup.uni-heidelberg.de>
parent 80a30cf8
......@@ -22,7 +22,12 @@ if (NOT ${FIELDPARSCRAPE_RETURN} EQUAL 0)
message(FATAL_ERROR "Parameter scraper failed. DORiE can not be built.")
endif()
scrape_parameters(${PROJECT_SOURCE_DIR}/dune/dorie ${CMAKE_CURRENT_SOURCE_DIR}/parameters.xml ${CMAKE_CURRENT_SOURCE_DIR}/parameters.css "config.ini;parameters.html;parameters.rst" PARSCRAPE_RETURN)
scrape_parameters(${PROJECT_SOURCE_DIR}/dune/dorie ${CMAKE_CURRENT_SOURCE_DIR}/common-parameters.xml ${CMAKE_CURRENT_SOURCE_DIR}/parameters.css "common-config.ini;common-parameters.html;common-parameters.rst" PARSCRAPE_RETURN)
if (NOT ${PARSCRAPE_RETURN} EQUAL 0)
message(FATAL_ERROR "Parameter scraper failed. DORiE can not be built.")
endif()
scrape_parameters(${PROJECT_SOURCE_DIR}/dune/dorie ${CMAKE_CURRENT_SOURCE_DIR}/richards-parameters.xml ${CMAKE_CURRENT_SOURCE_DIR}/parameters.css "richards-config.ini;richards-parameters.html;richards-parameters.rst" PARSCRAPE_RETURN)
if (NOT ${PARSCRAPE_RETURN} EQUAL 0)
message(FATAL_ERROR "Parameter scraper failed. DORiE can not be built.")
endif()
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
If you want to use any special characters, you will need to define them here.
A full list is found at https://www.w3.org/TR/REC-html40/sgml/entities.html
-->
<!DOCTYPE naughtyxml [
<!ENTITY alpha "&#945;">
<!ENTITY beta "&#946;">
<!ENTITY eta "&#951;">
<!ENTITY tau "&#964;">
<!ENTITY times "&#215;">
]>
<!--
XML file hierarchy:
<dorie> -> <category> -> <parameter> -> (parameter attributes)
Possible parameter attributes:
definition: meaning of the parameter, will only show up in html output
suggestion: standard value in created parameter files
values: possible values, will only show up in html output
comment: extra comment, will only show up in parameter files
All attributes are optional.
The parser supports rudimentary markdown / styling. You can add a paragraph by
adding an empty line, make text **bold** or ``monospaced``.
-->
<dorie>
<category name="grid">
<parameter name="gridType">
<definition> Grid geometry. The grid can either be structured rectangular / cubic
(``rectangular``) or unstructured triangular / tetrahedral (``gmsh``). The former does not
require any additional input, while in the latter case a gmsh file with
the corresponding grid is to be given. </definition>
<suggestion> rectangular </suggestion>
<values> rectangular, gmsh </values>
<comment> Choose grid type: rectangular, gmsh </comment>
</parameter>
<parameter name="dimensions">
<definition> Dimensionality of the domain. </definition>
<suggestion> 2 </suggestion>
<values> 2, 3 </values>
</parameter>
<parameter name="gridFile">
<definition> Path to the gmsh file containing the grid if ``gridType`` is set
to ``gmsh``. </definition>
<values> path </values>
</parameter>
<parameter name="extensions">
<definition> Physical extensions of the domain in meters. Given in x, then y,
then z-direction. If a mesh file is imported, they have to match its maximum
extensions. </definition>
<values> float &times; float (&times; float) </values>
<suggestion> 1 1 </suggestion>
</parameter>
<parameter name="cells">
<definition> Initial number of cells in each dimension (x, then y, then z) if ``gridType``
is set to ``rectangular``. This represents the coarsest level of the grid
(i.e., refinement level 0). </definition>
<values> int &times; int (&times; int) </values>
<suggestion> 100 100 </suggestion>
</parameter>
<parameter name="initialLevel">
<definition> Initial level of refinement of the grid. 0 means no refinement.
</definition>
<values> int </values>
<suggestion> 0 </suggestion>
</parameter>
</category>
<category name="adaptivity">
<parameter name="useAdaptivity">
<definition> Switches adaptive grid refinement (h-adaptivity) on (``true``) or
off (``false``). If enabled, an unstructured grid manager with higher computational
cost is used when using rectangular / cubic grids. </definition>
<values> true, false </values>
<suggestion> false </suggestion>
</parameter>
<parameter name="maxLevel">
<definition> The maximum refinement level kept in the grid. This is a useful
tool to prevent over-refinement. If this value is high, the grid can
be refined to an arbitrary degree, leading to an evenly distributed error
across the grid. Make sure you avoid refinement levels which imply grid cell sizes
beyond the Richards continuum scale. </definition>
<values> int </values>
<suggestion> 10 </suggestion>
</parameter>
<parameter name="minLevel">
<definition> Minimum refinement level of the grid. Grid cells will not get
coarsened below this level. </definition>
<values> int </values>
<suggestion> 0 </suggestion>
</parameter>
<parameter name="markingStrategy">
<definition> Marking strategy used in order to find the grid cells that should
be refined / coarsened.
**elementFraction**: Of the N elements in the sorted list of local errors, the first
&alpha;N elements are refined while the last &beta;N elements are being coarsened.
**errorFraction**: Refine (coarse) as many elements as necessary, such that the
total relative contribution of all refined (coarsened) cells to the
global error is &alpha; (&beta;), starting with the most (least) contributing
element. The total number of affected entities can vary greatly
between different iterations, and (with &alpha; = &beta;) much more elements
are coarsened than refined.
**threshold**: All elements with a local error &eta; &gt; &alpha; are being refined once.
Coarsening occurs for all elements that carry an error smaller
than &beta;.
</definition>
<values> elementFraction, errorFraction, threshold </values>
<suggestion> elementFraction </suggestion>
<comment> elementFraction, errorFraction, threshold </comment>
</parameter>
<parameter name="refinementFraction">
<definition> The value of &alpha; for the chosen ``markingStrategy``. </definition>
<values> float </values>
<suggestion> 0.1 </suggestion>
</parameter>
<parameter name="coarseningFraction">
<definition> The value of &beta; for the chosen ``markingStrategy``. </definition>
<values> float </values>
<suggestion> 0.2 </suggestion>
</parameter>
<parameter name="threshold">
<definition> Grid refinement is skipped entirely for the given time step if
all grid elements carry an error lower than this value. This is to only
make the grid as fine as necessary. </definition>
<values> float </values>
<suggestion> 1E-8 </suggestion>
</parameter>
</category>
<category name="misc">
<parameter name="debugMode">
<definition> Switches debug mode on (``true``) or off (``false``). In debug mode,
the execution of DORiE stops immediately until a developer hooks into the
process with a debugger and sets the variable ``i`` to a value &gt; 0. Only
intended for use by developers.
</definition>
<values> true, false </values>
<suggestion> false </suggestion>
</parameter>
</category>
</dorie>
......@@ -31,146 +31,6 @@ adding an empty line, make text **bold** or ``monospaced``.
-->
<dorie>
<!-- Common Parameters -->
<category name="grid">
<parameter name="gridType">
<definition> Grid geometry. The grid can either be structured rectangular / cubic
(``rectangular``) or unstructured triangular / tetrahedral (``gmsh``). The former does not
require any additional input, while in the latter case a gmsh file with
the corresponding grid is to be given. </definition>
<suggestion> rectangular </suggestion>
<values> rectangular, gmsh </values>
<comment> Choose grid type: rectangular, gmsh </comment>
</parameter>
<parameter name="dimensions">
<definition> Dimensionality of the domain. </definition>
<suggestion> 2 </suggestion>
<values> 2, 3 </values>
</parameter>
<parameter name="FEorder">
<definition> Order of the finite element method used. Values &gt; 1 are not
thoroughly tested. </definition>
<suggestion> 1 </suggestion>
<values> 1, 2, 3 </values>
</parameter>
<parameter name="gridFile">
<definition> Path to the gmsh file containing the grid if ``gridType`` is set
to ``gmsh``. </definition>
<values> path </values>
</parameter>
<parameter name="extensions">
<definition> Physical extensions of the domain in meters. Given in x, then y,
then z-direction. If a mesh file is imported, they have to match its maximum
extensions. </definition>
<values> float &times; float (&times; float) </values>
<suggestion> 1 1 </suggestion>
</parameter>
<parameter name="cells">
<definition> Initial number of cells in each dimension (x, then y, then z) if ``gridType``
is set to ``rectangular``. This represents the coarsest level of the grid
(i.e., refinement level 0). </definition>
<values> int &times; int (&times; int) </values>
<suggestion> 100 100 </suggestion>
</parameter>
<parameter name="initialLevel">
<definition> Initial level of refinement of the grid. 0 means no refinement.
</definition>
<values> int </values>
<suggestion> 0 </suggestion>
</parameter>
</category>
<category name="adaptivity">
<parameter name="useAdaptivity">
<definition> Switches adaptive grid refinement (h-adaptivity) on (``true``) or
off (``false``). If enabled, an unstructured grid manager with higher computational
cost is used when using rectangular / cubic grids. </definition>
<values> true, false </values>
<suggestion> false </suggestion>
</parameter>
<parameter name="maxLevel">
<definition> The maximum refinement level kept in the grid. This is a useful
tool to prevent over-refinement. If this value is high, the grid can
be refined to an arbitrary degree, leading to an evenly distributed error
across the grid. Make sure you avoid refinement levels which imply grid cell sizes
beyond the Richards continuum scale. </definition>
<values> int </values>
<suggestion> 10 </suggestion>
</parameter>
<parameter name="minLevel">
<definition> Minimum refinement level of the grid. Grid cells will not get
coarsened below this level. </definition>
<values> int </values>
<suggestion> 0 </suggestion>
</parameter>
<parameter name="markingStrategy">
<definition> Marking strategy used in order to find the grid cells that should
be refined / coarsened.
**elementFraction**: Of the N elements in the sorted list of local errors, the first
&alpha;N elements are refined while the last &beta;N elements are being coarsened.
**errorFraction**: Refine (coarse) as many elements as necessary, such that the
total relative contribution of all refined (coarsened) cells to the
global error is &alpha; (&beta;), starting with the most (least) contributing
element. The total number of affected entities can vary greatly
between different iterations, and (with &alpha; = &beta;) much more elements
are coarsened than refined.
**threshold**: All elements with a local error &eta; &gt; &alpha; are being refined once.
Coarsening occurs for all elements that carry an error smaller
than &beta;.
</definition>
<values> elementFraction, errorFraction, threshold </values>
<suggestion> elementFraction </suggestion>
<comment> elementFraction, errorFraction, threshold </comment>
</parameter>
<parameter name="refinementFraction">
<definition> The value of &alpha; for the chosen ``markingStrategy``. </definition>
<values> float </values>
<suggestion> 0.1 </suggestion>
</parameter>
<parameter name="coarseningFraction">
<definition> The value of &beta; for the chosen ``markingStrategy``. </definition>
<values> float </values>
<suggestion> 0.2 </suggestion>
</parameter>
<parameter name="threshold">
<definition> Grid refinement is skipped entirely for the given time step if
all grid elements carry an error lower than this value. This is to only
make the grid as fine as necessary. </definition>
<values> float </values>
<suggestion> 1E-8 </suggestion>
</parameter>
</category>
<category name="misc">
<parameter name="debugMode">
<definition> Switches debug mode on (``true``) or off (``false``). In debug mode,
the execution of DORiE stops immediately until a developer hooks into the
process with a debugger and sets the variable ``i`` to a value &gt; 0. Only
intended for use by developers.
</definition>
<values> true, false </values>
<suggestion> false </suggestion>
</parameter>
</category>
<!-- Richards Parameters -->
<category name="richards.output">
<parameter name="verbose">
<definition> Overall verbosity of the program </definition>
......@@ -371,6 +231,13 @@ adding an empty line, make text **bold** or ``monospaced``.
<values> float </values>
<suggestion> 10 </suggestion>
</parameter>
<parameter name="FEorder">
<definition> Order of the finite element method used. Values &gt; 1 are not
thoroughly tested. </definition>
<suggestion> 1 </suggestion>
<values> 1, 2, 3 </values>
</parameter>
</category>
<category name="richards.NewtonParameters">
......
......@@ -63,4 +63,7 @@ Parameter Field Generator
Main Routine
------------
.. include:: default_files/parameters.rst
Common and richards parameters are needed in the configuration file.
.. include:: default_files/common-parameters.rst
.. include:: default_files/richards-parameters.rst
\ No newline at end of file
......@@ -108,8 +108,8 @@ int main(int argc, char** argv)
// Read necessary variables
const std::string gtype = inifile.get<std::string>("grid.gridType");
const int dim = inifile.get<int>("grid.dimensions");
const int FEorder = inifile.get<int>("grid.FEorder");
const int verbose = inifile.get<int>("misc.verbose");
const int FEorder = inifile.get<int>("richards.numerics.FEorder");
const int verbose = inifile.get<int>("richards.output.verbose");
const std::string outputPath = inifile.get<std::string>("richards.output.outputPath");
const bool adaptivity = inifile.get<bool>("adaptivity.useAdaptivity");
......
......@@ -100,7 +100,7 @@ public:
alpha(inifile.get<float>("adaptivity.refinementFraction")),
beta(inifile.get<float>("adaptivity.coarseningFraction")),
adaptivityThreshold(inifile.get<float>("adaptivity.threshold")),
verbose(inifile.get<int>("misc.verbose")),
verbose(inifile.get<int>("richards.output.verbose")),
total_time(0.)
{
if(strategy!="elementFraction" && strategy!="errorFraction" && strategy!="threshold")
......
......@@ -85,7 +85,7 @@ std::shared_ptr<GridType> build_grid_gmsh (const Dune::ParameterTree& inifile, c
Dune::Timer timer;
ios_base_all_saver restore(std::cout);
enum { dim = GridType::dimension };
const int verbose = inifile.get<int>("misc.verbose");
const int verbose = inifile.get<int>("richards.output.verbose");
const int level = inifile.get<int>("grid.initialLevel");
const std::string meshfilename = inifile.get<std::string>("grid.gridFile");
......@@ -133,7 +133,7 @@ std::shared_ptr<GridType> build_grid_cube (const Dune::ParameterTree& inifile, c
Dune::Timer timer;
ios_base_all_saver restore(std::cout);
enum { dim = GridType::dimension };
const int verbose = inifile.get<int>("misc.verbose");
const int verbose = inifile.get<int>("richards.output.verbose");
const int level = inifile.get<int>("grid.initialLevel");
const Dune::FieldVector<double,dim> lowerLeft(0.);
const Dune::FieldVector<double,dim> upperRight = inifile.get<Dune::FieldVector<double,dim>>("grid.extensions");
......
......@@ -13,8 +13,6 @@ grid.extensions = 1 1
adaptivity.useAdaptivity = false
misc.verbose = 0
richards.output.fileName = param | unique name
richards.output.outputPath = param | unique name
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = mc
_asset_path = "${CMAKE_CURRENT_LIST_DIR}"
......@@ -24,8 +25,6 @@ grid.initialLevel = 2
grid.cells = 20 20
grid.gridFile = {_asset_path}/meshes/square.msh
misc.verbose = 0
richards.output.fileName = mass_conservation | unique
richards.output.outputPath = mass_conservation | unique
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = ref_muphi
_test_command = run
......@@ -15,8 +16,6 @@ grid.gridType = rectangular
grid.cells = 50 200
grid.extensions = 1 1
misc.verbose = 0
richards.output.fileName = muphi | unique name
richards.output.outputPath = muphi | unique name
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = ode_homogeneous_sand
_test_command = run
......@@ -11,8 +12,6 @@ grid.cells = 1 160, 1 40, 1 20 | expand prec
adaptivity.useAdaptivity = false
misc.verbose = 0
richards.output.fileName = ode_homogeneous_sand | unique
richards.output.outputPath = ode_homogeneous_sand | unique
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = ode_homogeneous_silt
_test_command = run
......@@ -11,8 +12,6 @@ grid.cells = 1 160, 1 40, 1 20 | expand prec
adaptivity.useAdaptivity = false
misc.verbose = 0
richards.output.fileName = ode_homogeneous_silt | unique
richards.output.outputPath = ode_homogeneous_silt | unique
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = ode_layered
_test_command = run
......@@ -11,8 +12,6 @@ grid.cells = 1 160, 1 40, 1 20 | expand prec
adaptivity.useAdaptivity = false
misc.verbose = 0
richards.output.fileName = ode_layered | unique
richards.output.outputPath = ode_layered | unique
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = parallel_reference
_test_command = run
......@@ -14,8 +15,6 @@ grid.extensions = 1 1, 1 1 1 | expand dim
adaptivity.useAdaptivity = false
misc.verbose = 0
richards.output.fileName = parallel_reference_{_dimension}
richards.output.outputPath = parallel_reference_{_dimension}
......@@ -23,7 +22,6 @@ richards.time.end = 1E5
richards.time.maxTimestep = 1E5
richards.time.startTimestep = 1E3
richards.boundary.file = "{_asset_path}/bcs/infiltration_2d.dat", "{_asset_path}/bcs/infiltration_3d.dat" | expand dim
richards.parameters.arrayFile = "{_asset_path}/parfields/fft_2d_miller.h5", "{_asset_path}/parfields/fft_3d_miller.h5" | expand dim
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
_num_proc = 2, 3 | expand
......@@ -20,8 +21,6 @@ grid.extensions = 1 1, 1 1 1 | expand dim
adaptivity.useAdaptivity = false
misc.verbose = 2
richards.output.fileName = parallel_reference_compare | unique
richards.output.outputPath = parallel_reference_compare | unique
......
include ${CMAKE_BINARY_DIR}/doc/default_files/parfield.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = exec
_test_command = pfg
......
include ${CMAKE_BINARY_DIR}/doc/default_files/parfield.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = ref_muphi_pfg
_test_command = pfg
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = reference_2d
_test_command = run
......@@ -18,8 +19,6 @@ adaptivity.threshold = 5E-8
adaptivity.refinementFraction = 0.05
adaptivity.maxLevel = 7
misc.verbose = 0
richards.output.fileName = reference_2d | unique name
richards.output.outputPath = reference_2d | unique name
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = reference_3d
_test_command = run
......@@ -15,8 +16,6 @@ grid.gridFile = "{_asset_path}/meshes/3dcube.msh"
adaptivity.useAdaptivity = false
adaptivity.threshold = 1E-6
misc.verbose = 0
richards.fileName = reference_3d | unique name
richards.outputPath = reference_3d | unique name
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = reference_evaporation
_test_command = run
......@@ -17,8 +18,6 @@ grid.gridFile = "{_asset_path}/meshes/square.msh"
adaptivity.useAdaptivity = false
adaptivity.threshold = 1E-7
output.verbose = 0
richards.output.fileName = reference_evaporation | unique name
richards.output.outputPath = reference_evaporation | unique name
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = reference_interpolators
_test_command = run
......@@ -17,8 +18,6 @@ grid.gridFile = "{_asset_path}/meshes/square.msh"
adaptivity.useAdaptivity = true
adaptivity.threshold = 7E-8
misc.output = 0
richards.output.fileName = reference_interpolators | unique name
richards.output.outputPath = reference_interpolators | unique name
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/common-config.ini
include ${CMAKE_BINARY_DIR}/doc/default_files/richards-config.ini
__name = exec_run
_test_command = run
......@@ -13,8 +14,6 @@ grid.extensions = 1 1
adaptivity.useAdaptivity = false
misc.verbose = 0
richards.output.fileName = run | unique name
richards.output.outputPath = run | unique name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment