Re: [deal.II] calculation of the L2-norm using "integrate_difference" - mismatch with own test case

2021-05-14 Thread Wolfgang Bangerth



In the following is a snippet of my code, some remarks for a better 
understanding:
(I access my history variables via a CellDataStorage object. The Variable 
"comp_0" is the value at the QP of my current mesh, the variable "comp_0_ref" 
is the corresponding value of the reference solution on the same QP).


Functions::FEFieldFunction fe_field(dof_handler_scalar_ar, 
reference_solution_n[0]);


cell=dof_handler_scalar.begin_active();
for(; cell!=endc; cell++)
{
fe_values.reinit(cell);

std::vector>> lqph =  
quadrature_point_history.get_data(cell);


double error_cell=0;

  for(unsigned int q=0; q  Vector projection_variables = 
lqph[q]->create_vector_for_projection();

  double comp_0 = projection_variables(0);

  error_cell += ((comp_0 - comp_0_ref)*(comp_0 - comp_0_ref)*JxW);
  }
std::cout<<"Local cell error: "

Re: [deal.II] Regarding using Boost library functions with deal.II

Kishore,

In detailed.log you should be able see which version of Boost has been
picked up by deal.II. In your case you want to make sure that you are
not using the bundled version of Boost. The reason is that the bundled
Boost does not include all of Boost but only a subset of it.

Best,

Bruno

Le ven. 14 mai 2021 à 13:17, Kishore Nori  a écrit :
>
> I have isolated the error to minimum (not-) working example: The error occurs
> when Point and Boost functions are used at once in a dealii program.
> I have observed that in the Point class there is usage of some boost 
> functions,
> could it be that there is clash with that boost version and the below combing
> from the boost include file?
>
> usingBoostindealii.cc :
>
> #include 
> #include 
> #include 
> #include 
>
> #include 
>
> #include 
>
> #include 
> #include 
>
> #include 
> #include 
> #include 
>
> #include 
>
> using namespace dealii;
>
> int main()
> {
> Point<3> evalPoint(1.0, 2.0, 0.0);
> Point<3> evalPoint2(1.0, 1.0, 1.0);
> std::vector atomPos{0.0, 0.0, 0.0};
>
> std::cout << evalPoint.distance_square(evalPoint2) << '\n'; // comment this 
> to test the below too
> double sphericalHarmonicVal{};
> double r{}, theta{}, phi{};
>
> // std::vector relativeEvalPoint(3, 0.0);
> // // *** even with the below there is same error ***
> // for (int i = 0; i < 3; ++i)
> // {
> // relativeEvalPoint[i] = evalPoint(i) - atomPos[i];
> // // relativeEvalPoint[i] = evalPoint[i] - atomPos[i];
> // }
>
> sphericalHarmonicVal = boost::math::spherical_harmonic_i(0, 0, 0.0, 0.0);
>
> std::cout << sphericalHarmonicVal << '\n';
>
> return 0;
> }
>
> CMakeLists.txt :
>
> ##
> #  CMake script for the usingBoostindealii program:
> ##
>
> # Set the name of the project and target:
> SET(TARGET "usingBoostindealii")
>
> # Declare all source files the target consists of. Here, this is only
> # the one step-X.cc file, but as you expand your project you may wish
> # to add other source files as well. If your project becomes much larger,
> # you may want to either replace the following statement by something like
> #FILE(GLOB_RECURSE TARGET_SRC  "source/*.cc")
> #FILE(GLOB_RECURSE TARGET_INC  "include/*.h")
> #SET(TARGET_SRC ${TARGET_SRC}  ${TARGET_INC})
> # or switch altogether to the large project CMakeLists.txt file discussed
> # in the "CMake in user projects" page accessible from the "User info"
> # page of the documentation.
> SET(TARGET_SRC
>   ${TARGET}.cc
>   )
>
> # Usually, you will not need to modify anything beyond this point...
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
>
> # FIND_PACKAGE(Boost REQUIRED)
>
> FIND_PACKAGE(deal.II 9.2.0 QUIET
>   HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
>   )
> IF(NOT ${deal.II_FOUND})
>   MESSAGE(FATAL_ERROR "\n"
> "*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
> "You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to 
> cmake\n"
> "or set an environment variable \"DEAL_II_DIR\" that contains this path."
> )
> ENDIF()
>
> DEAL_II_INITIALIZE_CACHED_VARIABLES()
> PROJECT(${TARGET})
> DEAL_II_INVOKE_AUTOPILOT()
>
> Best wishes,
>
> Kishore
>
> On Friday, May 14, 2021 at 9:49:52 PM UTC+5:30 Kishore Nori wrote:
>>
>> Dear Prof. Bangerth,
>>
>> Thank you for the reply, yes I was having some doubt on this. I removed the
>> FIND_PACKAGE(Boost REQUIRED) in CMakeLists.txt but I still get the error.
>>
>> Could it be because of the boost include file? #include 
>> 
>> Does deal.II come with boost library included? If yes, how can I use it for 
>> the access the above function?
>>
>> Best wishes,
>>
>> Kishore
>>
>> On Friday, May 14, 2021 at 9:24:58 PM UTC+5:30 Wolfgang Bangerth wrote:
>>>
>>> On 5/14/21 8:17 AM, Bruno Turcksin wrote:
>>> >
>>> > Can you show the result of the command ldd, i.e. what do you see when you 
>>> > type
>>> > ldd ./my_code
>>>
>>> Could it be that you are linking against both the version of BOOST that 
>>> comes
>>> with deal.II and against an external one? That would explain why things
>>> already go wrong while starting up the program. Try removing the FindBOOST
>>> call from your own project's CMakeLists.txt.
>>>
>>> Best
>>> W.
>>>
>>>
>>> --
>>> 
>>> Wolfgang Bangerth email: bang...@colostate.edu
>>> 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 a topic in the Google 
> Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/gIW8VuiVd0A/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> 

Re: [deal.II] Regarding using Boost library functions with deal.II

I have isolated the error to minimum (not-) working example: The error 
occurs 
when Point and Boost functions are used at once in a dealii program.
I have observed that in the Point class there is usage of some boost 
functions, 
could it be that there is clash with that boost version and the below 
combing 
from the boost include file? 

usingBoostindealii.cc :

#include 
#include 
#include 
#include 

#include 

#include 

#include 
#include 

#include 
#include 
#include 

#include 

using namespace dealii;  

int main()
{
Point<3> evalPoint(1.0, 2.0, 0.0);
Point<3> evalPoint2(1.0, 1.0, 1.0);
std::vector atomPos{0.0, 0.0, 0.0};

std::cout << evalPoint.distance_square(evalPoint2) << '\n'; // comment this 
to test the below too 
double sphericalHarmonicVal{}; 
double r{}, theta{}, phi{}; 

// std::vector relativeEvalPoint(3, 0.0);
// // *** even with the below there is same error ***
// for (int i = 0; i < 3; ++i)
// {
// relativeEvalPoint[i] = evalPoint(i) - atomPos[i]; 
// // relativeEvalPoint[i] = evalPoint[i] - atomPos[i];
// }

sphericalHarmonicVal = boost::math::spherical_harmonic_i(0, 0, 0.0, 0.0);

std::cout << sphericalHarmonicVal << '\n';

return 0;
}

CMakeLists.txt : 

##
#  CMake script for the usingBoostindealii program:
##

# Set the name of the project and target:
SET(TARGET "usingBoostindealii")

# Declare all source files the target consists of. Here, this is only
# the one step-X.cc file, but as you expand your project you may wish
# to add other source files as well. If your project becomes much larger,
# you may want to either replace the following statement by something like
#FILE(GLOB_RECURSE TARGET_SRC  "source/*.cc")
#FILE(GLOB_RECURSE TARGET_INC  "include/*.h")
#SET(TARGET_SRC ${TARGET_SRC}  ${TARGET_INC})
# or switch altogether to the large project CMakeLists.txt file discussed
# in the "CMake in user projects" page accessible from the "User info"
# page of the documentation.
SET(TARGET_SRC
  ${TARGET}.cc
  )

# Usually, you will not need to modify anything beyond this point...

CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)

