[Dune] Parallel grid partitioning

Steffen Müthing steffen.muething at ipvs.uni-stuttgart.de
Wed Oct 12 15:50:25 CEST 2011


Hello Eike,

Am 11.10.2011 um 18:17 schrieb Eike Mueller:

> Dear Dune-list,
> 
> I wonder if someone could help me with these questions about partitioning my grids in parallel runs.
> 
> The first is about a unit cube realised with YaspGrid. If I let Dune do the partitioning and run on 8 cores, it will split all three space dimensions into two, so I end up with 8 small cubes, each with half the sidelength of the initial cube. However, I want it to keep vertical columns together, so when using eight cores the x-direction should be split into four bits and the y dimension into two bits and the z-direction should be completely unsplit. The constructor of YaspGrid seems to take a load balancer as an argument but I could not find any more information on this in the documentation. Do I have to write my own loadbalancer and what class would I have to derive it from?

I am not really an expert on YaspGrid, but as far as I know, you have to write your own loadbalancer, which has to be
derived from the class YLoadBalance (defined in dune/grid/yaspgrid/grids.hh:1021). Something like the following class
should do the trick:

template<int d>
class LoadBalancer
  : public Dune::YLoadBalance<d>
{
public:
  typedef Dune::FieldVector<int, d>  iTupel;
  virtual void loadbalance (const iTupel& size, int P, iTupel& dims) const
  {
    dims = 1;
    dims[0] = P; // set this for the direction in which you want to stripe
  }
};

> 
> Second, I'm setting up a spherical shell with ALUGrid (see [1]). Again I want to keep vertical columns together and not split into the radial direction, so the sphere should be covered with eight patches of equal size.
> So far I only managed to get the serial ALUGridFactory to work, if I run in parallel, do I have to do the decomposition myself and call inserVertex() and insertElement() on the appropriate processor or can I do the balancing afterwards? Or do I have to insert all vertices/elements on the master node?

Sorry, can't help you there....

Steffen

> 
> Thank you very much for any ideas,
> 
> Eike
> 
> [1] http://people.bath.ac.uk/em459/dune.html
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

Steffen Müthing
Universität Stuttgart
Institut für Parallele und Verteilte Systeme
Universitätsstr. 38
70569 Stuttgart
Tel: +49 711 685 88429
Fax: +49 711 685 88340
Email: steffen.muething at ipvs.uni-stuttgart.de









More information about the Dune mailing list