mapping_collection and step-27

113 views
Skip to first unread message

Juan Carlos Araujo Cabarcas

unread,
Oct 23, 2017, 3:08:32 PM10/23/17
to deal.II User Group
Dear all,

I would like to reproduce step-27 for a curved domain instead of the given domain.
For this, I would like to make use of a MappingCollection.

I am having problems using interpolate_boundary_values, suggested in:
https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceVectorTools.html#a074cd2642b4abdfd67db2c672c907781

Basically I use the following:

    hp::DoFHandler<dim>              dof_handler;
    hp
::FECollection<dim>            fe_collection;
    hp
::MappingCollection<dim>    mapping_collection;
    hp
::QCollection<dim>             quadrature_collection;
    hp
::QCollection<dim-1>           face_quadrature_collection;



and initialize them as step-27. Then I try:

 
   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: ...

I digged into the documentation for a while before emailing, but found that MappingCollection is not really discussed much, and the documentation for the call VectorTools::interpolate_boundary_values for MappingCollection just says:

    "Like the previous function, but take a mapping collection to go with the hp::DoFHandler object." ...

So, there is no special comments there either.

Any guidance would be very much appreciated!

Juan Carlos Araújo,
Umeå Universitet

Timo Heister

unread,
Oct 23, 2017, 4:05:22 PM10/23/17
to dea...@googlegroups.com
Juan,

there is only one version of interpolate_boundary_values with
MappingCollection and it requires the third argument to be a std::map
instead of a single function. Might this be the error message you are
getting?



On Mon, Oct 23, 2017 at 3:08 PM, Juan Carlos Araujo Cabarcas
<ju4...@gmail.com> wrote:
> Dear all,
>
> I would like to reproduce step-27 for a curved domain instead of the given
> domain.
> For this, I would like to make use of a MappingCollection.
>
> I am having problems using interpolate_boundary_values, suggested in:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.dealii.org_8.5.0_doxygen_deal.II_namespaceVectorTools.html-23a074cd2642b4abdfd67db2c672c907781&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=fihUVnHITudx1-QiLflMesQwzeMCPVGgq0F43ypZXuA&s=iIq-guuMpLah1h-ZYYye3aQlj38WM97naY4xypYoMNE&e=
> --
> The deal.II project is located at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=fihUVnHITudx1-QiLflMesQwzeMCPVGgq0F43ypZXuA&s=C31j2rSYQmCzApV6GxSyGz66HUu92woOqXucqP7EPzE&e=
> For mailing list/forum options, see
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=fihUVnHITudx1-QiLflMesQwzeMCPVGgq0F43ypZXuA&s=ULmYusoT6lwC3C5xIKagfHwyGsaQLFyM74fK2M9FprE&e=
> ---
> 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+un...@googlegroups.com.
> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=fihUVnHITudx1-QiLflMesQwzeMCPVGgq0F43ypZXuA&s=Z_Y-x97bv8USFu4txqGafmEvnLSRgO2kbjL2v68Ar4E&e= .



--
Timo Heister
http://www.math.clemson.edu/~heister/

Daniel Arndt

unread,
Oct 23, 2017, 4:08:27 PM10/23/17
to deal.II User Group
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

Juan Carlos Araujo Cabarcas

unread,
Oct 23, 2017, 10:25:53 PM10/23/17
to deal.II User Group
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,

Wolfgang Bangerth

unread,
Oct 24, 2017, 12:14:29 AM10/24/17
to dea...@googlegroups.com
On 10/23/2017 08:25 PM, Juan Carlos Araujo Cabarcas wrote:
> 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?

The documentation here

https://www.dealii.org/developer/doxygen/deal.II/namespaceVectorTools.html#a9f3e3ae1396811f998cc35f94cbaa926

states:

"The parameter function_map provides a list of boundary indicators to be
handled by this function and corresponding boundary value functions. The keys
of this map correspond to the number boundary_id of the face.
numbers::internal_face_boundary_id is an illegal value for this key since it
is reserved for interior faces."

Does that explain it? step-16 also seems to use this argument (with a map of
one element).

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Juan Carlos Araujo Cabarcas

unread,
Nov 10, 2017, 10:15:23 AM11/10/17
to deal.II User Group
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:

static std::map<types::global_dof_index, double> bval;

