Commit 0174ab99 authored by Lukas Riedel's avatar Lukas Riedel

Remove 'get' prefix from functions for retrieving grid maps

Rename '[get_]element_index_map' and '[get_]boundary_index_map'
parent fe369536
......@@ -82,8 +82,8 @@ public:
Dorie::GridMapper<Grid, GridMode::rectangular> mapper(_grid, _config);
_element_index_map = mapper.get_element_index_map();
_boundary_index_map = mapper.get_boundary_index_map();
_element_index_map = mapper.element_index_map();
_boundary_index_map = mapper.boundary_index_map();
}
else if (grid_type == "gmsh")
{
......@@ -101,8 +101,8 @@ public:
element_index_map,
boundary_index_map);
_element_index_map = mapper.get_element_index_map();
_boundary_index_map = mapper.get_boundary_index_map();
_element_index_map = mapper.element_index_map();
_boundary_index_map = mapper.boundary_index_map();
}
else {
_log->error("DORiE expects to work on UGGrid for "
......@@ -120,9 +120,9 @@ public:
/// Return a shared pointer to the created grid
std::shared_ptr<Grid> grid () const { return _grid; }
/// Return the local element index map
const Map& get_element_index_map () const { return _element_index_map; }
const Map& element_index_map () const { return _element_index_map; }
/// Return the local boundary index map
const Map& get_boundary_index_map () const { return _boundary_index_map; }
const Map& boundary_index_map () const { return _boundary_index_map; }
/// Return true if parallel execution is allowed. Issue a warning if not.
/** Currently, we only allow parallel execution on YaspGrid due to
......
......@@ -84,9 +84,9 @@ public:
{ }
/// Return the local element index map
const Map& get_element_index_map () const { return _element_index_map; }
const Map& element_index_map () const { return _element_index_map; }
/// Return the local boundary index map
const Map& get_boundary_index_map () const { return _boundary_index_map; }
const Map& boundary_index_map () const { return _boundary_index_map; }
protected:
/// Broadcast the element id map to all processors
......
// These groups should gather information strongly related portions of the code.
// These groups should gather information strongly related portions of the code.
// In them we aim to explain to other developers:
// - The rationale of the design
// - How careful someone has to be when modifying it
......@@ -31,7 +31,7 @@
beginning of any program like
auto [inifile, log, helper] = Dune::Dorie::Setup::init(argc, argv);
Notice that `helper` will be of *reference* type `Dune::MPIHelper &`.
@}
......@@ -59,7 +59,7 @@
loads the mapping data and load-balances it appropriately across all
processes if executed in parallel. The resulting local maps are retrieved
by the Dorie::GridCreator and can be queried by the user.
There are two general ways of constructing a grid:
1. Assembling an unstructured grid from a [GMSH](http://gmsh.info/)
......@@ -67,7 +67,7 @@
grid element and boundary mappings and the `Dune::GmshReader` also loads
this information. It is then passed to the `GridMapper` and properly
load-balanced, as the `GmshReader` currently only works sequentially.
2. Building a rectangular grid with user-defined extensions and numbers
of cells in each direction. Depending on wether grid adaptivity was
enabled, this either creates a `UGGrid` or a `YaspGrid`. In both cases,
......@@ -84,22 +84,22 @@
@code{.cc}
Dune::Dorie::GridCreator<GridType> grid_creator(config, helper);
@endcode
Retrieve a shared pointer to the grid from it. The grid will already be
properly load-balanced.
@code{.cc}
auto grid = grid_creator.grid();
@endcode
The index maps are managed by the `GridMapper`, which is created internally.
After initializing the `GridCreator`, they can be retrieved from it.
Notice that these maps only remain valid if the grid is **not load-balanced
any further** (e.g., after local grid refinement)!
@code{.cc}
auto element_index_map = grid_creator.get_element_index_map();
auto boundary_index_map = grid_creator.get_boundary_index_map();
auto element_index_map = grid_creator.element_index_map();
auto boundary_index_map = grid_creator.boundary_index_map();
@endcode
@}
......@@ -179,11 +179,11 @@
Could not open file: filename.xyz
Parameter 'name' incompatible to setting 'value'
Bad:
name incompatible to value
Also, do not include the header `<spdlog/spdlog.h>` directly, but only the
respective logging header inside DORiE.
@}
......@@ -209,13 +209,13 @@
@{
Local operators are in many senses the heart of dorie; in them, we transform
finite element basis into a vector of residuals and a mass matrix taking into
account the specific equation and method we want to solve. These
account the specific equation and method we want to solve. These
transformations follow the structure of dune-pdelab. In particular,
some care has to be taken regarding the different frames of reference when
working with coordinates and gradients. It can get particularly messy
when working with intersections because one has to express the same
when working with intersections because one has to express the same
position/gradient with respect to the inside, outside, and face entities,
and sometimes with respect to the macro-grid (e.g. global coordinates).
and sometimes with respect to the macro-grid (e.g. global coordinates).
Therefore, in dorie we try to use the following suffixes convention :
| Convention | Meaning |
......@@ -226,9 +226,9 @@
| `<description>` + `_g` | `<description>` with respect to the **global** grid. |
| `<description>` + `_n` | `<description>` in **normal** direction. |
Notice that when working with gradients, the suffix for normal direction can
be combined with the first three suffixes (`_n_i`, `_n_o`, and `_n_f`). When
it's not specified, is understood that normal directions are referenced with
Notice that when working with gradients, the suffix for normal direction can
be combined with the first three suffixes (`_n_i`, `_n_o`, and `_n_f`). When
it's not specified, is understood that normal directions are referenced with
respect to the face (`_n` \f$\equiv\f$. `_n_f`).
@todo Update Dune::Dorie::Operator::RichardsDGSpatialOperator to the
......
......@@ -32,7 +32,7 @@ RichardsSimulation<Traits>::RichardsSimulation (
Dune::PDELab::constraints(*gfs,*cc,false);
// --- Create the new parameter class
auto element_map = _grid_creator.get_element_index_map();
auto element_map = _grid_creator.element_index_map();
fparam = std::make_shared<FlowParameters>(inifile, grid, element_map);
// --- Operator Helper Classes ---
......
......@@ -25,8 +25,8 @@ void create_grid_and_test_mapping (const Dune::ParameterTree& config,
// get grid and data
auto grid = gc.grid();
const auto element_map = gc.get_element_index_map();
const auto boundary_map = gc.get_boundary_index_map();
const auto element_map = gc.element_index_map();
const auto boundary_map = gc.boundary_index_map();
// report maps
auto log = Dune::Dorie::get_logger(Dune::Dorie::log_base);
......
......@@ -77,7 +77,7 @@ int main (int argc, char** argv)
// create the grid
Dune::Dorie::GridCreator<Traits<2>::Grid> gc(inifile, helper);
auto grid = gc.grid();
const auto index_map = gc.get_element_index_map();
const auto index_map = gc.element_index_map();
inifile = Dune::Dorie::Setup::prep_ini_for_richards(inifile);
......
......@@ -165,7 +165,7 @@ int main (int argc, char** argv)
// create the grid
Dune::Dorie::GridCreator<Traits<2>::Grid> gc(inifile, helper);
auto grid = gc.grid();
const auto index_map = gc.get_element_index_map();
const auto index_map = gc.element_index_map();
inifile = Dune::Dorie::Setup::prep_ini_for_richards(inifile);
......
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