# FIND_PACKAGE(Boost REQUIRED)

FIND_PACKAGE(deal.II 9.2.0 QUIET
  HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
  )
IF(NOT ${deal.II_FOUND})
  MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II. 
***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to 
cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this 
path."
)
ENDIF()

DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})
DEAL_II_INVOKE_AUTOPILOT()

Best wishes,

Kishore

On Friday, May 14, 2021 at 9:49:52 PM UTC+5:30 Kishore Nori wrote:

> Dear Prof. Bangerth,
>
> Thank you for the reply, yes I was having some doubt on this. I removed 
> the 
> FIND_PACKAGE(Boost REQUIRED) in CMakeLists.txt but I still get the error.
>
> Could it be because of the boost include file? #include 
>  
> Does deal.II come with boost library included? If yes, how can I use it 
> for the access the above function? 
>
> Best wishes,
>
> Kishore
>
> On Friday, May 14, 2021 at 9:24:58 PM UTC+5:30 Wolfgang Bangerth wrote:
>
>> On 5/14/21 8:17 AM, Bruno Turcksin wrote:
>> > 
>> > Can you show the result of the command ldd, i.e. what do you see when 
>> you type 
>> > ldd ./my_code
>>
>> Could it be that you are linking against both the version of BOOST that 
>> comes 
>> with deal.II and against an external one? That would explain why things 
>> already go wrong while starting up the program. Try removing the 
>> FindBOOST 
>> call from your own project's CMakeLists.txt.
>>
>> Best
>> W.
>>
>>
>> -- 
>> 
>> Wolfgang Bangerth email: bang...@colostate.edu
>> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/bf6946b0-8a7f-4c54-9c4a-efaf1bfafd59n%40googlegroups.com.


