May the same bug exist for the complex arithmetic case? When using the PETSc wrappers as in step-36 (installed with PetscScalar = complex<double>) and using MappingCollection as discussed before. I now try:
//static std::map<types::global_dof_index, double> bval; static std::map<types::global_dof_index, PetscScalar> bval; ZeroFunction<dim> homogeneous_dirichlet_bc; const typename FunctionMap<dim>::type dirichlet_boundary_functions = { { types::boundary_id(0), &homogeneous_dirichlet_bc } }; VectorTools::interpolate_boundary_values (mapping_collection, dof_handler, dirichlet_boundary_functions,//typename FunctionMap<dim>::type(), bval); and obtain the errors I leave at the end. The most relevant line is: numerics/vector_tools.h:1006:3: note: template argument deduction/substitution failed: pFEM.cc:374:51: note: deduced conflicting types for parameter ‘number’ (‘double’ and ‘std::complex<double>’) bval); ^ Errors: in attached file. Any ideas? Thanks in advance. El domingo, 12 de noviembre de 2017, 18:32:00 (UTC-5), Wolfgang Bangerth escribió: > > On 11/10/2017 08:15 AM, Juan Carlos Araujo Cabarcas wrote: > > Yes, it explains the Function map better, and also thanks for the > pointer to > > step-16. Unfortunately, I still cannot get it to run =( ... By looking > at > > step-35, I got the line: > > | > > staticstd::map<types::global_dof_index,double>bval; > > | > > > > With this, I now write: > > | > > ZeroFunction<dim>homogeneous_dirichlet_bc; > > > > consttypenameFunctionMap<dim>::type dirichlet_boundary_functions > > ={{types::boundary_id(0),&homogeneous_dirichlet_bc }}; > > > > staticstd::map<types::global_dof_index,double>bval; > > > > VectorTools::interpolate_boundary_values ( > > mapping_collection, > > dof_handler, > > dirichlet_boundary_functions,//typename > FunctionMap<dim>::type(), > > bval > > ); > > > > | > > > > From which I get the error (without any candidates): > > > > error: undefined reference to > > > > 'void dealii::VectorTools::interpolate_boundary_values<2, 2, double>( > > dealii::hp::MappingCollection<2, 2> const&, > > dealii::hp::DoFHandler<2, 2> const&, > > std::map< > > unsigned char, > > dealii::Function< > > 2, double> const*, > > std::less<unsigned char>, > > std::allocator<std::pair<unsigned char const, > > dealii::Function<2, double> const*> > > > > const&, > > std::map< > > unsigned int, > > double, > > std::less<unsigned int>, > > std::allocator<std::pair<unsigned int const, double> > >&, > > dealii::ComponentMask const& > > )' > > Yes, that's a bug. The fix is here: > https://github.com/dealii/dealii/pull/5448 > Thanks for reporting this! > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: bang...@colostate.edu > <javascript:> > www: http://www.math.colostate.edu/~bangerth/ > > -- 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.
/home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc: In instantiation of ‘void Adaptive::LaplaceProblem<dim>::assemble_system() [with int dim = 2]’: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:559:26: required from ‘void Adaptive::LaplaceProblem<dim>::run() [with int dim = 2]’ /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:592:28: required from here /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: error: no matching function for call to ‘interpolate_boundary_values(dealii::hp::MappingCollection<2, 2>&, dealii::hp::DoFHandler<2, 2>&, const type&, std::map<unsigned int, std::complex<double> >&)’ bval); ^ /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: candidates are: In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:993:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const dealii::Mapping<dim, spacedim>&, const DoFHandlerType<dim, spacedim>&, const std::map<unsigned int, const dealii::Function<spacedim, number>*>&, std::map<unsigned int, number>&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:993:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: ‘dealii::hp::MappingCollection<2, 2>’ is not derived from ‘const dealii::Mapping<dim, spacedim>’ bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1006:3: note: template<int dim, int spacedim, class number> void dealii::VectorTools::interpolate_boundary_values(const dealii::hp::MappingCollection<dim, spacedim>&, const dealii::hp::DoFHandler<dim, spacedim>&, const std::map<unsigned int, const dealii::Function<spacedim, number>*>&, std::map<unsigned int, number>&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1006:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: deduced conflicting types for parameter ‘number’ (‘double’ and ‘std::complex<double>’) bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1025:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const dealii::Mapping<dim, spacedim>&, const DoFHandlerType<dim, spacedim>&, dealii::types::boundary_id, const dealii::Function<spacedim, number>&, std::map<unsigned int, number>&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1025:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: ‘dealii::hp::MappingCollection<2, 2>’ is not derived from ‘const dealii::Mapping<dim, spacedim>’ bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1045:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const DoFHandlerType<dim, spacedim>&, dealii::types::boundary_id, const dealii::Function<spacedim, number>&, std::map<unsigned int, number>&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1045:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: cannot convert ‘((Adaptive::LaplaceProblem<2>*)this)->Adaptive::LaplaceProblem<2>::dof_handler’ (type ‘dealii::hp::DoFHandler<2, 2>’) to type ‘dealii::types::boundary_id {aka unsigned int}’ bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1062:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const DoFHandlerType<dim, spacedim>&, const std::map<unsigned int, const dealii::Function<spacedim, number>*>&, std::map<unsigned int, number>&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1062:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: ‘dealii::hp::DoFHandler<2, 2>’ is not derived from ‘const std::map<unsigned int, const dealii::Function<spacedim, number>*>’ bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1133:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const dealii::Mapping<dim, spacedim>&, const DoFHandlerType<dim, spacedim>&, const std::map<unsigned int, const dealii::Function<spacedim, number>*>&, dealii::ConstraintMatrix&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1133:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: ‘dealii::hp::MappingCollection<2, 2>’ is not derived from ‘const dealii::Mapping<dim, spacedim>’ bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1154:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const dealii::Mapping<dim, spacedim>&, const DoFHandlerType<dim, spacedim>&, dealii::types::boundary_id, const dealii::Function<spacedim, number>&, dealii::ConstraintMatrix&, const dealii::ComponentMask&) interpolate_boundary_values ^ /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1154:3: note: template argument deduction/substitution failed: /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:370:51: note: ‘dealii::hp::MappingCollection<2, 2>’ is not derived from ‘const dealii::Mapping<dim, spacedim>’ bval); ^ In file included from /home/ju4nk4/jc/codes/adaptivity/petsc_eigs/pFEM.cc:61:0: /home/ju4nk4/Soft/dealii/include/deal.II/numerics/vector_tools.h:1176:3: note: template<int dim, int spacedim, template<int <anonymous>, int <anonymous> > class DoFHandlerType, class number> void dealii::VectorTools::interpolate_boundary_values(const DoFHandlerType<dim, spacedim>&, dealii::types::boundary_id, const dealii::Function<spacedim, number>&, dealii::ConstraintMatrix&, const dealii::ComponentMask&) interpolate_boundary_values ^