With this, I now write:
        ZeroFunction<dim> homogeneous_dirichlet_bc;
       
       
const typename FunctionMap<dim>::type dirichlet_boundary_functions
             
= { { types::boundary_id(0), &homogeneous_dirichlet_bc } };

                                                                                   
       
static std::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&
)'
   
collect2: error: ld returned 1 exit status
make[2]: *** [pFEM] Error 1
make[1]: *** [CMakeFiles/pFEM.dir/all] Error 2

I am a bit lost here, any ideas? Comments are greatly appreciated!
Thanks in advance,
Juan Carlos Araújo

Juan Carlos Araujo Cabarcas

unread,
Nov 11, 2017, 4:34:47 PM11/11/17
to deal.II User Group
Moreover, if I use the equivalent call without mapping_collection:

        VectorTools::interpolate_boundary_values (

              dof_handler
,
              dirichlet_boundary_functions
,//typename FunctionMap<dim>::type(),
              bval
       
);

There is no compilation error and the code runs, however without the effect of the mapping.
So
dof_handler, dirichlet_boundary_functions, and bval are passed correctly and it seems to me that the problem is in the definition of
VectorTools::interpolate_boundary_values with mapping_collection as an argument.

Could this be the case? Any thoughts?


Additionally, I also noticed that:
   data_out.build_patches (mapping_collection, 4, DataOut<dim>::curved_inner_cells);
is not implemented, what could be the proper way of producing .vtk files with curved inner cells?

thanks in advance, any comments are greatly appreciated,
Juan Carlos Araújo

Wolfgang Bangerth

unread,
Nov 12, 2017, 6:05:02 PM11/12/17
to dea...@googlegroups.com
On 11/11/2017 02:34 PM, Juan Carlos Araujo Cabarcas wrote:
>
> Additionally, I also noticed that:
> data_out.build_patches (mapping_collection, 4,
> DataOut<dim>::curved_inner_cells);
> is not implemented, what could be the proper way of producing .vtk files with
> curved inner cells

That's a separate issue -- please use a different forum thread for separate
things in the future. But for now, when you say it is "not implemented", what
exactly happens? Try being specific when reporting problems, for example by
including the error messages you get.

Wolfgang Bangerth

unread,
Nov 12, 2017, 6:32:00 PM11/12/17
to dea...@googlegroups.com
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;
Yes, that's a bug. The fix is here:
https://github.com/dealii/dealii/pull/5448
Thanks for reporting this!

Juan Carlos Araujo Cabarcas

unread,
Nov 17, 2017, 2:29:27 PM11/17/17
to deal.II User Group
I confirm that the bug is fixed! Thanks a lot.

Juan Carlos Araujo Cabarcas

unread,
Nov 30, 2017, 5:05:43 PM11/30/17
to deal.II User Group
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ó:
errors.txt

Wolfgang Bangerth

unread,
Dec 1, 2017, 8:09:26 AM12/1/17
to dea...@googlegroups.com
On 11/30/2017 03:05 PM, Juan Carlos Araujo Cabarcas wrote:
>
> 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;
> staticstd::map<types::global_dof_index,PetscScalar>bval;

This is unrelated to the error, but why do you make this variable `static`?

> ZeroFunction<dim> homogeneous_dirichlet_bc;
>
> consttypenameFunctionMap<dim>::type dirichlet_boundary_functions
> ={{types::boundary_id(0),&homogeneous_dirichlet_bc }};

If you use a map for `bval` that has complex-valued keys, then you also need
to use a FunctionMap<dim,PetscScalar>::type object here so that the boundary
functions are complex-valued as well.

In other words, the scalar type of the function object and of the boundary
values must match.
Message has been deleted
Message has been deleted

Bruno Turcksin

unread,
Dec 1, 2017, 3:06:29 PM12/1/17
to deal.II User Group

On Friday, December 1, 2017 at 1:47:44 PM UTC-5, 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.

You have attached a file but it only contains an e-mail address.

Best,

Bruno

Juan Carlos Araujo Cabarcas

unread,
Dec 1, 2017, 3:29:20 PM12/1/17
to deal.II User Group
Apologies for the last email ...

Thanks W. for your quick reply.

I used static because it was used in one of the dealii steps. As there is no need for it, in the following it is removed.

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.
errors.txt