Re: [deal.II] Regarding using Boost library functions with deal.II

Dear Prof. Bangerth,

Thank you for the reply, yes I was having some doubt on this. I removed the 
FIND_PACKAGE(Boost REQUIRED) in CMakeLists.txt but I still get the error.

Could it be because of the boost include file? #include 
 
Does deal.II come with boost library included? If yes, how can I use it for 
the access the above function? 

Best wishes,

Kishore

On Friday, May 14, 2021 at 9:24:58 PM UTC+5:30 Wolfgang Bangerth wrote:

> On 5/14/21 8:17 AM, Bruno Turcksin wrote:
> > 
> > Can you show the result of the command ldd, i.e. what do you see when 
> you type 
> > ldd ./my_code
>
> Could it be that you are linking against both the version of BOOST that 
> comes 
> with deal.II and against an external one? That would explain why things 
> already go wrong while starting up the program. Try removing the FindBOOST 
> call from your own project's CMakeLists.txt.
>
> Best
> W.
>
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/f655a3e8-8060-468d-9902-c49b62cc9671n%40googlegroups.com.


Re: [deal.II] Regarding using Boost library functions with deal.II


On 5/14/21 8:17 AM, Bruno Turcksin wrote:


Can you show the result of the command ldd, i.e. what do you see when you type 
ldd ./my_code


Could it be that you are linking against both the version of BOOST that comes 
with deal.II and against an external one? That would explain why things 
already go wrong while starting up the program. Try removing the FindBOOST 
call from your own project's CMakeLists.txt.


Best
 W.


--

Wolfgang Bangerth  email: bange...@colostate.edu
   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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/60f10d09-3413-ed3b-28e9-c1bfb4371a77%40colostate.edu.


Re: [deal.II] Regarding using Boost library functions with deal.II

Dear Bruno,

Thank you very much for the great lead. I have already included the 
specific .hpp file, in this case 
#include  in the main 
file, and the function
I use is in this .hpp file, which works fine when I run the same function 
without deal.II in sample cpp file. 

I am using the simple CMakeLists.txt available with the step-1, may I know 
how can I
add the math as component in CMakeLists? 

Best wishes,

Kishore

On Friday, May 14, 2021 at 8:12:58 PM UTC+5:30 bruno.t...@gmail.com wrote:

