Hello Phillip,

SolutionTransfer can only be used, if between the two grids between which the solution shall be transfered only h-refinement/coarsening took place. If you do hp-refinement between the two grids, you have to code your own interpolation function to transfer the solution from one grid to the other.

To get a more detailled answer on your problem could you please upload the part of your code, where you use SolutionTransfer, such that we can see, which causes the problem in your case?

Best Regards,
Markus



Am 26.06.10 19:27, schrieb Phillip Schmitz:
Hi,

I'm trying to use the SolutionTransfer approach when h-refine/coarsening
in an h-p setting but I seem to run into problems when coarsening.

SolutionTransfer.prepare_for_coasening_and_refinement encounters an
error

--------------------------------------------------------
An error occurred in line <88> of file <source/dofs/dof_accessor.cc> in function void dealii::DoFCellAccessor<DH>::get_interpolated_dof_values(const InputVector&, dealii::Vector<number3>&) const [with InputVector = dealii::Vector<double>, number = double, DH = dealii::hp::DoFHandler<2, 2>]
The violated condition was:
    interpolated_values.size() == dofs_per_cell
The name and call sequence of the exception was:
    typename BaseClass::ExcVectorDoesNotMatch()
Additional Information: (none)

Stacktrace:
-----------
#0 deal.II/lib/libdeal_II_2d.g.so: void dealii::DoFCellAccessor<dealii::hp::DoFHandler<2, 2> >::get_interpolated_dof_values<dealii::Vector<double>, double>(dealii::Vector<double> const&, dealii::Vector<double>&) const #1 deal.II/lib/libdeal_II_2d.g.so: void dealii::DoFCellAccessor<dealii::hp::DoFHandler<2, 2> >::get_interpolated_dof_values<dealii::Vector<double>, double>(dealii::Vector<double> const&, dealii::Vector<double>&) const #2 deal.II/lib/libdeal_II_2d.g.so: dealii::SolutionTransfer<2, dealii::Vector<double>, dealii::hp::DoFHandler<2, 2> >::prepare_for_coarsening_and_refinement(std::vector<dealii::Vector<double>, std::allocator<dealii::Vector<double> > > const&)
--------------------------------------------------------

It seems to me that the problem is differing FiniteElement choices (i.e.
different active FE index ) between children and parent which
SolutionTransfer doesn't expect. Do all siblings need to be set to the
same FE index first? Does the (currently inactive) parent that will
receive the interpolated values need to be set to that same index?

What is the easiest way to get from one cell (obtained say via an
iterator) to its siblings or parent?

Or does one have to iterate through all the cells looking for those with
all their children's coarsen flags set (i.e. cells which will be
reactivated on coarsening) and reconcile the various FE indices somehow?

Thanks,
Phillip

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

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

Reply via email to