Hi Timo,

> I hope to make integrate_difference() nicer to use over the next weeks
> > (so that you don't need to do a sum by hand over the own cells).
> > Another topic for the deal.ii workshop!

I have implemented a version in case of Trilinos::MPI::Vectors
a few weeks ago; for me it was impossible to integrate it into
the library, because this would cause a code-doubling.
My integrate_diffenrence function works from the interface exacly
as the one for the deal-Vector's.
I will be in Heidelberg too, so it would be nice to have some 
code jamming about this function...

Best
  Uwe

On Sat, 2012-07-21 at 14:24 -0500, Timo Heister wrote:
> my file was too large for this list, so here is the .cc zipped.
> 
> On Sat, Jul 21, 2012 at 2:19 PM, Timo Heister <[email protected]> wrote:
> > Hi Daniel,
> >
> > in short: it is a bit difficult right now. But I attached a version of
> > step-40, that does what you want. Obviously I had to change the
> > problem to a right hand side where I have the analytic solution. The
> > main part of the code is:
> >
> >     Vector<double> cellwise_errors (triangulation.n_active_cells());
> >
> >     VectorTools::integrate_difference (dof_handler,
> >                                        locally_relevant_solution,
> >                                        Coefficient<dim>(),
> >                                        cellwise_errors,
> >                                        quadr,
> >                                        VectorTools::L2_norm);
> >
> >     unsigned int index = 0;
> >     double my_value = 0;
> >     typename DoFHandler<dim>::active_cell_iterator
> >       cell = dof_handler.begin_active(),
> >       endc = dof_handler.end();
> >     for (; cell!=endc; ++cell, ++index)
> >       if (cell->is_locally_owned())
> >           my_value += cellwise_errors(index)*cellwise_errors(index);
> >
> >     double err= std::sqrt(Utilities::MPI::sum(my_value, MPI_COMM_WORLD));
> >     pcout << "    L2 error: " << err << std::endl;
> >
> > I hope to make integrate_difference() nicer to use over the next weeks
> > (so that you don't need to do a sum by hand over the own cells).
> > Another topic for the deal.ii workshop!
> >
> > Timo
> >
> > On Tue, Jul 17, 2012 at 4:42 PM, Daniel Brauss <[email protected]> wrote:
> >> Hi all,
> >>
> >> I was wondering if it is possible to compute the error say given an exact
> >> solution
> >> for a parallel problem like step 40.  Is it possible to use the
> >> VectorTools::integrate_difference.
> >> It seems like there could be a problem specifying the solution vector to
> >> pass in, given the
> >> locally_relevant_solution includes ghost cells.
> >>
> >> Dan
> >>
> >> _______________________________________________
> >> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
> >>
> >
> >
> >
> > --
> > Timo Heister
> > http://www.math.tamu.edu/~heister/
> 
> 
> 
> _______________________________________________
> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

-- 
Dipl.-Ing. Uwe Köcher

Helmut Schmidt Universität
Universität der Bundeswehr

Fakultät für Maschinenbau,
Professur für Numerische Verfahren in den Rechnergestützten
Ingenieurwissenschaften.

Holstenhofweg 85
22043 Hamburg

Tel:   +49 40 6541 - 3540 (vorübergehend)
Raum:  H1 - R.1103 (vorübergehend)
Email: [email protected]
Web:   http://www.hsu-hh.de/mb-mathe

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to