> Kisher,
>
> According to 
> https://www.boost.org/doc/libs/1_76_0/more/getting_started/unix-variants.html#header-only-libraries
> has functions that require the package to be compiled. However, I
> don't see libboost_math.so.1.71.0 when you do ldd. So it looks like
> you forgot to add math as a component in your CMakeLists.txt
>
> Best,
>
> Le ven. 14 mai 2021 à 10:22, Kishore Nori  a écrit :
> >
> > Dear Bruno,
> >
> > Thank you for the reply :) The following is the result of ldd 
> ./executable:
> >
> > linux-vdso.so.1 (0x7ffd36c7c000)
> > libdeal.ii.g.so.9.2.0 => /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.2.0 
> (0x7f0ac6662000)
> > libtrilinos_teuchoscomm.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_teuchoscomm.so.12 (0x7f0ac6542000)
> > libtrilinos_teuchoscore.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_teuchoscore.so.12 (0x7f0ac64cf000)
> > libtbb.so.2 => /lib/x86_64-linux-gnu/libtbb.so.2 (0x7f0ac6489000)
> > libmpi_cxx.so.40 => /lib/x86_64-linux-gnu/libmpi_cxx.so.40 
> (0x7f0ac6469000)
> > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f0ac644e000)
> > libmpi.so.40 => /lib/x86_64-linux-gnu/libmpi.so.40 (0x7f0ac6329000)
> > libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 
> (0x7f0ac6148000)
> > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f0ac5ff9000)
> > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f0ac5e07000)
> > libboost_iostreams.so.1.71.0 => 
> /lib/x86_64-linux-gnu/libboost_iostreams.so.1.71.0 (0x7f0ac5dde000)
> > libboost_serialization.so.1.71.0 => 
> /lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 (0x7f0ac5d9a000)
> > libtrilinos_muelu-adapters.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_muelu-adapters.so.12 (0x7f0ac598a000)
> > libtrilinos_ml.so.12 => /lib/x86_64-linux-gnu/libtrilinos_ml.so.12 
> (0x7f0ac5691000)
> > libtrilinos_ifpack.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_ifpack.so.12 (0x7f0ac546e000)
> > libtrilinos_amesos.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_amesos.so.12 (0x7f0ac53fe000)
> > libtrilinos_aztecoo.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_aztecoo.so.12 (0x7f0ac537)
> > libtrilinos_epetraext.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_epetraext.so.12 (0x7f0ac51c9000)
> > libtrilinos_zoltan.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_zoltan.so.12 (0x7f0ac50e7000)
> > libtrilinos_epetra.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_epetra.so.12 (0x7f0ac4f6c000)
> > libtrilinos_teuchosparameterlist.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_teuchosparameterlist.so.12 
> (0x7f0ac4aca000)
> > libtrilinos_kokkoscore.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_kokkoscore.so.12 (0x7f0ac4a72000)
> > libhdf5_openmpi.so.103 => /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103 
> (0x7f0ac46d3000)
> > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f0ac46b7000)
> > libumfpack.so.5 => /lib/x86_64-linux-gnu/libumfpack.so.5 
> (0x7f0ac460a000)
> > libmetis.so.5 => /lib/x86_64-linux-gnu/libmetis.so.5 (0x7f0ac439c000)
> > libassimp.so.5 => /lib/x86_64-linux-gnu/libassimp.so.5 
> (0x7f0ac374f000)
> > libgsl.so.23 => /lib/x86_64-linux-gnu/libgsl.so.23 (0x7f0ac34d3000)
> > libmuparser.so.2 => /lib/x86_64-linux-gnu/libmuparser.so.2 
> (0x7f0ac3473000)
> > libnetcdf_c++.so.4 => /lib/x86_64-linux-gnu/libnetcdf_c++.so.4 
> (0x7f0ac3453000)
> > libTKBool.so.7 => /lib/x86_64-linux-gnu/libTKBool.so.7 
> (0x7f0ac2fe)
> > libTKBRep.so.7 => /lib/x86_64-linux-gnu/libTKBRep.so.7 
> (0x7f0ac2edd000)
> > libTKernel.so.7 => /lib/x86_64-linux-gnu/libTKernel.so.7 
> (0x7f0ac2d27000)
> > libTKG3d.so.7 => /lib/x86_64-linux-gnu/libTKG3d.so.7 (0x7f0ac2bec000)
> > libTKGeomAlgo.so.7 => /lib/x86_64-linux-gnu/libTKGeomAlgo.so.7 
> (0x7f0ac25d4000)
> > libTKGeomBase.so.7 => /lib/x86_64-linux-gnu/libTKGeomBase.so.7 
> (0x7f0ac205e000)
> > libTKIGES.so.7 => /lib/x86_64-linux-gnu/libTKIGES.so.7 
> (0x7f0ac1c3e000)
> > libTKMath.so.7 => /lib/x86_64-linux-gnu/libTKMath.so.7 
> (0x7f0ac19bc000)
> > libTKMesh.so.7 => /lib/x86_64-linux-gnu/libTKMesh.so.7 
> (0x7f0ac191f000)
> > libTKShHealing.so.7 => /lib/x86_64-linux-gnu/libTKShHealing.so.7 
> (0x7f0ac164f000)
> > libTKSTEP.so.7 => /lib/x86_64-linux-gnu/libTKSTEP.so.7 
> (0x7f0ac1307000)
> > libTKSTL.so.7 => /lib/x86_64-linux-gnu/libTKSTL.so.7 (0x7f0ac12eb000)
> > libTKTopAlgo.so.7 => /lib/x86_64-linux-gnu/libTKTopAlgo.so.7 
> 

Re: [deal.II] Regarding using Boost library functions with deal.II

Kisher,

According to 
https://www.boost.org/doc/libs/1_76_0/more/getting_started/unix-variants.html#header-only-libraries
has functions that require the package to be compiled. However, I
don't see libboost_math.so.1.71.0 when you do ldd. So it looks like
you forgot to add math as a component in your CMakeLists.txt

Best,

