Hi, Markus and Timo,
Thank you for your help. Timo's suggestion solves this problem. now
the program could run last for over
2000 steps and no sign to blow up.
Regards,
zhicheng
On Mon, Feb 20, 2012 at 8:10 AM, Timo Heister <
[email protected]> wrote:
> Hi,
>
> > I am trying to add mesh refinement to step-35, by using
> > KellyErrorEstimator, However, after several hundreds time
> > steps, I got following errors:
> > [..]
> > dof->first < n_dofs
>
> Looking at your code, this might be the problem:
> static std::map<unsigned int, double> bval;
> if (reinit_prec)
> VectorTools::interpolate_boundary_values (dof_handler_pressure, 3,
> ZeroFunction<dim>(), bval);
>
> you need to clear() bval in the if clause before calling
> interpolate_..., otherwise you are just adding new boundary values and
> an invalid with an index>n_dofs might appear.
>
> --
> Timo Heister
> http://www.math.tamu.edu/~heister/
>
--
Zhicheng Wang
Ph.D. Candidate
RM 402, No.11 Beisihuan West Road
Institute of Engineering Thermophysics, Chinese Academy of Sciences
Beijing, 100190, P.R. China
Tel: (86) 10-82543092
E-mail: [email protected]; [email protected]
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii