Thanks for the quick answer! My problem is the scalar wave equation and the boundary conditions are simple homogeneous Dirichlet. Before starting with hp I was successfully using ZeroFunction<dim>(). How would this "*map taking a types::boundary_id and a Function object*" look like? Any step in the tutorial showing this?
Thanks, El lunes, 23 de octubre de 2017, 15:08:27 (UTC-5), Daniel Arndt escribió: > > Juan > > [...] >> >> static std::map<types::global_dof_index, double> bval; >> VectorTools::interpolate_boundary_values (mapping_collection, >> dof_handler, ZeroFunction<dim>(), bval); >> >> and I get the following error: >> >> [100%] Building CXX object CMakeFiles/pFEM.dir/pFEM.cc.o >> /home/ju4nk4/jc/codes/adaptivity/disk_pFEM/pFEM.cc: In instantiation of >> ‘void Adaptive::LaplaceProblem<dim>::setup_system() [with int dim = 2]’: >> /home/ju4nk4/jc/codes/adaptivity/disk_pFEM/pFEM.cc:377:23: required >> from ‘void Adaptive::LaplaceProblem<dim>::run() [with int dim = 2]’ >> /home/ju4nk4/jc/codes/adaptivity/disk_pFEM/pFEM.cc:418:28: required >> from here >> /home/ju4nk4/jc/codes/adaptivity/disk_pFEM/pFEM.cc:205:51: error: no >> matching function for call to >> ‘interpolate_boundary_values(dealii::hp::MappingCollection<2, 2>&, >> dealii::hp::DoFHandler<2, 2>&, dealii::ZeroFunction<2, double>, >> std::map<unsigned int, double>&)’ >> bval); >> ^ >> /home/ju4nk4/jc/codes/adaptivity/disk_pFEM/pFEM.cc:205:51: note: >> candidates are: ... >> > The compiler is your friend here. If you look at the possible candidates, > it tells why each of them could not be used. > > In particular, the signature for the function you are looking for is > > VectorTools::interpolate_boundary_values > (const hp::MappingCollection< dim, spacedim > & > mapping, > const hp::DoFHandler< dim, spacedim > & > dof, > const std::map< types::boundary_id, const Function< spacedim, number > * > > & function_map, > std::map< types::global_dof_index, number > & > boundary_values, > const ComponentMask & > component_mask = ComponentMask()) > > and the third parameter is a not a Function, but a map taking a > types::boundary_id and a Function object. > > 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.
