I'm wondering whether I've misunderstood how to use the FunctionMap declaration. I'm needing it to use for VectorTools::compute_nonzero_normal_flux_constraints
At the moment I am trying to apply nonzero normal component of the normal stress in step-22 on a boundary id that is 2 I have tried std::set<types::boundary_id> bottom_normal_flux_boundaries; bottom_normal_flux_boundaries.insert (2); typename FunctionMap<dim>::type bottom_normal_map; RockBottomValues<dim> bottom_nonzero_normal_stress; bottom_normal_map[0] = &bottom_nonzero_normal_stress; VectorTools::compute_nonzero_normal_flux_constraints (dof_handler, 0, bottom_normal_flux_boundaries, bottom_normal_map, constraints); with my nonzero function as template <int dim> class RockBottomValues : public Function<dim> { public: RockBottomValues () : Function<dim>(1) {} virtual double value (const Point<dim> &p, const unsigned int component = 0) const; }; template <int dim> double RockBottomValues<dim>::value (const Point<dim> &p, const unsigned int /*component*/) const { return -10.0+p[1]; } I'm not sure if I understand what I am doing when i write, bottom_normal_map[0] = &bottom_nonzero_normal_stress; I original had bottom_normal_map[2] = &bottom_nonzero_normal_stress; as i thought it was to do with the boundary indicator. The first gave me a segmentation fault error, something to do with memory i'm guessing, and the second gave me a dimension mismatch error, even though my normal component would just be a scalar value. I've read the documentation numerous times, and step-16 seems to be the only place where it is doing something similar, and I think I am getting confused with different boundary ids or generally not understanding FunctionMap properly. I'd appreciate if someone could point me into the right direction as to where i'm using something incorrectly. Many thanks for your help. -- 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 dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.