Le ven. 14 mai 2021 à 10:22, Kishore Nori  a écrit :
>
> Dear Bruno,
>
> Thank you for the reply :) The following is the result of ldd ./executable:
>
>  linux-vdso.so.1 (0x7ffd36c7c000)
> libdeal.ii.g.so.9.2.0 => /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.2.0 
> (0x7f0ac6662000)
> libtrilinos_teuchoscomm.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_teuchoscomm.so.12 (0x7f0ac6542000)
> libtrilinos_teuchoscore.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_teuchoscore.so.12 (0x7f0ac64cf000)
> libtbb.so.2 => /lib/x86_64-linux-gnu/libtbb.so.2 (0x7f0ac6489000)
> libmpi_cxx.so.40 => /lib/x86_64-linux-gnu/libmpi_cxx.so.40 
> (0x7f0ac6469000)
> libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f0ac644e000)
> libmpi.so.40 => /lib/x86_64-linux-gnu/libmpi.so.40 (0x7f0ac6329000)
> libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f0ac6148000)
> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f0ac5ff9000)
> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f0ac5e07000)
> libboost_iostreams.so.1.71.0 => 
> /lib/x86_64-linux-gnu/libboost_iostreams.so.1.71.0 (0x7f0ac5dde000)
> libboost_serialization.so.1.71.0 => 
> /lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 (0x7f0ac5d9a000)
> libtrilinos_muelu-adapters.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_muelu-adapters.so.12 (0x7f0ac598a000)
> libtrilinos_ml.so.12 => /lib/x86_64-linux-gnu/libtrilinos_ml.so.12 
> (0x7f0ac5691000)
> libtrilinos_ifpack.so.12 => /lib/x86_64-linux-gnu/libtrilinos_ifpack.so.12 
> (0x7f0ac546e000)
> libtrilinos_amesos.so.12 => /lib/x86_64-linux-gnu/libtrilinos_amesos.so.12 
> (0x7f0ac53fe000)
> libtrilinos_aztecoo.so.12 => /lib/x86_64-linux-gnu/libtrilinos_aztecoo.so.12 
> (0x7f0ac537)
> libtrilinos_epetraext.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_epetraext.so.12 (0x7f0ac51c9000)
> libtrilinos_zoltan.so.12 => /lib/x86_64-linux-gnu/libtrilinos_zoltan.so.12 
> (0x7f0ac50e7000)
> libtrilinos_epetra.so.12 => /lib/x86_64-linux-gnu/libtrilinos_epetra.so.12 
> (0x7f0ac4f6c000)
> libtrilinos_teuchosparameterlist.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_teuchosparameterlist.so.12 
> (0x7f0ac4aca000)
> libtrilinos_kokkoscore.so.12 => 
> /lib/x86_64-linux-gnu/libtrilinos_kokkoscore.so.12 (0x7f0ac4a72000)
> libhdf5_openmpi.so.103 => /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103 
> (0x7f0ac46d3000)
> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f0ac46b7000)
> libumfpack.so.5 => /lib/x86_64-linux-gnu/libumfpack.so.5 (0x7f0ac460a000)
> libmetis.so.5 => /lib/x86_64-linux-gnu/libmetis.so.5 (0x7f0ac439c000)
> libassimp.so.5 => /lib/x86_64-linux-gnu/libassimp.so.5 (0x7f0ac374f000)
> libgsl.so.23 => /lib/x86_64-linux-gnu/libgsl.so.23 (0x7f0ac34d3000)
> libmuparser.so.2 => /lib/x86_64-linux-gnu/libmuparser.so.2 
> (0x7f0ac3473000)
> libnetcdf_c++.so.4 => /lib/x86_64-linux-gnu/libnetcdf_c++.so.4 
> (0x7f0ac3453000)
> libTKBool.so.7 => /lib/x86_64-linux-gnu/libTKBool.so.7 (0x7f0ac2fe)
> libTKBRep.so.7 => /lib/x86_64-linux-gnu/libTKBRep.so.7 (0x7f0ac2edd000)
> libTKernel.so.7 => /lib/x86_64-linux-gnu/libTKernel.so.7 (0x7f0ac2d27000)
> libTKG3d.so.7 => /lib/x86_64-linux-gnu/libTKG3d.so.7 (0x7f0ac2bec000)
> libTKGeomAlgo.so.7 => /lib/x86_64-linux-gnu/libTKGeomAlgo.so.7 
> (0x7f0ac25d4000)
> libTKGeomBase.so.7 => /lib/x86_64-linux-gnu/libTKGeomBase.so.7 
> (0x7f0ac205e000)
> libTKIGES.so.7 => /lib/x86_64-linux-gnu/libTKIGES.so.7 (0x7f0ac1c3e000)
> libTKMath.so.7 => /lib/x86_64-linux-gnu/libTKMath.so.7 (0x7f0ac19bc000)
> libTKMesh.so.7 => /lib/x86_64-linux-gnu/libTKMesh.so.7 (0x7f0ac191f000)
> libTKShHealing.so.7 => /lib/x86_64-linux-gnu/libTKShHealing.so.7 
> (0x7f0ac164f000)
> libTKSTEP.so.7 => /lib/x86_64-linux-gnu/libTKSTEP.so.7 (0x7f0ac1307000)
> libTKSTL.so.7 => /lib/x86_64-linux-gnu/libTKSTL.so.7 (0x7f0ac12eb000)
> libTKTopAlgo.so.7 => /lib/x86_64-linux-gnu/libTKTopAlgo.so.7 
> (0x7f0ac0fc1000)
> libTKXSBase.so.7 => /lib/x86_64-linux-gnu/libTKXSBase.so.7 
> (0x7f0ac0d12000)
> libp4est-2.2.so => /lib/x86_64-linux-gnu/libp4est-2.2.so (0x7f0ac0c58000)
> libsc-2.2.so => /lib/x86_64-linux-gnu/libsc-2.2.so (0x7f0ac0c29000)
> libscalapack-openmpi.so.2.1 => 
> /lib/x86_64-linux-gnu/libscalapack-openmpi.so.2.1 (0x7f0ac064a000)
> liblapack.so.3 => /lib/x86_64-linux-gnu/liblapack.so.3 (0x7f0abe636000)
> libblas.so.3 => /lib/x86_64-linux-gnu/libblas.so.3 (0x7f0abcc37000)
> libslepc_real.so.3.12 => /lib/x86_64-linux-gnu/libslepc_real.so.3.12 
> (0x7f0abc95d000)
> libpetsc_real.so.3.12 => 

