Thanks again! that one was very logical ... silly me!
To review, now it looks like this:
std::map<types::global_dof_index, PetscScalar> bval;
ZeroFunction<dim,PetscScalar> homogeneous_dirichlet_bc;
const typename FunctionMap<dim,PetscScalar>::type
dirichlet_boundary_functions
= { { types::boundary_id(0), &homogeneous_dirichlet_bc } };
VectorTools::interpolate_boundary_values (mapping_collection,
dof_handler,
dirichlet_boundary_functions,
bval);
and gives the following error (no candidates this time):
path/petsc_eigs/pFEM.cc:370: error: undefined reference to 'void
dealii::VectorTools::interpolate_boundary_values<2, 2, std::complex<double>
>(dealii::hp::MappingCollection<2, 2> const&, dealii::hp::DoFHandler<2, 2>
const&, std::map<unsigned int, dealii::Function<2, std::complex<double> >
const*, std::less<unsigned int>, std::allocator<std::pair<unsigned int
const, dealii::Function<2, std::complex<double> > const*> > > const&,
std::map<unsigned int, std::complex<double>, std::less<unsigned int>,
std::allocator<std::pair<unsigned int const, std::complex<double> > > >&,
dealii::ComponentMask const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [pFEM] Error 1
make[1]: *** [CMakeFiles/pFEM.dir/all] Error 2
make: *** [all] Error 2
Any comments? thanks in advance,
Juan Araújo
El viernes, 1 de diciembre de 2017, 15:49:48 (UTC-5), Wolfgang Bangerth
escribió:
>
> On 12/01/2017 01:29 PM, Juan Carlos Araujo Cabarcas wrote:
> >
> > I must admit that I am a bit lost here. However, I tried your suggestion
> > and used: FunctionMap<dim,PetscScalar>::type, what gave the errors
> > that I attach in errors.txt.
> >
> > By looking at those errors, I also tried:
> > std::map<types::global_dof_index, const dealii::Function<dim,
> > std::complex<double> > > bval;
> > but it seems that this is not the root of the problem (I also attach
> > these errors at the end of the same file).
> >
> > Any ideas? Thanks in advance.
>
> Yes. You are now trying assign a `ZeroFunction<dim>` object's address to
> a FunctionMap<dim,PetscScalar>::type, but this wants the address of a
> complex-valued function. You need to use
> ZeroFunction<dim,PetscScalar>
> now to explain to the compiler that you want a function that returns a
> std::complex (==PetscScalar)-typed zero, rather than a real-valued one.
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> <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 [email protected].
For more options, visit https://groups.google.com/d/optout.