[Dune] [Dune-Commit] dune-grid r7063 - in trunk/dune/grid: albertagrid alugrid/2d alugrid/3d common onedgrid uggrid
Jö Fahlke
jorrit at jorrit.de
Wed Nov 3 14:44:17 CET 2010
Am Wed, 3. Nov 2010, 11:06:26 +0100 schrieb Oliver Sander:
> Isn't this an interface change which should be voted upon
> before implementation?
Hmm, possibly. I saw this as a backward compatible addition rather than a
change but probably the latter is meant to contain the former. Shall we vote
on that now or shall I move the stuff to a branch and we vote on it later?
Here are the exact additions, later addition depend on earlier ones:
1) I propose the give the GridFactory an additional constructor signature of
the form
GridFactory(const ParameterTree &);
This constructor is meant for passing options from a (user written)
parameter file to the grid creation process. An empty ParameterTree here
is equivalent to calling the default constructor. Parameters unknown to
the particular grid manager are ignored.
2) Use 1) to support passing UG's heapSize parameter as a "heap_size"
ParameterTree option to the GridFactory.
3) On the StructuredGridFactory add the signatures
static shared_ptr<GridType>
createSimplexGrid(const FieldVector<ctype,dimworld>& lowerLeft,
const FieldVector<ctype,dimworld>& upperRight,
const array<unsigned int,dim>& elements,
const ParameterTree ¶ms);
static shared_ptr<GridType>
createCubeGrid(const FieldVector<ctype,dimworld>& lowerLeft,
const FieldVector<ctype,dimworld>& upperRight,
const array<unsigned int,dim>& elements,
const ParameterTree ¶ms);
The additional ParameterTree parameter is simply passed to the underlying
GridFactory and not otherwise acted upon by the StructuredGridFactory
itself.
4) On the StructuredGridFactory add the signatures
static shared_ptr<GridType>
createSimplexGrid(const ParameterTree ¶ms);
static shared_ptr<GridType>
createCubeGrid(const ParameterTree ¶ms);
These extract the properties of the Grid to create from the ParameterTree
and then call the functions introduced in 3). The following options are
recognized:
bbox.lower -> lowerLeft (default: vector of 0)
bbox.upper -> upperRight (default: vector of 1)
elements -> elements (default: array of 1)
5) On the StructuredGridFactory add the following ParameterTree option to the
to the functions introduced in 4)
global_refines -> number of globalRefines() to do after the grid has been
created according to the other options.
(default: 0)
Bye,
Jö.
--
Der Horizont vieler Menschen ist ein Kreis mit Radius Null - und das
nennen sie ihren Standpunkt.
-- A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20101103/013bc775/attachment.sig>
More information about the Dune
mailing list