Re: [deal.II] Regarding using Boost library functions with deal.II

Dear Bruno,

Thank you for the reply :) The following is the result of ldd ./executable:

 linux-vdso.so.1 (0x7ffd36c7c000)
libdeal.ii.g.so.9.2.0 => /lib/x86_64-linux-gnu/libdeal.ii.g.so.9.2.0
(0x7f0ac6662000)
libtrilinos_teuchoscomm.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_teuchoscomm.so.12 (0x7f0ac6542000)
libtrilinos_teuchoscore.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_teuchoscore.so.12 (0x7f0ac64cf000)
libtbb.so.2 => /lib/x86_64-linux-gnu/libtbb.so.2 (0x7f0ac6489000)
libmpi_cxx.so.40 => /lib/x86_64-linux-gnu/libmpi_cxx.so.40
(0x7f0ac6469000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f0ac644e000)
libmpi.so.40 => /lib/x86_64-linux-gnu/libmpi.so.40 (0x7f0ac6329000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f0ac6148000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f0ac5ff9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f0ac5e07000)
libboost_iostreams.so.1.71.0 =>
/lib/x86_64-linux-gnu/libboost_iostreams.so.1.71.0 (0x7f0ac5dde000)
libboost_serialization.so.1.71.0 =>
/lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 (0x7f0ac5d9a000)
libtrilinos_muelu-adapters.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_muelu-adapters.so.12 (0x7f0ac598a000)
libtrilinos_ml.so.12 => /lib/x86_64-linux-gnu/libtrilinos_ml.so.12
(0x7f0ac5691000)
libtrilinos_ifpack.so.12 => /lib/x86_64-linux-gnu/libtrilinos_ifpack.so.12
(0x7f0ac546e000)
libtrilinos_amesos.so.12 => /lib/x86_64-linux-gnu/libtrilinos_amesos.so.12
(0x7f0ac53fe000)
libtrilinos_aztecoo.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_aztecoo.so.12 (0x7f0ac537)
libtrilinos_epetraext.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_epetraext.so.12 (0x7f0ac51c9000)
libtrilinos_zoltan.so.12 => /lib/x86_64-linux-gnu/libtrilinos_zoltan.so.12
(0x7f0ac50e7000)
libtrilinos_epetra.so.12 => /lib/x86_64-linux-gnu/libtrilinos_epetra.so.12
(0x7f0ac4f6c000)
libtrilinos_teuchosparameterlist.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_teuchosparameterlist.so.12
(0x7f0ac4aca000)
libtrilinos_kokkoscore.so.12 =>
/lib/x86_64-linux-gnu/libtrilinos_kokkoscore.so.12 (0x7f0ac4a72000)
libhdf5_openmpi.so.103 => /lib/x86_64-linux-gnu/libhdf5_openmpi.so.103
(0x7f0ac46d3000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f0ac46b7000)
libumfpack.so.5 => /lib/x86_64-linux-gnu/libumfpack.so.5
(0x7f0ac460a000)
libmetis.so.5 => /lib/x86_64-linux-gnu/libmetis.so.5 (0x7f0ac439c000)
libassimp.so.5 => /lib/x86_64-linux-gnu/libassimp.so.5 (0x7f0ac374f000)
libgsl.so.23 => /lib/x86_64-linux-gnu/libgsl.so.23 (0x7f0ac34d3000)
libmuparser.so.2 => /lib/x86_64-linux-gnu/libmuparser.so.2
(0x7f0ac3473000)
libnetcdf_c++.so.4 => /lib/x86_64-linux-gnu/libnetcdf_c++.so.4
(0x7f0ac3453000)
libTKBool.so.7 => /lib/x86_64-linux-gnu/libTKBool.so.7 (0x7f0ac2fe)
libTKBRep.so.7 => /lib/x86_64-linux-gnu/libTKBRep.so.7 (0x7f0ac2edd000)
libTKernel.so.7 => /lib/x86_64-linux-gnu/libTKernel.so.7
(0x7f0ac2d27000)
libTKG3d.so.7 => /lib/x86_64-linux-gnu/libTKG3d.so.7 (0x7f0ac2bec000)
libTKGeomAlgo.so.7 => /lib/x86_64-linux-gnu/libTKGeomAlgo.so.7
(0x7f0ac25d4000)
libTKGeomBase.so.7 => /lib/x86_64-linux-gnu/libTKGeomBase.so.7
(0x7f0ac205e000)
libTKIGES.so.7 => /lib/x86_64-linux-gnu/libTKIGES.so.7 (0x7f0ac1c3e000)
libTKMath.so.7 => /lib/x86_64-linux-gnu/libTKMath.so.7 (0x7f0ac19bc000)
libTKMesh.so.7 => /lib/x86_64-linux-gnu/libTKMesh.so.7 (0x7f0ac191f000)
libTKShHealing.so.7 => /lib/x86_64-linux-gnu/libTKShHealing.so.7
(0x7f0ac164f000)
libTKSTEP.so.7 => /lib/x86_64-linux-gnu/libTKSTEP.so.7 (0x7f0ac1307000)
libTKSTL.so.7 => /lib/x86_64-linux-gnu/libTKSTL.so.7 (0x7f0ac12eb000)
libTKTopAlgo.so.7 => /lib/x86_64-linux-gnu/libTKTopAlgo.so.7
(0x7f0ac0fc1000)
libTKXSBase.so.7 => /lib/x86_64-linux-gnu/libTKXSBase.so.7
(0x7f0ac0d12000)
libp4est-2.2.so => /lib/x86_64-linux-gnu/libp4est-2.2.so
(0x7f0ac0c58000)
libsc-2.2.so => /lib/x86_64-linux-gnu/libsc-2.2.so (0x7f0ac0c29000)
libscalapack-openmpi.so.2.1 =>
/lib/x86_64-linux-gnu/libscalapack-openmpi.so.2.1 (0x7f0ac064a000)
liblapack.so.3 => /lib/x86_64-linux-gnu/liblapack.so.3 (0x7f0abe636000)
libblas.so.3 => /lib/x86_64-linux-gnu/libblas.so.3 (0x7f0abcc37000)
libslepc_real.so.3.12 => /lib/x86_64-linux-gnu/libslepc_real.so.3.12
(0x7f0abc95d000)
libpetsc_real.so.3.12 => /lib/x86_64-linux-gnu/libpetsc_real.so.3.12
(0x7f0abb628000)
libsundials_idas.so.2 => /lib/x86_64-linux-gnu/libsundials_idas.so.2
(0x7f0abb5e8000)
libsundials_arkode.so.2 => /lib/x86_64-linux-gnu/libsundials_arkode.so.2
(0x7f0abb5ae000)
libsundials_kinsol.so.3 => /lib/x86_64-linux-gnu/libsundials_kinsol.so.3
(0x7f0abb589000)
libsundials_nvecparallel.so.3 =>
/lib/x86_64-linux-gnu/libsundials_nvecparallel.so.3 (0x7f0abb582000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x7f0abb55f000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f0abb559000)

