[dune-fem] Number of elements refined/coarsened

Claus-Justus Heine Claus-Justus.Heine at ians.uni-stuttgart.de
Thu Jun 20 23:41:57 CEST 2013


On 20.06.2013 23:25, Dedner, Andreas wrote:
> Do you really need to know how many elements where coarsend and how many added or only
> the net change - because for that you have size methods on the grid itself - for that I can give you a two line
> code :-)
> int oldSize = gridPart.grid().size(0).
> adaptManager.adapt();
> int newSize = gridPart.grid().size(0);
> int change = newSize - oldSize;

Nice. For completeness: these are the numbers for the current computing
node?,I would have to collect the element numbers by some construct like

size_t oldSize = gridPart.grid().size(0);
oldSize = gridPart.grid().comm().sum(oldSize);

and similar for newSize. And as this "recurses" to gridPart().grid(),
are these hierarchical elements, or just the leave-level? Not really
important For me, this is just a debugging aid. The actual number of
DOFs, elements and so on can be determined during data post-processing
in a "production environment". So to say.

Thanks for the Double Quote two-liner Double Quote.

Best,

Claus


> Best
> Andreas
> ________________________________________
> From: dune-fem-bounces+a.s.dedner=warwick.ac.uk at dune-project.org [dune-fem-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Claus-Justus Heine [Claus-Justus.Heine at ians.uni-stuttgart.de]
> Sent: 20 June 2013 22:14
> To: dune-fem at dune-project.org
> Subject: [dune-fem] Number of elements refined/coarsened
> 
> Again outing myself as a Dune green-horn. In ALBERTA there is some nice
> output (optional output) about the number of elements actually coarsened
> and refined during mesh adaptation. Rationale: this is different from
> the number of marked elements on conformal grids, which need to refine
> more elements to arrive at their conformal closure, and also the
> coarsening of elements will be abandoned if the conforming neighbor is
> not marked for coarsening as well. Has someone a "two-lines" code
> example of how to achieve this in Dune respectively Dune::Fem?
> 
> Thanks for any answer in advance.
> 
> Claus
> 
> 
> --
> Dr. Claus-Justus Heine
> Institut für Angewandte Analysis und Simulation
> * Numerische Mathematik für Höchstleistungsrechner
> Universität Stuttgart
> 
> Fon: +49 (0) 711 - 685 65558
> Fax: +49 (0) 711 - 685 65507
> 
> _______________________________________________
> dune-fem mailing list
> dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem
> 
> 
> _______________________________________________
> dune-fem mailing list
> dune-fem at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-fem
> 


-- 
Dr. Claus-Justus Heine
Institut für Angewandte Analysis und Simulation
* Numerische Mathematik für Höchstleistungsrechner
Universität Stuttgart

Fon: +49 (0) 711 - 685 65558
Fax: +49 (0) 711 - 685 65507




More information about the dune-fem mailing list