Wolfgang Bangerth

unread,
Dec 1, 2017, 3:49:48 PM12/1/17
to dea...@googlegroups.com
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.

Juan Carlos Araujo Cabarcas

unread,
Dec 1, 2017, 10:36:34 PM12/1/17
to deal.II User Group
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

Wolfgang Bangerth

unread,
Dec 4, 2017, 1:09:28 PM12/4/17
to dea...@googlegroups.com
On 12/01/2017 08:36 PM, Juan Carlos Araujo Cabarcas wrote:
>
> 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&)'

Now that the compiler is happy with your code, this is the first real
bug -- we don't instantiate this function. The patch is here:
https://github.com/dealii/dealii/pull/5579

I appreciate you trying all of these things with complex-valued vectors.
It's hard to find all of the relevant places that need to be changed and
fixed. Keep these issues coming!

Juan Carlos Araujo Cabarcas

unread,
Dec 5, 2017, 7:47:52 PM12/5/17
to deal.II User Group
Thanks for your email and the encouragement, I will keep these reporting issues for sure!
This thread was a nice lecture on templates!

On my topic, I have done as usual:
    git clone https://github.com/dealii/dealii.git dealii
and proceeded with the configuration/installation of the library, to notice that I still have an error:

Linking CXX executable pFEM
/mypatch/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

As if nothing had changed. So I have a few questions:
1) Is it the same error?
3) If 2) is false, I would like to kindly ask how to apply the patch. I tried a few things I got from a GIT tutorial but seemed not to work.

Thanks in advance,
Juan Carlos Araújo, Umeå Universitet

Wolfgang Bangerth

unread,
Dec 5, 2017, 11:47:22 PM12/5/17
to dea...@googlegroups.com
On 12/05/2017 05:47 PM, Juan Carlos Araujo Cabarcas wrote:
>
> On my topic, I have done as usual:
> git clone https://github.com/dealii/dealii.git dealii
> and proceeded with the configuration/installation of the library, to notice
> that I still have an error:

When did you clone the repository? The patch was merged earlier today. You can
find out if you do
git log
and look at which patches were merged most recently. Does #5579 show up?

It's of course also possible that I fixed one issue but not all.

Juan Carlos Araujo Cabarcas

unread,
Dec 6, 2017, 5:14:49 PM12/6/17
to deal.II User Group
Hi, when I do
    git log
the #5579 does show up.

Merge: fd97710 cceeb7c
Author: Wolfgang Bangerth <bangerth@**.**>
Date:   Tue Dec 5 07:24:15 2017 -0700

    Merge pull request #5579 from bangerth/more-complex-instantiations
   
    More complex instantiations


However, after configuration, installation and compilation of my code I obtain the error:

Scanning dependencies of target pFEM

[100%] Building CXX object CMakeFiles/pFEM.dir/pFEM.cc.o
Linking CXX executable pFEM
/mypath/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

Thanks in advance,
Juan Carlos Araújo


Wolfgang Bangerth

unread,
Dec 8, 2017, 1:07:28 PM12/8/17
to dea...@googlegroups.com

> Merge: fd97710 cceeb7c
> Author: Wolfgang Bangerth <bangerth@**.**>
> Date:   Tue Dec 5 07:24:15 2017 -0700
>
>     Merge pull request #5579 from bangerth/more-complex-instantiations
>
>     More complex instantiations
>
>
> However, after configuration, installation and compilation of my code I
> obtain the error:
>
> Scanning dependencies of target pFEM
> [100%] Building CXX object CMakeFiles/pFEM.dir/pFEM.cc.o
> Linking CXX executable pFEM
> /mypath/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&)'

Yes, I apparently forgot to instantiate this one function as well. Patch
is here:
https://github.com/dealii/dealii/pull/5602
It was just merged.

Juan Carlos Araujo Cabarcas

unread,
Dec 8, 2017, 6:48:04 PM12/8/17
to deal.II User Group
Thanks again,

Now it passes the interpolate_boundary_values call. However, it is conflicting now with:

      MatrixTools::apply_boundary_values (bval,
                                                                                    system_matrix
,
                                                                                    solution
,
                                                                                    system_rhs
);

To be precise I write the output below.

Thanks in advance,
Juan Carlos Araújo, Umeå University