Re: [deal.II] Regarding using Boost library functions with deal.II

Kishore,

Can you show the result of the command ldd, i.e. what do you see when you 
type ldd ./my_code

Best,

Bruno

On Friday, May 14, 2021 at 9:32:26 AM UTC-4 kishore...@gmail.com wrote:

> Just an update: The code gives the above errors even before the execution 
> of the code starts. The compilation (using make) doesn't give any errors, 
> and when run the executable using make run, these errors are displayed. 
>
> On Thursday, May 13, 2021 at 10:36:32 PM UTC+5:30 Kishore Nori wrote:
>
>> Sorry that didn't mention more details: I am running deal.II 9.2.0 on 
>> Ubuntu 20.04, 
>> installed through the available PPA.
>>
>> The only boost function I am using is spherical_harmonic_r(l, m, theta, 
>> phi) inside a simple user-defined function 
>> which returns the spherical harmonic value times a const. 
>> (spherical_harmonic_r is available under #include 
>> 
>> and boost version is 1.76.0, installed and available in by /usr/include 
>> directory)
>>
>> The weird thing is that the program results in the above errors even when 
>> the function involving the above boost function is
>> not called anywhere. The same function works perfectly fine in a sample 
>> C++ file without deal.II
>>
>> I ll also try using the debugger, thank you very much for the suggestions 
>> and response :)
>>
>> Best wishes,
>>
>> Kishore
>>
>> On Thursday, May 13, 2021 at 10:23:30 PM UTC+5:30 Wolfgang Bangerth wrote:
>>
>>> On 5/13/21 8:56 AM, Kishore Nori wrote: 
>>> > 
>>> > I would be very happy to know on why the problem is arising and how 
>>> can I fix it? 
>>>
>>> We don't know without being able to see what specifically your code 
>>> looks like 
>>> and the system it is running on -- but the way to find out is to run 
>>> your 
>>> program in a debugger and see at which place the program is aborting. If 
>>> you 
>>> know where it happens, it's often relatively easy to figure out how to 
>>> fix the 
>>> code. 
>>>
>>> Best 
>>> W. 
>>>
>>>
>>> -- 
>>>  
>>> Wolfgang Bangerth email: bang...@colostate.edu 
>>> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d623b6a9-e53e-4b3e-bc76-8badef7e5b66n%40googlegroups.com.


