[Dune] [Dune-Commit] dune-grid r7063 - in trunk/dune/grid: albertagrid alugrid/2d alugrid/3d common onedgrid uggrid
Oliver Sander
sander at mi.fu-berlin.de
Wed Nov 3 11:06:26 CET 2010
Hi Jö!
Isn't this an interface change which should be voted upon
before implementation?
Best,
Oliver
Am 02.11.2010 18:06, schrieb joe at dune-project.org:
> Author: joe
> Date: 2010-11-02 18:06:20 +0100 (Tue, 02 Nov 2010)
> New Revision: 7063
>
> Modified:
> trunk/dune/grid/albertagrid/gridfactory.hh
> trunk/dune/grid/alugrid/2d/alu2dgridfactory.hh
> trunk/dune/grid/alugrid/3d/alu3dgridfactory.hh
> trunk/dune/grid/common/gridfactory.hh
> trunk/dune/grid/onedgrid/onedgridfactory.cc
> trunk/dune/grid/onedgrid/onedgridfactory.hh
> trunk/dune/grid/uggrid/uggridfactory.cc
> trunk/dune/grid/uggrid/uggridfactory.hh
> Log:
> [GridFactory] Introduce constructor which takes a ParameterTree with
> gridmanager-specific settings.
>
> Modified: trunk/dune/grid/albertagrid/gridfactory.hh
> ===================================================================
> --- trunk/dune/grid/albertagrid/gridfactory.hh 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/albertagrid/gridfactory.hh 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -14,6 +14,7 @@
> #include<map>
>
> #include<dune/common/array.hh>
> +#include<dune/common/parametertree.hh>
>
> #include<dune/grid/common/gridfactory.hh>
> #include<dune/grid/common/genericreferenceelements.hh>
> @@ -100,8 +101,12 @@
> //! is the factory able to create periodic meshes?
> static const bool supportPeriodicity = MacroData::supportPeriodicity;
>
> - /** default constructor */
> - GridFactory ()
> + /** \brief Default constructor, optionally with grid-specific options
> + *
> + * \note There are no grid-specific options for Alberta at the moment, so
> + * any parameters specified have no effect.
> + */
> + explicit GridFactory ( const ParameterTree¶ms = ParameterTree() )
> : globalProjection_( (const DuneProjection *)0 )
> {
> macroData_.create();
>
> Modified: trunk/dune/grid/alugrid/2d/alu2dgridfactory.hh
> ===================================================================
> --- trunk/dune/grid/alugrid/2d/alu2dgridfactory.hh 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/alugrid/2d/alu2dgridfactory.hh 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -8,6 +8,7 @@
>
> #include<dune/common/array.hh>
> #include<dune/common/mpihelper.hh>
> +#include<dune/common/parametertree.hh>
>
> #include<dune/grid/common/genericreferenceelements.hh>
> #include<dune/grid/common/gridfactory.hh>
> @@ -295,6 +296,15 @@
> {
> this->setVerbosity( verbose );
> }
> +
> + /** \brief Constructor with grid-specific options
> + *
> + * \note There are no grid-specific options for alugrid at the moment, so
> + * this constructor is identical to the default constructor.
> + */
> + GridFactory(const ParameterTree& params)
> + : BaseType( )
> + {}
> };
> /** \brief Specialization of the generic GridFactory for ALUSimplexGrid<2,dimw>
> * \ingroup GridFactory
> @@ -326,6 +336,15 @@
> {
> this->setVerbosity( verbose );
> }
> +
> + /** \brief Constructor with grid-specific options
> + *
> + * \note There are no grid-specific options for alugrid at the moment, so
> + * this constructor is identical to the default constructor.
> + */
> + GridFactory(const ParameterTree& params)
> + : BaseType( )
> + {}
> };
>
> /** \brief Specialization of the generic GridFactory for ALUCubeGrid<2,dimw>
> @@ -358,6 +377,15 @@
> {
> this->setVerbosity( verbose );
> }
> +
> + /** \brief Constructor with grid-specific options
> + *
> + * \note There are no grid-specific options for alugrid at the moment, so
> + * this constructor is identical to the default constructor.
> + */
> + GridFactory(const ParameterTree& params)
> + : BaseType( )
> + {}
> };
>
>
>
> Modified: trunk/dune/grid/alugrid/3d/alu3dgridfactory.hh
> ===================================================================
> --- trunk/dune/grid/alugrid/3d/alu3dgridfactory.hh 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/alugrid/3d/alu3dgridfactory.hh 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -11,6 +11,7 @@
>
> #include<dune/common/array.hh>
> #include<dune/common/mpihelper.hh>
> +#include<dune/common/parametertree.hh>
>
> #include<dune/grid/common/genericreferenceelements.hh>
> #include<dune/grid/common/gridfactory.hh>
> @@ -331,6 +332,17 @@
> : BaseType( filename, communicator )
> {}
>
> + /** \brief Constructor with grid-specific options
> + *
> + * \note There are no grid-specific options for alugrid at the moment, so
> + * this constructor is identical to the default constructor.
> + */
> + GridFactory ( const ParameterTree& params,
> + const MPICommunicatorType&communicator =
> + Grid::defaultCommunicator() )
> + : BaseType( communicator )
> + {}
> +
> protected:
> template< class, class, int> friend class ALULocalGeometryStorage;
> /** \brief constructor taking verbosity flag */
> @@ -368,6 +380,17 @@
> : BaseType( filename, communicator )
> {}
>
> + /** \brief Constructor with grid-specific options
> + *
> + * \note There are no grid-specific options for alugrid at the moment, so
> + * this constructor is identical to the default constructor.
> + */
> + GridFactory ( const ParameterTree& params,
> + const MPICommunicatorType&communicator =
> + Grid::defaultCommunicator() )
> + : BaseType( communicator )
> + {}
> +
> protected:
> template< class, class, int> friend class ALULocalGeometryStorage;
> /** \brief constructor taking verbosity flag */
>
> Modified: trunk/dune/grid/common/gridfactory.hh
> ===================================================================
> --- trunk/dune/grid/common/gridfactory.hh 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/common/gridfactory.hh 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -12,6 +12,7 @@
> #include<dune/common/function.hh>
> #include<dune/common/fvector.hh>
> #include<dune/common/geometrytype.hh>
> +#include<dune/common/parametertree.hh>
> #include<dune/common/shared_ptr.hh>
>
> #include<dune/grid/common/boundarysegment.hh>
> @@ -93,6 +94,10 @@
> GridFactoryInterface()
> {}
>
> + /** \brief Constructor with grid-specific options */
> + GridFactoryInterface(const ParameterTree& params)
> + {}
> +
> /** \brief Constructor for a given grid object
>
> If you already have your grid object constructed you can
> @@ -286,6 +291,12 @@
> DUNE_THROW(GridError, "There is no grid factory for this grid type!");
> }
>
> + /** \brief Constructor with grid-specific options */
> + GridFactory(const ParameterTree& params) {
> + DUNE_THROW(GridError,
> + "There is no grid factory for this grid type!");
> + }
> +
> /** \brief Constructor for a given grid object
>
> If you already have your grid object constructed you can
>
> Modified: trunk/dune/grid/onedgrid/onedgridfactory.cc
> ===================================================================
> --- trunk/dune/grid/onedgrid/onedgridfactory.cc 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/onedgrid/onedgridfactory.cc 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -3,6 +3,8 @@
>
> #include<config.h>
>
> +#include<dune/common/parametertree.hh>
> +
> #include<dune/grid/onedgrid/onedgridfactory.hh>
> #include<dune/grid/onedgrid/onedgridindexsets.hh>
>
> @@ -10,7 +12,7 @@
>
>
> Dune::GridFactory<Dune::OneDGrid>::
> -GridFactory() :
> +GridFactory(const ParameterTree¶ms) :
> factoryOwnsGrid_(true),
> vertexIndex_(0)
> {
>
> Modified: trunk/dune/grid/onedgrid/onedgridfactory.hh
> ===================================================================
> --- trunk/dune/grid/onedgrid/onedgridfactory.hh 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/onedgrid/onedgridfactory.hh 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -13,6 +13,7 @@
> #include<map>
>
> #include<dune/common/fvector.hh>
> +#include<dune/common/parametertree.hh>
>
> #include<dune/grid/common/gridfactory.hh>
> #include<dune/grid/onedgrid.hh>
> @@ -33,8 +34,12 @@
>
> public:
>
> - /** \brief Default constructor */
> - GridFactory();
> + /** \brief Default constructor, optionally with grid-specific options
> + *
> + * \note There are no grid-specific options for OneDGrid at the
> + * moment, so any parameters specified have no effect.
> + */
> + explicit GridFactory(const ParameterTree¶ms = ParameterTree());
>
> /** \brief Constructor for a given grid object
>
>
> Modified: trunk/dune/grid/uggrid/uggridfactory.cc
> ===================================================================
> --- trunk/dune/grid/uggrid/uggridfactory.cc 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/uggrid/uggridfactory.cc 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -3,6 +3,8 @@
>
> #include<config.h>
>
> +#include<dune/common/parametertree.hh>
> +
> #include<dune/grid/uggrid/uggridfactory.hh>
> #include "boundaryextractor.hh"
>
> @@ -66,7 +68,7 @@
>
> template<int dimworld>
> Dune::GridFactory<Dune::UGGrid<dimworld> >::
> -GridFactory()
> +GridFactory(const ParameterTree¶ms)
> {
> grid_ = new Dune::UGGrid<dimworld>;
>
>
> Modified: trunk/dune/grid/uggrid/uggridfactory.hh
> ===================================================================
> --- trunk/dune/grid/uggrid/uggridfactory.hh 2010-11-02 17:06:16 UTC (rev 7062)
> +++ trunk/dune/grid/uggrid/uggridfactory.hh 2010-11-02 17:06:20 UTC (rev 7063)
> @@ -12,6 +12,7 @@
> #include<vector>
>
> #include<dune/common/fvector.hh>
> +#include<dune/common/parametertree.hh>
>
> #include<dune/grid/common/boundarysegment.hh>
> #include<dune/grid/common/gridfactory.hh>
> @@ -159,8 +160,12 @@
>
> public:
>
> - /** \brief Default constructor */
> - GridFactory();
> + /** \brief Default constructor, optionally with grid-specific options
> + *
> + * \note There are no grid-specific options for UG at the moment, so
> + * any parameters specified have no effect.
> + */
> + explicit GridFactory(const ParameterTree¶ms = ParameterTree());
>
> /** \brief Constructor for a given grid object
>
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>
--
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75348 *
* Institut für Mathematik ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list