--------------------------------------------------------
An error occurred in line <70> of file </mypath/Soft/dealii/source/numerics/matrix_tools_once.cc> in function
    void dealii::MatrixTools::apply_boundary_values(const std::map<unsigned int, std::complex<double> >&, dealii::PETScWrappers::MatrixBase&, dealii::PETScWrappers::VectorBase&, dealii::PETScWrappers::VectorBase&, bool)
The violated condition was:
    eliminate_columns == false
Additional information:
    You are trying to use functionality in deal.II that is currently not implemented. In many cases, this indicates that there simply didn't appear much of a need for it, or that the author of the original code did not have the time to implement a particular case. If you hit this exception, it is therefore worth the time to look into the code to find out whether you may be able to implement the missing functionality. If you do, please consider providing a patch to the deal.II development sources (see the deal.II website on how to contribute).

Stacktrace:
-----------
#0  /mypath/Soft/dealii/lib/libdeal_II.g.so.9.0.0-pre: dealii::MatrixTools::apply_boundary_values(std::map<unsigned int, std::complex<double>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::complex<double> > > > const&, dealii::PETScWrappers::MatrixBase&, dealii::PETScWrappers::VectorBase&, dealii::PETScWrappers::VectorBase&, bool)
#1  ./pFEM: Adaptive::LaplaceProblem<2>::assemble_system()
#2  ./pFEM: Adaptive::LaplaceProblem<2>::run()
#3  ./pFEM: main
--------------------------------------------------------

[jc-umit:02419] *** Process received signal ***
[jc-umit:02419] Signal: Aborted (6)
[jc-umit:02419] Signal code:  (-6)
[jc-umit:02419] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36cb0) [0x7f80d19efcb0]
[jc-umit:02419] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f80d19efc37]
[jc-umit:02419] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x148) [0x7f80d19f3028]
[jc-umit:02419] [ 3] /mypath/Soft/dealii/lib/libdeal_II.g.so.9.0.0-pre(+0x8047862) [0x7f80da96e862]
[jc-umit:02419] [ 4] /mypath/Soft/dealii/lib/libdeal_II.g.so.9.0.0-pre(_ZN6dealii18deal_II_exceptions9internals5abortERKNS_13ExceptionBaseE+0x1a) [0x7f80da96fe81]
[jc-umit:02419] [ 5] /mypath/Soft/dealii/lib/libdeal_II.g.so.9.0.0-pre(_ZN6dealii18deal_II_exceptions9internals11issue_errorINS_18StandardExceptions17ExcNotImplementedEEEvNS1_17ExceptionHandlingEPKciS7_S7_S7_T_+0x4e) [0x7f80d5454e7e]
[jc-umit:02419] [ 6] /mypath/Soft/dealii/lib/libdeal_II.g.so.9.0.0-pre(_ZN6dealii11MatrixTools21apply_boundary_valuesERKSt3mapIjSt7complexIdESt4lessIjESaISt4pairIKjS3_EEERNS_13PETScWrappers10MatrixBaseERNSD_10VectorBaseESH_b+0xc2) [0x7f80d54cedf6]
[jc-umit:02419] [ 7] ./pFEM(_ZN8Adaptive14LaplaceProblemILi2EE15assemble_systemEv+0xb47) [0x43a137]
[jc-umit:02419] [ 8] ./pFEM(_ZN8Adaptive14LaplaceProblemILi2EE3runEv+0x126) [0x43ce44]
[jc-umit:02419] [ 9] ./pFEM(main+0xdf) [0x427610]
[jc-umit:02419] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f80d19daf45]
[jc-umit:02419] [11] ./pFEM() [0x427419]
[jc-umit:02419] *** End of error message ***
Aborted (core dumped)

Daniel Arndt

unread,
Dec 9, 2017, 8:42:38 AM12/9/17
to deal.II User Group
Juan,

take a look at the documentation of that function. It tells you that the last parameter needs to be "false", i.e.
this function is only implemented for the case in which you don't eliminate the columns corresponding to boundary DoFs.

Best,
Daniel

Juan Carlos Araujo Cabarcas

unread,
Dec 9, 2017, 6:32:44 PM12/9/17
to deal.II User Group
Ahh I see. Thanks to all of you for all the help and support on this thread!
Reply all
Reply to author
Forward
0 new messages