Re: [deal.II] Regarding using Boost library functions with deal.II

Just an update: The code gives the above errors even before the execution 
of the code starts. The compilation (using make) doesn't give any errors, 
and when run the executable using make run, these errors are displayed. 

On Thursday, May 13, 2021 at 10:36:32 PM UTC+5:30 Kishore Nori wrote:

> Sorry that didn't mention more details: I am running deal.II 9.2.0 on 
> Ubuntu 20.04, 
> installed through the available PPA.
>
> The only boost function I am using is spherical_harmonic_r(l, m, theta, 
> phi) inside a simple user-defined function 
> which returns the spherical harmonic value times a const. 
> (spherical_harmonic_r is available under #include 
> 
> and boost version is 1.76.0, installed and available in by /usr/include 
> directory)
>
> The weird thing is that the program results in the above errors even when 
> the function involving the above boost function is
> not called anywhere. The same function works perfectly fine in a sample 
> C++ file without deal.II
>
> I ll also try using the debugger, thank you very much for the suggestions 
> and response :)
>
> Best wishes,
>
> Kishore
>
> On Thursday, May 13, 2021 at 10:23:30 PM UTC+5:30 Wolfgang Bangerth wrote:
>
>> On 5/13/21 8:56 AM, Kishore Nori wrote: 
>> > 
>> > I would be very happy to know on why the problem is arising and how can 
>> I fix it? 
>>
>> We don't know without being able to see what specifically your code looks 
>> like 
>> and the system it is running on -- but the way to find out is to run your 
>> program in a debugger and see at which place the program is aborting. If 
>> you 
>> know where it happens, it's often relatively easy to figure out how to 
>> fix the 
>> code. 
>>
>> Best 
>> W. 
>>
>>
>> -- 
>>  
>> Wolfgang Bangerth email: bang...@colostate.edu 
>> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/b3f70aa0-67a0-49a6-b20a-d485f1dcfaa3n%40googlegroups.com.


Re: [deal.II] p4est user pointer and distributed::triangulation

Thank you, Wolfgang! This is exactly what I am looking for. I don‘t need to 
access the pointer from outside, I am trying to extend the p4est-interface 
itself.

Best,
Konrad

On Friday, May 14, 2021 at 12:42:48 AM UTC+2 Wolfgang Bangerth wrote:

> On 5/13/21 3:05 PM, Konrad Simon wrote:
> > 
> > I am currently writing an interface to some p4est functions. The 
> structure of 
> > p4est makes it often necessary to pass data around through a user 
> pointer of 
> > whatever type (void*). When creating a new triangulation this pointer is 
> set 
> > to „this“ (the triangulation itself), see for example
> > 
> > 
> https://www.dealii.org/current/doxygen/deal.II/distributed_2tria_8cc_source.html#l2989
>  
> > <
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2Fdistributed_2tria_8cc_source.html%23l2989=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cb4cadd28da84445fd29308d91652e2c3%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637565367510208994%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=v2G100jGfI6SbGwV35raSFjMxfnJMJurP2F2qAc61Ls%3D=0
> >
> > 
> > Is this pointer used in other interfaces somehow? p4est itself does not 
> touch 
> > it so I am wondering if I can reset it to anything I‘d like.
>
> Konrad,
> we use this user pointer in many of the functions that are called back 
> from 
> p4est. Take a look at
> RefineAndCoarsenList::refine_callback
> for example (line 761 of the file), and many other functions that you can 
> find 
> by searching for
> forest->user_pointer
> in this file.
>
> We consider the p4est forest object as internal to the p::d::T class, so I 
> would expect that you can't access it, or expect that you can use any of 
> its 
> content for anything other than what the p::d::T class does with it.
>
> Best
> W.
>
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/7fbd1adf-c6d4-4656-ab6e-7c833e5e92cen%40googlegroups.com.