[dune-fem] dgf grid file parameters option
Agnese, Marco
m.agnese13 at imperial.ac.uk
Mon Aug 22 12:17:48 CEST 2016
Ciao Francesco,
from the documentation:
In addition to the element and vertex information it is possible to add
a set of parameters through the DGF file. Using the construction
mechanism via the Dune::GridPtr<GridType> class these parameters can be
accessed using the
Dune::GridPtr<GridType>::parameters(const Entity& en)
method. Depending on the codimentsion of \c en the method returns either
the element or vertex parameters of that entity in the DGF file.
The number of parameters for a given
codimension can be retrived using the method
Dune::GridPtr<GridType>::nofParameters.
In the case of parallel runs only the process with rank zero reads the
dgf file and thus the parameters are only available on that processor.
Do not call loadBalance (or for that matter globalRefine, adapt) on the
grid instance before retrieving the parameters. To simplify the handling
of parameters in a parallel run the Dune::GridPtr<GridType>::loadBalance
method can be used to distribute the macro grid and the parameters.
Afterwards the parameters can be extracted on each processor using the
method GridPtr<GridType>::parameters.
Moreover, I would suggest you to use a more recent version of dune-fem-howto (look here https://gitlab.dune-project.org/dune-fem/dune-fem-howto) which is compatible with the current stable release of dune-fem (v. 2.4.1) and with the unstable dune-fem ( v. 3.0.0).
Cheers,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-fem/attachments/20160822/fc7eff67/attachment.htm>
More information about the dune-fem
mailing list