Roland,

Using PETSc with complex values is pretty niche and there isn't much CI in
place for this case.
It looks like

  boost::serialization::array_wrapper<const double> wrapper(

should be replaced with

  boost::serialization::array_wrapper<const PetscScalar> wrapper(

and similarly in VectorBase::load.

Best,
Daniel

On Sat, Oct 14, 2023 at 1:01 PM 'develo...@googlemail.com' via deal.II User
Group <dealii@googlegroups.com> wrote:

> Hei,
> I'm currently trying to compile deal.II on my local machine, but encounter
> the following compilation error:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *[  0%] Built target expand_instantiations_exe[  0%] Built target
> doxygen_headers[  0%] Built target object_arborx_inst[  0%] Built target
> object_arborx_debug[  4%] Built target object_numerics_instConsolidate
> compiler generated dependencies of target object_numerics_debug[  4%]
> Building CXX object
> source/numerics/CMakeFiles/object_numerics_debug.dir/unity_0.cc.oIn file
> included from
> /home/user/Downloads/git-files/dealii/build/source/numerics/unity_0.cc:5:In
> file included from
> /home/user/Downloads/git-files/dealii/source/numerics/data_out.cc:16:In
> file included from
> /home/user/Downloads/git-files/dealii/include/deal.II/base/work_stream.h:20:In
> file included from
> /home/user/Downloads/git-files/dealii/build/include/deal.II/base/config.h:584:/home/user/Downloads/git-files/dealii/include/deal.II/base/numbers.h:533:12:
> warning: explicit comparison with NaN in fast floating point mode
> [-Wtautological-constant-compare]    return std::isnan(x);
>  ^~~~~~~~~~~~~In file included from
> /home/user/Downloads/git-files/dealii/build/source/numerics/unity_0.cc:10:In
> file included from
> /home/user/Downloads/git-files/dealii/source/numerics/dof_output_operator.cc:23:In
> file included from
> /home/user/Downloads/git-files/dealii/include/deal.II/lac/petsc_block_vector.h:27:In
> file included from
> /home/user/Downloads/git-files/dealii/include/deal.II/lac/petsc_vector.h:29:/home/user/Downloads/git-files/dealii/include/deal.II/lac/petsc_vector_base.h:1324:55:
> error: no matching constructor for initialization of
> 'boost::serialization::array_wrapper<const double>'
> boost::serialization::array_wrapper<const double> wrapper(
>
> ^/media/storage/local_opt/boost/include/boost/serialization/array_wrapper.hpp:46:5:
> note: candidate constructor not viable: no known conversion from 'const
> PetscScalar *' (aka 'const complex<double> *') to 'const double *' for 1st
> argument    array_wrapper(T * t, std::size_t s) :
> ^/media/storage/local_opt/boost/include/boost/serialization/array_wrapper.hpp:41:5:
> note: candidate constructor not viable: requires single argument 'rhs', but
> 2 arguments were provided    array_wrapper(const array_wrapper & rhs) :
> ^In file included from
> /home/user/Downloads/git-files/dealii/build/source/numerics/unity_0.cc:10:In
> file included from
> /home/user/Downloads/git-files/dealii/source/numerics/dof_output_operator.cc:23:In
> file included from
> /home/user/Downloads/git-files/dealii/include/deal.II/lac/petsc_block_vector.h:27:In
> file included from
> /home/user/Downloads/git-files/dealii/include/deal.II/lac/petsc_vector.h:29:/home/user/Downloads/git-files/dealii/include/deal.II/lac/petsc_vector_base.h:1363:49:
> error: no matching constructor for initialization of
> 'boost::serialization::array_wrapper<double>'
> boost::serialization::array_wrapper<double> velocity_wrapper(
>
> ^/media/storage/local_opt/boost/include/boost/serialization/array_wrapper.hpp:46:5:
> note: candidate constructor not viable: no known conversion from
> 'PetscScalar *' (aka 'complex<double> *') to 'double *' for 1st argument
> array_wrapper(T * t, std::size_t s) :
> ^/media/storage/local_opt/boost/include/boost/serialization/array_wrapper.hpp:41:5:
> note: candidate constructor not viable: requires single argument 'rhs', but
> 2 arguments were provided    array_wrapper(const array_wrapper & rhs) :
> ^1 warning and 2 errors generated.make[2]: ***
> [source/numerics/CMakeFiles/object_numerics_debug.dir/build.make:76:
> source/numerics/CMakeFiles/object_numerics_debug.dir/unity_0.cc.o] Error
> 1make[1]: *** [CMakeFiles/Makefile2:1805:
> source/numerics/CMakeFiles/object_numerics_debug.dir/all] Error 2make: ***
> [Makefile:136: all] Error 2*
>
> PETSc was configured to use complex values. The same for deal.II, but I
> still get that error. CMakeCache is attached, but how can I fix that
> problem?
> Thanks!
> Regards,
> Roland Richter
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/ddde2d6a-3423-4d56-88ff-dfe7473236e1n%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/ddde2d6a-3423-4d56-88ff-dfe7473236e1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWb%2BNs-tcTTGO-K_CLeTH2YtmFO%3DSm-EdBuVs%2BayEttwquA%40mail.gmail.com.

Reply via email to