Jane,
> the error i was getting was: > > void dealii::VectorTools::interpolate(const Mapping<dim, spacedim> &, > const DoFHandlerType<dim, spacedim> &, const Function<spacedim, typename > VectorType::value_type> &, VectorType &, const dealii::ComponentMask &) > [dim = 2, spacedim = 2, VectorType = dealii::BlockVector<double>, > DoFHandlerType = DoFHandler] > > The violated condition was: > > dof_handler.get_fe().n_components() == function.n_components > > Additional information: > > Dimension 3 not equal to 2. > This indicates that you are trying to interpolate from a function that has only the dim components of the RT element. For using VectorTools::interpolate() you have to provide a function that has as many components as the FiniteElement you are using. Then, you can restrict the interpolation too specific components by using a ComponentMask. Still, I would be surprised if this works for FE_RaviartThomas in the end. I tried using project as well, VectorTools::project (dof_handler, > constraints, QGauss<dim>(3), > InitialFunction<dim>(), solution); > and I get the error message (I'm not sure what within the constraint > matrix I am not taking into account): > > void dealii::ConstraintMatrix::distribute(VectorType &) const > [VectorType = dealii::Vector<double>] > > The violated condition was: > > sorted==true > You need to make sure to call close() on the ConstraintMatrix before calling VectorTools::project(). Again make sure that number of components of the function you are providing matches the number of components in your FiniteElement. Best, Daniel -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
