On Thu, Jul 17, 2014 at 09:37:37AM +0100, Chris Richardson wrote: > > It may seem obvious, but I want to be able to attach parameters to a > Mesh before it calls its 'build' method. > This is because I need to be able to choose a ghosting strategy in > parallel (at present it is set by a GlobalParameter). > > I was thinking of adding a constructor which can take a Parameters > argument to all Mesh constructors (i.e. including all > the Unit*Mesh constructors). > > Advantages - flexibility, any future set of parameters can be > accommodated > - can remove current string arguments, like "diagonal" > for RectangleMesh > > Disadvantages - user has to create a Parameters object if they want > to change the Mesh defaults > - cannot constrain set of allowed parameters in advance > > Any alternative suggestions welcome.
Are there more than 1 parameter to set? If not, an option would be to add a parameter to the constructors with a default value. -- Anders _______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
