Re: [deal.II] Re: Can't configure with cmake

2024-02-06 Thread Sean Johnson
Bruno,

I apparently spoke to soon. It passed "make test" with 0 failed test. 
However, when I run "cmake ." in the directory of step-1 I get this output:


-- Using the deal.II-9.5.2 installation found at /usr/local
-- Include macro 
/usr/local/share/deal.II/macros/macro_deal_ii_add_test.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_deal_ii_initialize_cached_variables.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_deal_ii_query_git_information.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_deal_ii_setup_target.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_shell_escape_option_groups.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_target_compile_flags.cmake
-- Include macro 
/usr/local/share/deal.II/macros/macro_target_link_flags.cmake
-- Autopilot invoked
-- Run   $ make info  to print a detailed help message
-- Configuring done
CMake Error in CMakeLists.txt:
  Imported target "dealii::dealii_debug" includes non-existent path

"/usr/local/include/deal.II/bundled"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.



Then when I try "make" I get this:



[ 33%] Building CXX object CMakeFiles/step-1.dir/step-1.cc.o
In file included from /usr/local/include/deal.II/grid/tria.h:20,
 from /home/sean/dealii-9.5.2/examples/step-1/step-1.cc:22:
/usr/local/include/deal.II/base/config.h:588:12: fatal error: mpi.h: No 
such file or directory
  588 | #  include 
  |^~~
compilation terminated.
make[3]: *** [CMakeFiles/step-1.dir/build.make:76: 
CMakeFiles/step-1.dir/step-1.cc.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:90: CMakeFiles/step-1.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2
make: *** [Makefile:137: run] Error 2

I am currently recompiling with fewer jobs to see if any errors pop up or 
if recompiling might help.

Thanks,
Sean

On Tuesday, February 6, 2024 at 3:17:42 PM UTC-7 bruno.t...@gmail.com wrote:

> Sean,
>
> That's great to hear. We don't mark problems as solved. So there is 
> nothing to do.
>
> Best,
>
> Bruno
>
> Le mar. 6 févr. 2024 à 16:41, Sean Johnson  a écrit :
>
>> Thanks again!
>>
>> The using a newer version of Boost helped me get further and realize I 
>> made another bone headed mistake of compiling kokkos as a static library.
>>
>> I am all compiled and passed all tests now.
>>
>> Thanks for your help and let me know if I have to do anything for this to 
>> be marked as solved.
>>
>> Best,
>> Sean
>>
>> On Tuesday, February 6, 2024 at 8:30:19 AM UTC-7 bruno.t...@gmail.com 
>> wrote:
>>
>>> Sean,
>>>
>>> I am not sure what's the issue. It's probably not the issue but make 
>>> sure that mpi is using nvcc_wrapper as the underlying compiler. If you use 
>>> OpenMPI, you can use export `OMPI_CXX=nvcc_wrapper`. You could also try to 
>>> use a newer version of Boost. The bundled version is pretty old. Since you 
>>> are using Ubuntu 22.04, you can just use your package manager to install a 
>>> newer version of boost.
>>>
>>> Best,
>>>
>>> Bruno
>>>
>>> Le mar. 6 févr. 2024 à 09:37, Sean Johnson  a 
>>> écrit :
>>>
>>>> Thanks,
>>>>
>>>> I tried lowering it down to 2 and it looks like two of them were caught 
>>>> a lot earlier. Now I don't make it past 6%. I erased everything from 
>>>> before 
>>>> and recompiled the cmake files and ran with just 2 jobs and again it stuck 
>>>> in the same spot.
>>>>
>>>> Here are the last few lines and logs.
>>>>
>>>> [  6%] Building CXX object 
>>>> bundled/boost-1.70.0/libs/iostreams/src/CMakeFiles/bundled_boost_iostreams_debug.dir/gzip.cpp.o
>>>> /home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:1

Re: [deal.II] Re: Can't configure with cmake

2024-02-06 Thread Sean Johnson
Thanks again!

The using a newer version of Boost helped me get further and realize I made 
another bone headed mistake of compiling kokkos as a static library.

I am all compiled and passed all tests now.

Thanks for your help and let me know if I have to do anything for this to 
be marked as solved.

Best,
Sean

On Tuesday, February 6, 2024 at 8:30:19 AM UTC-7 bruno.t...@gmail.com wrote:

> Sean,
>
> I am not sure what's the issue. It's probably not the issue but make sure 
> that mpi is using nvcc_wrapper as the underlying compiler. If you use 
> OpenMPI, you can use export `OMPI_CXX=nvcc_wrapper`. You could also try to 
> use a newer version of Boost. The bundled version is pretty old. Since you 
> are using Ubuntu 22.04, you can just use your package manager to install a 
> newer version of boost.
>
> Best,
>
> Bruno
>
> Le mar. 6 févr. 2024 à 09:37, Sean Johnson  a écrit :
>
>> Thanks,
>>
>> I tried lowering it down to 2 and it looks like two of them were caught a 
>> lot earlier. Now I don't make it past 6%. I erased everything from before 
>> and recompiled the cmake files and ran with just 2 jobs and again it stuck 
>> in the same spot.
>>
>> Here are the last few lines and logs.
>>
>> [  6%] Building CXX object 
>> bundled/boost-1.70.0/libs/iostreams/src/CMakeFiles/bundled_boost_iostreams_debug.dir/gzip.cpp.o
>> /home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:193:42:
>>  
>> warning: unnecessary parentheses in declaration of ‘assert_arg’ 
>> [-Wparentheses]
>>   193 | template< typename Pred >
>>   |  ^   
>>   
>> /home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:193:42:
>>  
>> note: remove parentheses
>>   193 | template< typename Pred >
>>   |  ^   
>>   
>>   |  -   
>>  -
>> /home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:198:42:
>>  
>> warning: unnecessary parentheses in declaration of ‘assert_not_arg’ 
>> [-Wparentheses]
>>   198 | template< typename Pred >
>>   |  ^   
>> 
>>   
>> /home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:198:42:
>>  
>> note: remove parentheses
>>   198 | template< typename Pred >
>>   |  ^   
>> 
>>   
>>   |  -   
>> 
>>  -
>> [  6%] Building CXX object 
>> bundled/boost-1.70.0/libs/iostreams/src/CMakeFiles/bundled_boost_iostreams_debug.dir/mapped_file.cpp.o
>>
>> Thanks again for your patience and help,
>> Sean
>>
>> On Monday, February 5, 2024 at 7:07:01 PM UTC-7 bruno.t...@gmail.com 
>> wrote:
>>
>>> Sean,
>>>
>>> It's possible that you don't have enough RAM and that you are swapping 
>>> memory which is extremely slow. Try to reinstall using fewer processors.
>>>
>>> Best,
>>>
>>> Bruno
>>>
>>> Le lun. 5 févr. 2024 à 19:01, Sean Johnson  a 
>>> écrit :
>>>
>>>> Thanks Bruno,
>>>>
>>>> This was definitely it.
>>>>
>>>> So I have now gotten to running make --jobs=4 install but it has frozen 
>>>> at 82%
>>>> I have been sitting on it for about 6 to 7 hours with no change at all. 
>>>> The last line is:
>>>> [ 82%] Built target object_non_matching_debug
>>>>
>>>>  and attached are the summary.log and detailed.log
>>>>
>>>> I will keep it running still just incase but from previous 
>>>> installations of dealii this has never happened.
>>>>
>>>> Thanks,
>>>> Sean
>>>>
>>>> On Monday, February 5, 2024 at 8:32:28 AM UTC-7 brun

Re: [deal.II] Re: Can't configure with cmake

2024-02-06 Thread Sean Johnson
Thanks,

I tried lowering it down to 2 and it looks like two of them were caught a 
lot earlier. Now I don't make it past 6%. I erased everything from before 
and recompiled the cmake files and ran with just 2 jobs and again it stuck 
in the same spot.

Here are the last few lines and logs.

[  6%] Building CXX object 
bundled/boost-1.70.0/libs/iostreams/src/CMakeFiles/bundled_boost_iostreams_debug.dir/gzip.cpp.o
/home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:193:42:
 
warning: unnecessary parentheses in declaration of ‘assert_arg’ 
[-Wparentheses]
  193 | template< typename Pred >
  |  ^ 

/home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:193:42:
 
note: remove parentheses
  193 | template< typename Pred >
  |  ^ 

  |  - 
   -
/home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:198:42:
 
warning: unnecessary parentheses in declaration of ‘assert_not_arg’ 
[-Wparentheses]
  198 | template< typename Pred >
  |  ^ 


/home/sean/dealii-9.5.2/bundled/boost-1.70.0/libs/iostreams/src/../../../include/boost/mpl/assert.hpp:198:42:
 
note: remove parentheses
  198 | template< typename Pred >
  |  ^ 


  |  - 

   -
[  6%] Building CXX object 
bundled/boost-1.70.0/libs/iostreams/src/CMakeFiles/bundled_boost_iostreams_debug.dir/mapped_file.cpp.o

Thanks again for your patience and help,
Sean

On Monday, February 5, 2024 at 7:07:01 PM UTC-7 bruno.t...@gmail.com wrote:

> Sean,
>
> It's possible that you don't have enough RAM and that you are swapping 
> memory which is extremely slow. Try to reinstall using fewer processors.
>
> Best,
>
> Bruno
>
> Le lun. 5 févr. 2024 à 19:01, Sean Johnson  a écrit :
>
>> Thanks Bruno,
>>
>> This was definitely it.
>>
>> So I have now gotten to running make --jobs=4 install but it has frozen 
>> at 82%
>> I have been sitting on it for about 6 to 7 hours with no change at all. 
>> The last line is:
>> [ 82%] Built target object_non_matching_debug
>>
>>  and attached are the summary.log and detailed.log
>>
>> I will keep it running still just incase but from previous installations 
>> of dealii this has never happened.
>>
>> Thanks,
>> Sean
>>
>> On Monday, February 5, 2024 at 8:32:28 AM UTC-7 bruno.t...@gmail.com 
>> wrote:
>>
>>> Sean,
>>>
>>> It looks like you are using the wrong compiler. If you want to use CUDA, 
>>> you should use nvcc_wrapper as your C++ compiler. You want something like 
>>> `-DCMAKE_CXX_COMPILER=/path/nvcc_wrapper`. You should already have used 
>>> `nvcc_wrapper` to compiler Kokkos.
>>>
>>> Best,
>>>
>>> Bruno
>>>
>>> On Monday, February 5, 2024 at 2:40:37 AM UTC-5 sljoh...@gmail.com 
>>> wrote:
>>>
>>>> Hey,
>>>>
>>>> I am trying to get deal.ii to compile with p4est and cuda. Due to cuda 
>>>> it also needs MPI and Kokkos from me. I can't even make the make file yet. 
>>>> I tried to find any similar problems in the mailing list and was unable to.
>>>>
>>>> I am running Ubuntu 22.04
>>>>
>>>> The Error at the end reads:
>>>> [ 50%] Building CXX object 
>>>> CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o
>>>>  /usr/bin/c++   -fopenmp-simd -O0 -ggdb -Wa,--compress-debug-sections 
>>>> -extended-lambda
>>>>  -Wext-lambda-captures-this -arch=sm_89 -DKOKKOS_DEPENDENCE 
>>>> -Wno-non-template-friend -o
>>>>  CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o -c
>>>>  /home/sean/dealii-9.5.2/cmake/macros/check_compiler_setup/dummy.cpp
>>>>  c++: error: unrecognized command-line option -Wext-lambda-captures-this
>>>>  c++: error: unrecognized command

[deal.II] Re: Can't configure with cmake

2024-02-05 Thread Sean Johnson
Thanks Bruno,

This was definitely it.

So I have now gotten to running make --jobs=4 install but it has frozen at 
82%
I have been sitting on it for about 6 to 7 hours with no change at all. The 
last line is:
[ 82%] Built target object_non_matching_debug

 and attached are the summary.log and detailed.log

I will keep it running still just incase but from previous installations of 
dealii this has never happened.

Thanks,
Sean

On Monday, February 5, 2024 at 8:32:28 AM UTC-7 bruno.t...@gmail.com wrote:

> Sean,
>
> It looks like you are using the wrong compiler. If you want to use CUDA, 
> you should use nvcc_wrapper as your C++ compiler. You want something like 
> `-DCMAKE_CXX_COMPILER=/path/nvcc_wrapper`. You should already have used 
> `nvcc_wrapper` to compiler Kokkos.
>
> Best,
>
> Bruno
>
> On Monday, February 5, 2024 at 2:40:37 AM UTC-5 sljoh...@gmail.com wrote:
>
>> Hey,
>>
>> I am trying to get deal.ii to compile with p4est and cuda. Due to cuda it 
>> also needs MPI and Kokkos from me. I can't even make the make file yet. I 
>> tried to find any similar problems in the mailing list and was unable to.
>>
>> I am running Ubuntu 22.04
>>
>> The Error at the end reads:
>> [ 50%] Building CXX object 
>> CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o
>>  /usr/bin/c++   -fopenmp-simd -O0 -ggdb -Wa,--compress-debug-sections 
>> -extended-lambda
>>  -Wext-lambda-captures-this -arch=sm_89 -DKOKKOS_DEPENDENCE 
>> -Wno-non-template-friend -o
>>  CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o -c
>>  /home/sean/dealii-9.5.2/cmake/macros/check_compiler_setup/dummy.cpp
>>  c++: error: unrecognized command-line option -Wext-lambda-captures-this
>>  c++: error: unrecognized command-line option -arch=sm_89
>>  gmake[2]: *** [CMakeFiles/CheckCompilerSetupExec.dir/build.make:78:
>>  CMakeFiles/CheckCompilerSetupExec.dir/dummy.cpp.o] Error 1
>>  gmake[2]: Leaving directory
>>
>>  
>> '/home/sean/dealii-9.5.2/build/check_compiler_setup/DEAL_II_HAVE_USABLE_FLAGS_DEBUG'
>>  gmake[1]: *** [CMakeFiles/Makefile2:86: 
>> CMakeFiles/CheckCompilerSetupExec.dir/all] Error 2
>>  gmake[1]: Leaving directory
>>
>>  
>> '/home/sean/dealii-9.5.2/build/check_compiler_setup/DEAL_II_HAVE_USABLE_FLAGS_DEBUG'
>>  gmake: *** [Makefile:94: all] Error 2
>>
>>
>>  CMake Error at cmake/setup_finalize.cmake:126 (message):
>>
>>
>>  Configuration error: Cannot compile a test program with the final 
>> set of
>>  compiler and linker flags:
>>CXX flags (DEBUG): -fopenmp-simd -O0 -ggdb 
>> -Wa,--compress-debug-sections
>>LD flags  (DEBUG): -rdynamic  -fopenmp -ggdb 
>> -Wl,--compress-debug-sections=zlib
>>LIBRARIES (DEBUG): rt;
>>
>> Attached are the output and error logs.
>>
>> Thanks for any help,
>> Sean
>>
>>

-- 
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/6ad27807-9f07-4a98-9a8b-c1fea625d13an%40googlegroups.com.
###
#
#  deal.II configuration:
#CMAKE_BUILD_TYPE:   DebugRelease
#BUILD_SHARED_LIBS:  ON
#CMAKE_INSTALL_PREFIX:   /usr/local
#CMAKE_SOURCE_DIR:   /home/sean/dealii-9.5.2
#(version 9.5.2)
#CMAKE_BINARY_DIR:   /home/sean/dealii-9.5.2/build
#CMAKE_CXX_COMPILER: GNU 11.4.0 on platform Linux x86_64
#/usr/local/bin/nvcc_wrapper
#C++ language standard:  C++17
#Vectorization level:0 bit (sse2)
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#  ( DEAL_II_WITH_64BIT_INDICES = OFF )
#  ( DEAL_II_WITH_ADOLC = OFF )
#  ( DEAL_II_WITH_ARBORX = OFF )
#  ( DEAL_II_WITH_ARPACK = OFF )
#  ( DEAL_II_WITH_ASSIMP = OFF )
#DEAL_II_WITH_BOOST set up with bundled packages
#  ( DEAL_II_WITH_CGAL = OFF )
#DEAL_II_WITH_COMPLEX_VALUES = ON
#DEAL_II_WITH_CUDA set up with external dependencies
#  ( DEAL_II_WITH_GINKGO = OFF )
#  ( DEAL_II_WITH_GMSH = OFF )
#  ( DEAL_II_WITH_GSL = OFF )
#  ( DEAL_II_WITH_HDF5 = OFF )
#DEAL_II_WITH_KOKKOS set up with external dependencies
#  ( DEAL_II_WITH_LAPACK = OFF )
#  ( DEAL_II_WITH_METIS = OFF )
#DEAL_II_WITH_MPI set up with external dependencies
#DEAL_II_WITH_MUPARSER set up with bundled packages
#  ( DEAL_II_WITH_OPENCASCADE = OFF )
#DEAL_II_WITH_P4EST set up with external dependencies
#  ( DEAL_II_WITH_PETSC = OFF )
#  ( DEAL_II_WITH_SCALAPACK = OFF )
#  ( DEAL_II_WITH_SLEPC = OFF )
#  ( DEAL_II_WITH_SUNDIALS = OFF )
#  ( DEAL_II_WITH_SYMENGINE = OFF )
#

Re: [deal.II] Determine location of a degree of freedom

2023-07-28 Thread Sean Johnson
I'm so sorry that it was in the FAQ.

Thanks for the fast response. I will try this immediately. Thanks again

On Friday, July 28, 2023 at 3:56:47 PM UTC-6 lucasm...@gmail.com wrote:

> Hi Sean,
>
> Is this what you're looking for?
>
>
> https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-to-get-the-mapped-position-of-support-points-of-my-element
>
> - Lucas
>
> On Fri, Jul 28, 2023, 4:51 PM Sean Johnson  wrote:
>
>> Is there a way to findout the "coordinates" of a degree of freedom? I 
>> want to strongly enforce all degrees of freedom on a boundary be 0 in a DG 
>> dof_handler. I know this is not normal for DG. It is done to avoid an edge 
>> that otherwise contains a singularity. However, the degrees of freedom are 
>> not logically on the boundary and as far as I understand they aren't even 
>> on the face of their respective cells but the interior. I can determine the 
>> cells that contain degrees of freedom that are physically on this outer 
>> boundary but not "logically" there within Deal.II. I just need to be able 
>> to differentiate between the other degrees of freedom within the cell now 
>> so that I can set the constraints.
>>
>> Thanks for any time spent answering this,
>> Sean Johnson
>>
>> -- 
>> 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+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/6a75d6c8-bef2-445c-b1c8-aa7c303b4fe1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/6a75d6c8-bef2-445c-b1c8-aa7c303b4fe1n%40googlegroups.com?utm_medium=email_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/ed7661d8-7232-4519-81bf-4107815e4730n%40googlegroups.com.


[deal.II] Determine location of a degree of freedom

2023-07-28 Thread Sean Johnson
Is there a way to findout the "coordinates" of a degree of freedom? I want 
to strongly enforce all degrees of freedom on a boundary be 0 in a DG 
dof_handler. I know this is not normal for DG. It is done to avoid an edge 
that otherwise contains a singularity. However, the degrees of freedom are 
not logically on the boundary and as far as I understand they aren't even 
on the face of their respective cells but the interior. I can determine the 
cells that contain degrees of freedom that are physically on this outer 
boundary but not "logically" there within Deal.II. I just need to be able 
to differentiate between the other degrees of freedom within the cell now 
so that I can set the constraints.

Thanks for any time spent answering this,
Sean Johnson

-- 
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/6a75d6c8-bef2-445c-b1c8-aa7c303b4fe1n%40googlegroups.com.


[deal.II] Re: Matrix Free Multiple DoFHandlers

2023-07-11 Thread Sean Johnson
Okay the problem is the global vector that I use for the additional 
DoFHandler does not have a mg_transfer to help the vector have the right 
amount of indices on all levels of the multigrid.

I don't see a way to construct the preconditioner with multiple transfers 
though it does allow multiple DoFHandlers. Is there something I am missing 
or does Deal.II not allow for this yet?

Thanks,
Sean Johnson

On Monday, July 10, 2023 at 1:57:49 PM UTC-6 Sean Johnson wrote:

> Hello it is me again,
>
> I am trying to something very similar to this discussion: 
> https://groups.google.com/g/dealii/c/Hh4iBsM21FI/m/cF-mzDP4GkwJ
>
> My question would be how could I pass the solution vector of the 
> pre-determined solution into the matrix free operator.
>
> I know this is a bad idea but currently I have the vector as a global 
> variable so I don't have to pass it into the local_apply function or 
> anything really. I do call initialize_dof_vector with the correct index but 
> in the conjugate gradient solve function the preconditioner throws the 
> error included at the bottom of this message.
>
> Also, attached is the just the setup_system() function similar to step-37 
> to try and keep code to a minimal. Nothing has been altered in the solve() 
> function from step-37 in the code.
>
> Thanks if anyone has the time to get to this beforehand,
> Sean Johnson
>
> 
> An error occurred in line <238> of file 
> 
>  
> in function
> void dealii::internal::check_vector_compatibility(const VectorType&, 
> const dealii::MatrixFree&, const 
> dealii::internal::MatrixFreeFunctions::DoFInfo&) [with int dim = 2; Number 
> = double; VectorizedArrayType = dealii::VectorizedArray; 
> VectorType = dealii::LinearAlgebra::distributed::Vector; typename 
> std::enable_if, 
> VectorType>::type*  = 0]
> The violated condition was: 
> false
> Additional information: 
> The parallel layout of the given vector is compatible neither with the
> Partitioner of the current FEEvaluation with dof_handler_index=1 nor
> with any Partitioner in MatrixFree. A potential reason is that you did
> not use MatrixFree::initialize_dof_vector() to get a compatible
> vector.
>
> Stacktrace:
> ---
> #0  ./step-37_minimal: void 
> dealii::internal::check_vector_compatibility<2, double, 
> dealii::VectorizedArray, 
> dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host>, 
> (dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host>*)0>(dealii::LinearAlgebra::distributed::Vector  
> dealii::MemorySpace::Host> const&, dealii::MatrixFree<2, double, 
> dealii::VectorizedArray > const&, 
> dealii::internal::MatrixFreeFunctions::DoFInfo const&)
> #1  ./step-37_minimal: void dealii::FEEvaluationBase<2, 1, double, false, 
> dealii::VectorizedArray 
> >::read_write_operation dealii::MemorySpace::Host> const, dealii::internal::VectorReader dealii::VectorizedArray > 
> >(dealii::internal::VectorReader 2ul> > const&, 
> std::array dealii::MemorySpace::Host> const*, 1ul> const&, 
> std::array  
> dealii::MemorySpace::Host>::value_type const, dealii::MemorySpace::Host>, 
> std::allocator  
> dealii::MemorySpace::Host>::value_type const, dealii::MemorySpace::Host> > 
> > const*, 1ul> const&, std::bitset<2ul> const&, bool) const
> #2  ./step-37_minimal: void dealii::FEEvaluationBase<2, 1, double, false, 
> dealii::VectorizedArray 
> >::read_dof_values dealii::MemorySpace::Host> 
> >(dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host> const&, unsigned int, std::bitset<2ul> const&)
> #3  ./step-37_minimal: Step37::LaplaceOperator<2, 3, 
> double>::local_apply(dealii::MatrixFree<2, double, 
> dealii::VectorizedArray > const&, 
> dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host>&, 
> dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host> const&, std::pair 
> const&) const
> #4  ./step-37_minimal: dealii::internal::MFWorker double, dealii::VectorizedArray >, 
> dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host>, 
> dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host>, Step37::LaplaceOperator<2, 3, double>, 
> true>::process_range(void (Step37::LaplaceOperator<2, 3, double>::* 
> const&)(dealii::MatrixFree<2, double, dealii::VectorizedArray 
> > const&, dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host>&, 
> dealii::LinearAlgebra::distributed::Vector dealii::MemorySpace::Host> const&

Re: [deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-07-10 Thread Sean Johnson
I believe all I had to do was upon initializing the MatrixFree operator I 
needed to include a vector that specified the "selected_row_blocks" which 
allows you to choose which component to use in the underlying matrix free 
object by including a vector with the index of the dof_handlers and 
constriants you choose to use. The n_components function I used still 
returned that the object had 2 components but the solving went through as 
if there were only one.

Thanks for your patience,
Sean Johnson

On Wednesday, July 5, 2023 at 3:03:29 PM UTC-6 Sean Johnson wrote:

> Okay I think I have implemented what I could of step-75. I currently have 
> deal.II compiled without Trilinos and am trying to keep it that way because 
> it is compiled without Trilinos on the high powered computer we will do 
> runs on later. That can change but would cause a headache for someone else 
> so I am just trying to avoid it.
>
> So I created the operator around a MatrixFree object. It allowed me the 
> ability to control m() for the matrix. I still have a problem and I went 
> back to my old version and this was a problem in both of them. Since in the 
> reinit function of the MatrixFree object is given two DoFHandlers, I have a 
> system matrix that expects a two component solution vector and rhs. The 
> solution vector and rhs are scalars with just one component. I am handing 
> both DoFHandlers over just because the computation of the matrix elements 
> depend on some variables I have calculated elsewhere with another 
> DoFHandler.
>
> Thanks for your time so far. I am still actively working on how to address 
> this. If you have any suggestions I am all ears.
> I will also work on a minimal example that causes the error.
>
> Thanks for your time again,
> Sean Johnson
>
> On Tuesday, June 27, 2023 at 3:19:10 PM UTC-6 Sean Johnson wrote:
>
>> I haven't done step-75 but I will look into it today and take a shot at 
>> it. There is nothing special about the way I did it besides that step-37 
>> came earlier so I had already done it and was familiar with that method. 
>> Thank you for your time and suggestion. I'll give an update probably in a 
>> day or so after learning and trying to do step-75.
>>
>> Big picture goal is we are doing a gravity waves simulation where they 
>> implode and form a black hole. Numerically, it has a few variables that 
>> have equations for evolving forward in time and then like three that don't 
>> but do have elliptic equations that if we know all the variables that have 
>> time equations we can then solve them on each time step. Thus the need for 
>> a DG DoFHandler for the time equations and a normal CG DoFHandler for the 
>> elliptic equation variables.
>>
>> Thanks again so much for your time,
>> Sean Johnson
>>
>> On Tuesday, June 27, 2023 at 2:02:59 PM UTC-6 peterr...@gmail.com wrote:
>>
>>> OK. The problem are these lines: 
>>> https://github.com/dealii/dealii/blob/8d68b3192ed1c8b928dfce03ca1d615201859904/include/deal.II/matrix_free/operators.h#L1225-L1235.
>>>  
>>> The number of rows are the sum of the number of DoFs of both attached 
>>> DoFHandlers...
>>>
>>> Personally, I would not use these matrix-free operators but create the 
>>> operator myself around a MatrixFree object. Just like in step-75. Would 
>>> that be possible?
>>>
>>> Out of curiosity, what is your goal?
>>>
>>> Best,
>>> PM
>>>
>>>
>>> On Tuesday, June 27, 2023 at 7:38:48 PM UTC+2 sljoh...@gmail.com wrote:
>>>
>>>> Here is step-37 with minimal changes. All that was changed was in the 
>>>> creation of a DG DoFHandler and the fe_system and constrains and what not 
>>>> to go along with it. Then of the functions only the LapalceProblem 
>>>> setup_system() function was altered and nothing else. It was just altered 
>>>> to also be reinit with the dof_handler_DG.
>>>>
>>>> Obviously the LaplaceOperator in my actual code actually uses variables 
>>>> that depend on the DG DoFHandler but that was left out of this example.
>>>>
>>>> Thank you again so much for your time and for all you guys do for this 
>>>> library.
>>>>
>>>> Thanks,
>>>> Sean Johnson
>>>>
>>>> On Tuesday, June 27, 2023 at 10:58:53 AM UTC-6 Sean Johnson wrote:
>>>>
>>>>> Yes of course. I can get one with minimal changes made to step-37. 
>>>>> Full code do you want the entirety of the changed step-37 code or just 
>>>>> the 
>>>>> Laplac

[deal.II] Matrix Free Multiple DoFHandlers

2023-07-10 Thread Sean Johnson
Hello it is me again,

I am trying to something very similar to this 
discussion: https://groups.google.com/g/dealii/c/Hh4iBsM21FI/m/cF-mzDP4GkwJ

My question would be how could I pass the solution vector of the 
pre-determined solution into the matrix free operator.

I know this is a bad idea but currently I have the vector as a global 
variable so I don't have to pass it into the local_apply function or 
anything really. I do call initialize_dof_vector with the correct index but 
in the conjugate gradient solve function the preconditioner throws the 
error included at the bottom of this message.

Also, attached is the just the setup_system() function similar to step-37 
to try and keep code to a minimal. Nothing has been altered in the solve() 
function from step-37 in the code.

Thanks if anyone has the time to get to this beforehand,
Sean Johnson


An error occurred in line <238> of file 

 
in function
void dealii::internal::check_vector_compatibility(const VectorType&, 
const dealii::MatrixFree&, const 
dealii::internal::MatrixFreeFunctions::DoFInfo&) [with int dim = 2; Number 
= double; VectorizedArrayType = dealii::VectorizedArray; 
VectorType = dealii::LinearAlgebra::distributed::Vector; typename 
std::enable_if, 
VectorType>::type*  = 0]
The violated condition was: 
false
Additional information: 
The parallel layout of the given vector is compatible neither with the
Partitioner of the current FEEvaluation with dof_handler_index=1 nor
with any Partitioner in MatrixFree. A potential reason is that you did
not use MatrixFree::initialize_dof_vector() to get a compatible
vector.

Stacktrace:
---
#0  ./step-37_minimal: void dealii::internal::check_vector_compatibility<2, 
double, dealii::VectorizedArray, 
dealii::LinearAlgebra::distributed::Vector, 
(dealii::LinearAlgebra::distributed::Vector*)0>(dealii::LinearAlgebra::distributed::Vector const&, dealii::MatrixFree<2, double, 
dealii::VectorizedArray > const&, 
dealii::internal::MatrixFreeFunctions::DoFInfo const&)
#1  ./step-37_minimal: void dealii::FEEvaluationBase<2, 1, double, false, 
dealii::VectorizedArray 
>::read_write_operation const, dealii::internal::VectorReader > 
>(dealii::internal::VectorReader > const&, 
std::array const*, 1ul> const&, 
std::array::value_type const, dealii::MemorySpace::Host>, 
std::allocator::value_type const, dealii::MemorySpace::Host> > 
> const*, 1ul> const&, std::bitset<2ul> const&, bool) const
#2  ./step-37_minimal: void dealii::FEEvaluationBase<2, 1, double, false, 
dealii::VectorizedArray 
>::read_dof_values 
>(dealii::LinearAlgebra::distributed::Vector const&, unsigned int, std::bitset<2ul> const&)
#3  ./step-37_minimal: Step37::LaplaceOperator<2, 3, 
double>::local_apply(dealii::MatrixFree<2, double, 
dealii::VectorizedArray > const&, 
dealii::LinearAlgebra::distributed::Vector&, 
dealii::LinearAlgebra::distributed::Vector const&, std::pair 
const&) const
#4  ./step-37_minimal: dealii::internal::MFWorker >, 
dealii::LinearAlgebra::distributed::Vector, 
dealii::LinearAlgebra::distributed::Vector, Step37::LaplaceOperator<2, 3, double>, 
true>::process_range(void (Step37::LaplaceOperator<2, 3, double>::* 
const&)(dealii::MatrixFree<2, double, dealii::VectorizedArray 
> const&, dealii::LinearAlgebra::distributed::Vector&, 
dealii::LinearAlgebra::distributed::Vector const&, std::pair 
const&) const, std::vector > 
const&, std::vector > const&, 
unsigned int)
#5  ./step-37_minimal: dealii::internal::MFWorker >, 
dealii::LinearAlgebra::distributed::Vector, 
dealii::LinearAlgebra::distributed::Vector, Step37::LaplaceOperator<2, 3, double>, 
true>::cell(unsigned int)
#6  /home/sjohnson/AE_beginnings/dealii/lib/libdeal_II.g.so.9.4.0: 
dealii::internal::MatrixFreeFunctions::TaskInfo::loop(dealii::internal::MFWorkerInterface&)
 
const
#7  ./step-37_minimal: void dealii::MatrixFree<2, double, 
dealii::VectorizedArray 
>::cell_loop, 
dealii::LinearAlgebra::distributed::Vector, 
dealii::LinearAlgebra::distributed::Vector >(void (Step37::LaplaceOperator<2, 3, 
double>::*)(dealii::MatrixFree<2, double, dealii::VectorizedArray > const&, dealii::LinearAlgebra::distributed::Vector&, 
dealii::LinearAlgebra::distributed::Vector const&, std::pair 
const&) const, Step37::LaplaceOperator<2, 3, double> const*, 
dealii::LinearAlgebra::distributed::Vector&, 
dealii::LinearAlgebra::distributed::Vector const&, bool) const
#8  ./step-37_minimal: Step37::LaplaceOperator<2, 3, 
double>::apply_add(dealii::LinearAlgebra::distributed::Vector&, 
dealii::LinearAlgebra::distributed::Vector const&) const
#9  ./step-37_minimal: dealii::MatrixFreeOperators::Base<2, 
d

Re: [deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-07-05 Thread Sean Johnson
Okay I think I have implemented what I could of step-75. I currently have 
deal.II compiled without Trilinos and am trying to keep it that way because 
it is compiled without Trilinos on the high powered computer we will do 
runs on later. That can change but would cause a headache for someone else 
so I am just trying to avoid it.

So I created the operator around a MatrixFree object. It allowed me the 
ability to control m() for the matrix. I still have a problem and I went 
back to my old version and this was a problem in both of them. Since in the 
reinit function of the MatrixFree object is given two DoFHandlers, I have a 
system matrix that expects a two component solution vector and rhs. The 
solution vector and rhs are scalars with just one component. I am handing 
both DoFHandlers over just because the computation of the matrix elements 
depend on some variables I have calculated elsewhere with another 
DoFHandler.

Thanks for your time so far. I am still actively working on how to address 
this. If you have any suggestions I am all ears.
I will also work on a minimal example that causes the error.

Thanks for your time again,
Sean Johnson

On Tuesday, June 27, 2023 at 3:19:10 PM UTC-6 Sean Johnson wrote:

> I haven't done step-75 but I will look into it today and take a shot at 
> it. There is nothing special about the way I did it besides that step-37 
> came earlier so I had already done it and was familiar with that method. 
> Thank you for your time and suggestion. I'll give an update probably in a 
> day or so after learning and trying to do step-75.
>
> Big picture goal is we are doing a gravity waves simulation where they 
> implode and form a black hole. Numerically, it has a few variables that 
> have equations for evolving forward in time and then like three that don't 
> but do have elliptic equations that if we know all the variables that have 
> time equations we can then solve them on each time step. Thus the need for 
> a DG DoFHandler for the time equations and a normal CG DoFHandler for the 
> elliptic equation variables.
>
> Thanks again so much for your time,
> Sean Johnson
>
> On Tuesday, June 27, 2023 at 2:02:59 PM UTC-6 peterr...@gmail.com wrote:
>
>> OK. The problem are these lines: 
>> https://github.com/dealii/dealii/blob/8d68b3192ed1c8b928dfce03ca1d615201859904/include/deal.II/matrix_free/operators.h#L1225-L1235.
>>  
>> The number of rows are the sum of the number of DoFs of both attached 
>> DoFHandlers...
>>
>> Personally, I would not use these matrix-free operators but create the 
>> operator myself around a MatrixFree object. Just like in step-75. Would 
>> that be possible?
>>
>> Out of curiosity, what is your goal?
>>
>> Best,
>> PM
>>
>>
>> On Tuesday, June 27, 2023 at 7:38:48 PM UTC+2 sljoh...@gmail.com wrote:
>>
>>> Here is step-37 with minimal changes. All that was changed was in the 
>>> creation of a DG DoFHandler and the fe_system and constrains and what not 
>>> to go along with it. Then of the functions only the LapalceProblem 
>>> setup_system() function was altered and nothing else. It was just altered 
>>> to also be reinit with the dof_handler_DG.
>>>
>>> Obviously the LaplaceOperator in my actual code actually uses variables 
>>> that depend on the DG DoFHandler but that was left out of this example.
>>>
>>> Thank you again so much for your time and for all you guys do for this 
>>> library.
>>>
>>> Thanks,
>>> Sean Johnson
>>>
>>> On Tuesday, June 27, 2023 at 10:58:53 AM UTC-6 Sean Johnson wrote:
>>>
>>>> Yes of course. I can get one with minimal changes made to step-37. Full 
>>>> code do you want the entirety of the changed step-37 code or just the 
>>>> LaplaceProblem class or just the setup_system() function?
>>>>
>>>> On Tuesday, June 27, 2023 at 10:53:04 AM UTC-6 peterr...@gmail.com 
>>>> wrote:
>>>>
>>>>> I'll try to take a look at the issue tomorrow. Could you attach the 
>>>>> full code. I have a feeling what might be an issue. 
>>>>>
>>>>> Peter
>>>>>
>>>>> On Tue, Jun 27, 2023, 18:18 Sean Johnson  wrote:
>>>>>
>>>>>> Okay. Thank you.
>>>>>>
>>>>>> On Tuesday, June 27, 2023 at 10:02:16 AM UTC-6 Wolfgang Bangerth 
>>>>>> wrote:
>>>>>>
>>>>>>> On 6/27/23 09:53, Sean Johnson wrote: 
>>>>>>> > I keep seeing other questions getting at least one response. Is 
>>>>>>> there 
>>>>

Re: [deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-27 Thread Sean Johnson
I haven't done step-75 but I will look into it today and take a shot at it. 
There is nothing special about the way I did it besides that step-37 came 
earlier so I had already done it and was familiar with that method. Thank 
you for your time and suggestion. I'll give an update probably in a day or 
so after learning and trying to do step-75.

Big picture goal is we are doing a gravity waves simulation where they 
implode and form a black hole. Numerically, it has a few variables that 
have equations for evolving forward in time and then like three that don't 
but do have elliptic equations that if we know all the variables that have 
time equations we can then solve them on each time step. Thus the need for 
a DG DoFHandler for the time equations and a normal CG DoFHandler for the 
elliptic equation variables.

Thanks again so much for your time,
Sean Johnson

On Tuesday, June 27, 2023 at 2:02:59 PM UTC-6 peterr...@gmail.com wrote:

> OK. The problem are these lines: 
> https://github.com/dealii/dealii/blob/8d68b3192ed1c8b928dfce03ca1d615201859904/include/deal.II/matrix_free/operators.h#L1225-L1235.
>  
> The number of rows are the sum of the number of DoFs of both attached 
> DoFHandlers...
>
> Personally, I would not use these matrix-free operators but create the 
> operator myself around a MatrixFree object. Just like in step-75. Would 
> that be possible?
>
> Out of curiosity, what is your goal?
>
> Best,
> PM
>
>
> On Tuesday, June 27, 2023 at 7:38:48 PM UTC+2 sljoh...@gmail.com wrote:
>
>> Here is step-37 with minimal changes. All that was changed was in the 
>> creation of a DG DoFHandler and the fe_system and constrains and what not 
>> to go along with it. Then of the functions only the LapalceProblem 
>> setup_system() function was altered and nothing else. It was just altered 
>> to also be reinit with the dof_handler_DG.
>>
>> Obviously the LaplaceOperator in my actual code actually uses variables 
>> that depend on the DG DoFHandler but that was left out of this example.
>>
>> Thank you again so much for your time and for all you guys do for this 
>> library.
>>
>> Thanks,
>> Sean Johnson
>>
>> On Tuesday, June 27, 2023 at 10:58:53 AM UTC-6 Sean Johnson wrote:
>>
>>> Yes of course. I can get one with minimal changes made to step-37. Full 
>>> code do you want the entirety of the changed step-37 code or just the 
>>> LaplaceProblem class or just the setup_system() function?
>>>
>>> On Tuesday, June 27, 2023 at 10:53:04 AM UTC-6 peterr...@gmail.com 
>>> wrote:
>>>
>>>> I'll try to take a look at the issue tomorrow. Could you attach the 
>>>> full code. I have a feeling what might be an issue. 
>>>>
>>>> Peter
>>>>
>>>> On Tue, Jun 27, 2023, 18:18 Sean Johnson  wrote:
>>>>
>>>>> Okay. Thank you.
>>>>>
>>>>> On Tuesday, June 27, 2023 at 10:02:16 AM UTC-6 Wolfgang Bangerth wrote:
>>>>>
>>>>>> On 6/27/23 09:53, Sean Johnson wrote: 
>>>>>> > I keep seeing other questions getting at least one response. Is 
>>>>>> there 
>>>>>> > something else that I should provide in addition to the question or 
>>>>>> that is 
>>>>>> > missing or is there somewhere this question has already been 
>>>>>> addressed that I 
>>>>>> > cannot find? I am really all ears 
>>>>>>
>>>>>> Sean, it's all about who has the expertise to answer questions and 
>>>>>> who has the 
>>>>>> time. I don't know anything about matrix-free stuff, so your 
>>>>>> questions require 
>>>>>> someone else to have the time and expertise. 
>>>>>>
>>>>>> 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+un...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/dealii/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/dealii/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com?utm_medium=email_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/e5bd3146-ae46-4096-ab02-e1da31874850n%40googlegroups.com.


Re: [deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-27 Thread Sean Johnson
Here is step-37 with minimal changes. All that was changed was in the 
creation of a DG DoFHandler and the fe_system and constrains and what not 
to go along with it. Then of the functions only the LapalceProblem 
setup_system() function was altered and nothing else. It was just altered 
to also be reinit with the dof_handler_DG.

Obviously the LaplaceOperator in my actual code actually uses variables 
that depend on the DG DoFHandler but that was left out of this example.

Thank you again so much for your time and for all you guys do for this 
library.

Thanks,
Sean Johnson

On Tuesday, June 27, 2023 at 10:58:53 AM UTC-6 Sean Johnson wrote:

> Yes of course. I can get one with minimal changes made to step-37. Full 
> code do you want the entirety of the changed step-37 code or just the 
> LaplaceProblem class or just the setup_system() function?
>
> On Tuesday, June 27, 2023 at 10:53:04 AM UTC-6 peterr...@gmail.com wrote:
>
>> I'll try to take a look at the issue tomorrow. Could you attach the full 
>> code. I have a feeling what might be an issue. 
>>
>> Peter
>>
>> On Tue, Jun 27, 2023, 18:18 Sean Johnson  wrote:
>>
>>> Okay. Thank you.
>>>
>>> On Tuesday, June 27, 2023 at 10:02:16 AM UTC-6 Wolfgang Bangerth wrote:
>>>
>>>> On 6/27/23 09:53, Sean Johnson wrote: 
>>>> > I keep seeing other questions getting at least one response. Is there 
>>>> > something else that I should provide in addition to the question or 
>>>> that is 
>>>> > missing or is there somewhere this question has already been 
>>>> addressed that I 
>>>> > cannot find? I am really all ears 
>>>>
>>>> Sean, it's all about who has the expertise to answer questions and who 
>>>> has the 
>>>> time. I don't know anything about matrix-free stuff, so your questions 
>>>> require 
>>>> someone else to have the time and expertise. 
>>>>
>>>> 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+un...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/dealii/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/dealii/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com?utm_medium=email_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/795a8c27-cb44-4013-b941-e93ecb41f0c1n%40googlegroups.com.
/* -
 *
 * Copyright (C) 2009 - 2022 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE.md at
 * the top level directory of deal.II.
 *
 * -

 *
 * Authors: Katharina Kormann, Martin Kronbichler, Uppsala University,
 * 2009-2012, updated to MPI version with parallel vectors in 2016
 */


// First include the necessary files from the deal.II library.
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

// This includes the data structures for the efficient implementation of
// matrix-fre

Re: [deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-27 Thread Sean Johnson
Yes of course. I can get one with minimal changes made to step-37. Full 
code do you want the entirety of the changed step-37 code or just the 
LaplaceProblem class or just the setup_system() function?

On Tuesday, June 27, 2023 at 10:53:04 AM UTC-6 peterr...@gmail.com wrote:

> I'll try to take a look at the issue tomorrow. Could you attach the full 
> code. I have a feeling what might be an issue. 
>
> Peter
>
> On Tue, Jun 27, 2023, 18:18 Sean Johnson  wrote:
>
>> Okay. Thank you.
>>
>> On Tuesday, June 27, 2023 at 10:02:16 AM UTC-6 Wolfgang Bangerth wrote:
>>
>>> On 6/27/23 09:53, Sean Johnson wrote: 
>>> > I keep seeing other questions getting at least one response. Is there 
>>> > something else that I should provide in addition to the question or 
>>> that is 
>>> > missing or is there somewhere this question has already been addressed 
>>> that I 
>>> > cannot find? I am really all ears 
>>>
>>> Sean, it's all about who has the expertise to answer questions and who 
>>> has the 
>>> time. I don't know anything about matrix-free stuff, so your questions 
>>> require 
>>> someone else to have the time and expertise. 
>>>
>>> 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+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com?utm_medium=email_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/f58c4206-0b7c-4af6-9b9f-5d5c9410da27n%40googlegroups.com.


Re: [deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-27 Thread Sean Johnson
Okay. Thank you.

On Tuesday, June 27, 2023 at 10:02:16 AM UTC-6 Wolfgang Bangerth wrote:

> On 6/27/23 09:53, Sean Johnson wrote:
> > I keep seeing other questions getting at least one response. Is there 
> > something else that I should provide in addition to the question or that 
> is 
> > missing or is there somewhere this question has already been addressed 
> that I 
> > cannot find? I am really all ears
>
> Sean, it's all about who has the expertise to answer questions and who has 
> the 
> time. I don't know anything about matrix-free stuff, so your questions 
> require 
> someone else to have the time and expertise.
>
> 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/dab3cc77-bd64-445a-82f5-da55b00a812en%40googlegroups.com.


[deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-27 Thread Sean Johnson
I keep seeing other questions getting at least one response. Is there 
something else that I should provide in addition to the question or that is 
missing or is there somewhere this question has already been addressed that 
I cannot find? I am really all ears

On Monday, June 26, 2023 at 11:01:53 AM UTC-6 Sean Johnson wrote:

> I have limited the problem down to matrix-free sizes. The reinit() 
> function seems to tell the matrix-free object to expect to calculate the 
> number of elements that would fit the larger of the two DoFHandler's handed 
> to the reinit() function. However, I need to specify that it should 
> actually match the smaller of the two. Is there a way to accomplish this? I 
> need to pass both DoFHandlers to the reinit() function because the elements 
> of the matrix are calculated using variables that are solved from a 
> hyperbolic equation (thus they have DG elements and a DG DoFHandler) and 
> this specific equation being solved is an elliptic equation and therefore 
> CG elements are used and a CG DoFHandler is used.
>
> Please let me know if this is possible or any work arounds someone else 
> has used.
>
> Thanks,
> Sean Johnson
>
> On Thursday, June 22, 2023 at 2:22:27 PM UTC-6 Sean Johnson wrote:
>
>> This is the setup_system() function that has been changed just for the 
>> system_matrix in step-37.
>> dof_handler and fe are the names of the CG version and the DG versions 
>> end with "_DG"
>>   system_matrix.clear();
>>   mg_matrices.clear_elements();
>>
>>   dof_handler.distribute_dofs(fe);
>>   dof_handler.distribute_mg_dofs();
>>
>>   dof_handler_DG.distribute_mg_dofs();
>>
>>   pcout << "Number of degrees of freedom: " << dof_handler.n_dofs()
>> << std::endl;
>>
>>   const IndexSet locally_relevant_dofs =
>> DoFTools::extract_locally_relevant_dofs(dof_handler);
>>
>>   const IndexSet locally_relevant_dofs_DG =
>> DoFTools::extract_locally_relevant_dofs(dof_handler_DG);
>>
>>   constraints.clear();
>>   constraints.reinit(locally_relevant_dofs);
>>   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
>>   //VectorTools::interpolate_boundary_values(
>> //mapping, dof_handler, 0, Functions::ZeroFunction(), 
>> constraints);
>>   constraints.close();
>>   constraints_DG.clear();
>>   constraints_DG.reinit(locally_relevant_dofs_DG);
>>   DoFTools::make_hanging_node_constraints(dof_handler_DG, 
>> constraints_DG);
>>   constraints_DG.close();
>>
>>   const std::vector *> dof_handlers = 
>> {_handler_DG, _handler};
>>   const std::vector *> 
>> constraints_list = {_DG, };
>>   setup_time += time.wall_time();
>>   time_details << "Distribute DoFs & B.C. (CPU/wall) " << 
>> time.cpu_time()
>><< "s/" << time.wall_time() << 's' << std::endl;
>>   time.restart();
>>   {
>> typename MatrixFree::AdditionalData additional_data;
>> additional_data.tasks_parallel_scheme =
>>   MatrixFree::AdditionalData::none;
>> additional_data.mapping_update_flags =
>>   (update_values | update_gradients | update_JxW_values | 
>> update_quadrature_points);
>> additional_data.mapping_update_flags_boundary_faces =
>>   (update_values | update_JxW_values | update_quadrature_points);
>> std::shared_ptr> system_mf_storage(
>>   new MatrixFree());
>> system_mf_storage->reinit(mapping,
>>   dof_handlers,
>>   constraints_list,
>>   QGauss<1>(fe.degree + 1),
>>   additional_data);
>> system_matrix.initialize(system_mf_storage);
>> system_mf_storage->initialize_dof_vector(alpha_solution,1);
>> system_mf_storage->initialize_dof_vector(system_rhs,1);
>>   }
>>
>> On Thursday, June 22, 2023 at 11:59:31 AM UTC-6 Sean Johnson wrote:
>>
>>> I can further confirm the problem is with what is called in step-37 
>>> mg_matrices. Since in setup the mg_matrices is aware of both the CG 
>>> dof_handler and DG dof_handler it leads to it making a larger size. 
>>> However, the diagonal_inverse vector is setup with the CG dof_handler which 
>>> in turn does not match the mg_matrices size when initializing in the 

[deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-26 Thread Sean Johnson
I have limited the problem down to matrix-free sizes. The reinit() function 
seems to tell the matrix-free object to expect to calculate the number of 
elements that would fit the larger of the two DoFHandler's handed to the 
reinit() function. However, I need to specify that it should actually match 
the smaller of the two. Is there a way to accomplish this? I need to pass 
both DoFHandlers to the reinit() function because the elements of the 
matrix are calculated using variables that are solved from a hyperbolic 
equation (thus they have DG elements and a DG DoFHandler) and this specific 
equation being solved is an elliptic equation and therefore CG elements are 
used and a CG DoFHandler is used.

Please let me know if this is possible or any work arounds someone else has 
used.

Thanks,
Sean Johnson

On Thursday, June 22, 2023 at 2:22:27 PM UTC-6 Sean Johnson wrote:

> This is the setup_system() function that has been changed just for the 
> system_matrix in step-37.
> dof_handler and fe are the names of the CG version and the DG versions end 
> with "_DG"
>   system_matrix.clear();
>   mg_matrices.clear_elements();
>
>   dof_handler.distribute_dofs(fe);
>   dof_handler.distribute_mg_dofs();
>
>   dof_handler_DG.distribute_mg_dofs();
>
>   pcout << "Number of degrees of freedom: " << dof_handler.n_dofs()
> << std::endl;
>
>   const IndexSet locally_relevant_dofs =
> DoFTools::extract_locally_relevant_dofs(dof_handler);
>
>   const IndexSet locally_relevant_dofs_DG =
> DoFTools::extract_locally_relevant_dofs(dof_handler_DG);
>
>   constraints.clear();
>   constraints.reinit(locally_relevant_dofs);
>   DoFTools::make_hanging_node_constraints(dof_handler, constraints);
>   //VectorTools::interpolate_boundary_values(
> //mapping, dof_handler, 0, Functions::ZeroFunction(), 
> constraints);
>   constraints.close();
>   constraints_DG.clear();
>   constraints_DG.reinit(locally_relevant_dofs_DG);
>   DoFTools::make_hanging_node_constraints(dof_handler_DG, 
> constraints_DG);
>   constraints_DG.close();
>
>   const std::vector *> dof_handlers = 
> {_handler_DG, _handler};
>   const std::vector *> 
> constraints_list = {_DG, };
>   setup_time += time.wall_time();
>   time_details << "Distribute DoFs & B.C. (CPU/wall) " << 
> time.cpu_time()
><< "s/" << time.wall_time() << 's' << std::endl;
>   time.restart();
>   {
> typename MatrixFree::AdditionalData additional_data;
> additional_data.tasks_parallel_scheme =
>   MatrixFree::AdditionalData::none;
> additional_data.mapping_update_flags =
>   (update_values | update_gradients | update_JxW_values | 
> update_quadrature_points);
> additional_data.mapping_update_flags_boundary_faces =
>   (update_values | update_JxW_values | update_quadrature_points);
> std::shared_ptr> system_mf_storage(
>   new MatrixFree());
> system_mf_storage->reinit(mapping,
>   dof_handlers,
>   constraints_list,
>   QGauss<1>(fe.degree + 1),
>       additional_data);
> system_matrix.initialize(system_mf_storage);
> system_mf_storage->initialize_dof_vector(alpha_solution,1);
> system_mf_storage->initialize_dof_vector(system_rhs,1);
>   }
>
> On Thursday, June 22, 2023 at 11:59:31 AM UTC-6 Sean Johnson wrote:
>
>> I can further confirm the problem is with what is called in step-37 
>> mg_matrices. Since in setup the mg_matrices is aware of both the CG 
>> dof_handler and DG dof_handler it leads to it making a larger size. 
>> However, the diagonal_inverse vector is setup with the CG dof_handler which 
>> in turn does not match the mg_matrices size when initializing in the 
>> smoother when making the preconditioner.
>>
>> Currently, for system_matrix and mg_matrices I have simply only changed 
>> the reinit() functions to account for a std::vector of DoFHandlers and a 
>> std::vector of AffineConstraints. In addition, this leads to needing to 
>> form a std::vector of MGConstrainedDoFs for the mg_matrices. I thought this 
>> was needed so that I could use the values of the DG variables in the 
>> computation of the system_matrix and mg_matrices. Is there a different way 
>> I should be doing this?
>>
>> On Wednesday, June 21, 2023 at 12:29:11 PM UTC-6 Sean Johnson wrote:
>>
>>> I am tryi

[deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-22 Thread Sean Johnson
This is the setup_system() function that has been changed just for the 
system_matrix in step-37.
dof_handler and fe are the names of the CG version and the DG versions end 
with "_DG"
  system_matrix.clear();
  mg_matrices.clear_elements();

  dof_handler.distribute_dofs(fe);
  dof_handler.distribute_mg_dofs();

  dof_handler_DG.distribute_mg_dofs();

  pcout << "Number of degrees of freedom: " << dof_handler.n_dofs()
<< std::endl;

  const IndexSet locally_relevant_dofs =
DoFTools::extract_locally_relevant_dofs(dof_handler);

  const IndexSet locally_relevant_dofs_DG =
DoFTools::extract_locally_relevant_dofs(dof_handler_DG);

  constraints.clear();
  constraints.reinit(locally_relevant_dofs);
  DoFTools::make_hanging_node_constraints(dof_handler, constraints);
  //VectorTools::interpolate_boundary_values(
//mapping, dof_handler, 0, Functions::ZeroFunction(), 
constraints);
  constraints.close();
  constraints_DG.clear();
  constraints_DG.reinit(locally_relevant_dofs_DG);
  DoFTools::make_hanging_node_constraints(dof_handler_DG, 
constraints_DG);
  constraints_DG.close();

  const std::vector *> dof_handlers = 
{_handler_DG, _handler};
  const std::vector *> constraints_list 
= {_DG, };
  setup_time += time.wall_time();
  time_details << "Distribute DoFs & B.C. (CPU/wall) " << 
time.cpu_time()
   << "s/" << time.wall_time() << 's' << std::endl;
  time.restart();
  {
typename MatrixFree::AdditionalData additional_data;
additional_data.tasks_parallel_scheme =
  MatrixFree::AdditionalData::none;
additional_data.mapping_update_flags =
  (update_values | update_gradients | update_JxW_values | 
update_quadrature_points);
additional_data.mapping_update_flags_boundary_faces =
  (update_values | update_JxW_values | update_quadrature_points);
std::shared_ptr> system_mf_storage(
  new MatrixFree());
system_mf_storage->reinit(mapping,
  dof_handlers,
  constraints_list,
  QGauss<1>(fe.degree + 1),
  additional_data);
system_matrix.initialize(system_mf_storage);
system_mf_storage->initialize_dof_vector(alpha_solution,1);
    system_mf_storage->initialize_dof_vector(system_rhs,1);
  }

On Thursday, June 22, 2023 at 11:59:31 AM UTC-6 Sean Johnson wrote:

> I can further confirm the problem is with what is called in step-37 
> mg_matrices. Since in setup the mg_matrices is aware of both the CG 
> dof_handler and DG dof_handler it leads to it making a larger size. 
> However, the diagonal_inverse vector is setup with the CG dof_handler which 
> in turn does not match the mg_matrices size when initializing in the 
> smoother when making the preconditioner.
>
> Currently, for system_matrix and mg_matrices I have simply only changed 
> the reinit() functions to account for a std::vector of DoFHandlers and a 
> std::vector of AffineConstraints. In addition, this leads to needing to 
> form a std::vector of MGConstrainedDoFs for the mg_matrices. I thought this 
> was needed so that I could use the values of the DG variables in the 
> computation of the system_matrix and mg_matrices. Is there a different way 
> I should be doing this?
>
> On Wednesday, June 21, 2023 at 12:29:11 PM UTC-6 Sean Johnson wrote:
>
>> I am trying to make a matrix free solver like in step-37; however, my 
>> equations involve variables that are solved with a DG DoFHandler. So for 
>> solving I changed within LaplaceProblem::setup_system() the 
>> following functions to account for multiple DoFHandler's: 
>> system_mf_storage->reinit()
>> mg_mf_storage_level->reinit()
>> which led to me having to edit mg_matrices[level 
>> <https://www.dealii.org/current/doxygen/deal.II/grid__out_8cc.html#a9082f945c1d289684d0bcd51ee08e11e>].initialize()
>>  
>> to account for multiple mg_constrained_dofs.
>>
>> All of that was fine until I got to LaplaceProblem::solve(). I cant 
>> edit either of the following functions because they don't allow for 
>> multiple DoFHandler's:
>> MGTransferMatrixFree 
>> <https://www.dealii.org/current/doxygen/deal.II/classMGTransferMatrixFree.html>
>>  
>> mg_transfer(mg_constrained_dofs);
>> mg_transfer.build(dof_handler);
>>
>> I am unsure if that will cause problems but the line that for sure does 
>> cause an error and for the code not to finish is initializing the 
>> mg_smoother:
>> mg_smoother.initialize(mg_matrices, smoothe

[deal.II] Re: step-37 multiple DoFHandler's smoother problems

2023-06-22 Thread Sean Johnson
I can further confirm the problem is with what is called in step-37 
mg_matrices. Since in setup the mg_matrices is aware of both the CG 
dof_handler and DG dof_handler it leads to it making a larger size. 
However, the diagonal_inverse vector is setup with the CG dof_handler which 
in turn does not match the mg_matrices size when initializing in the 
smoother when making the preconditioner.

Currently, for system_matrix and mg_matrices I have simply only changed the 
reinit() functions to account for a std::vector of DoFHandlers and a 
std::vector of AffineConstraints. In addition, this leads to needing to 
form a std::vector of MGConstrainedDoFs for the mg_matrices. I thought this 
was needed so that I could use the values of the DG variables in the 
computation of the system_matrix and mg_matrices. Is there a different way 
I should be doing this?

On Wednesday, June 21, 2023 at 12:29:11 PM UTC-6 Sean Johnson wrote:

> I am trying to make a matrix free solver like in step-37; however, my 
> equations involve variables that are solved with a DG DoFHandler. So for 
> solving I changed within LaplaceProblem::setup_system() the 
> following functions to account for multiple DoFHandler's: 
> system_mf_storage->reinit()
> mg_mf_storage_level->reinit()
> which led to me having to edit mg_matrices[level 
> <https://www.dealii.org/current/doxygen/deal.II/grid__out_8cc.html#a9082f945c1d289684d0bcd51ee08e11e>].initialize()
>  
> to account for multiple mg_constrained_dofs.
>
> All of that was fine until I got to LaplaceProblem::solve(). I cant 
> edit either of the following functions because they don't allow for 
> multiple DoFHandler's:
> MGTransferMatrixFree 
> <https://www.dealii.org/current/doxygen/deal.II/classMGTransferMatrixFree.html>
>  
> mg_transfer(mg_constrained_dofs);
> mg_transfer.build(dof_handler);
>
> I am unsure if that will cause problems but the line that for sure does 
> cause an error and for the code not to finish is initializing the 
> mg_smoother:
> mg_smoother.initialize(mg_matrices, smoother_data);
>
> This always gives me the error:
> An error occurred in line <2684> of file 
>  in 
> function
> void 
> dealii::internal::PreconditionChebyshevImplementation::initialize_preconditioner(const
>  
> MatrixType&, std::shared_ptr >&) [with 
> MatrixType = Brill_Evolution::alpha_Operator<2, 4, float>; VectorType = 
> dealii::LinearAlgebra::distributed::Vector]
> The violated condition was: 
> preconditioner->m() == 0
> Additional information: 
> Preconditioner appears to be initialized but not sized correctly
>
> I believe this is because the mg_matrices has been initialized with 
> multiple dof_handlers but I am unsure how to address this problem and have 
> not been able to find a matrixfree example with multiple dof_handlers.
>
> Thanks,
> Sean Johnson
>

-- 
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/83592226-ce08-48cd-9d1c-63c3007b0148n%40googlegroups.com.


[deal.II] step-37 multiple DoFHandler's smoother problems

2023-06-21 Thread Sean Johnson
I am trying to make a matrix free solver like in step-37; however, my 
equations involve variables that are solved with a DG DoFHandler. So for 
solving I changed within LaplaceProblem::setup_system() the following 
functions to account for multiple DoFHandler's: system_mf_storage->reinit()
mg_mf_storage_level->reinit()
which led to me having to edit mg_matrices[level 
<https://www.dealii.org/current/doxygen/deal.II/grid__out_8cc.html#a9082f945c1d289684d0bcd51ee08e11e>].initialize()
 
to account for multiple mg_constrained_dofs.

All of that was fine until I got to LaplaceProblem::solve(). I cant 
edit either of the following functions because they don't allow for 
multiple DoFHandler's:
MGTransferMatrixFree 
<https://www.dealii.org/current/doxygen/deal.II/classMGTransferMatrixFree.html> 
mg_transfer(mg_constrained_dofs);
mg_transfer.build(dof_handler);

I am unsure if that will cause problems but the line that for sure does 
cause an error and for the code not to finish is initializing the 
mg_smoother:
mg_smoother.initialize(mg_matrices, smoother_data);

This always gives me the error:
An error occurred in line <2684> of file 
 in 
function
void 
dealii::internal::PreconditionChebyshevImplementation::initialize_preconditioner(const
 
MatrixType&, std::shared_ptr >&) [with 
MatrixType = Brill_Evolution::alpha_Operator<2, 4, float>; VectorType = 
dealii::LinearAlgebra::distributed::Vector]
The violated condition was: 
preconditioner->m() == 0
Additional information: 
Preconditioner appears to be initialized but not sized correctly

I believe this is because the mg_matrices has been initialized with 
multiple dof_handlers but I am unsure how to address this problem and have 
not been able to find a matrixfree example with multiple dof_handlers.

Thanks,
Sean Johnson

-- 
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/f62af0a2-c770-4804-8191-df9c1f437607n%40googlegroups.com.


[deal.II] Re: Problem compiling deal.II with CUDA

2023-05-03 Thread Sean Johnson
Thanks! No problem with the documentation not being changed on the compute 
capability. With all the changes being made this is really just the 
smallest thing. Do I need to mark this solved or anything?

On Monday, May 1, 2023 at 6:41:17 AM UTC-6 bruno.t...@gmail.com wrote:

> Hello,
>
> It looks like the documentation is not up to date. We do not support GPU 
> your GPU, deal.II requires compute capability of at least 6.0. Sorry about 
> that. 
>
> Best,
>
> Bruno
>
> On Saturday, April 29, 2023 at 1:46:44 PM UTC-4 sljoh...@gmail.com wrote:
>
>> Hey everyone,
>>
>> Sorry I have been working on this problem for a few day. I believe the 
>> problem is with the mating of deal.II and CUDA because after installing 
>> CUDA it passed all the post installation tests. The error mentions the 
>> atomicAdd() function for doubles which is only for compute capability 6.x+ 
>> according to CUDA and my gpu is 5.0 but deal.II says it only needs compute 
>> capability of 3.2+ so I figure the problem isn't that simple. Below is the 
>> error code and attached are the log files.
>>
>> Thanks for any help ahead of time! And sorry if there is anything I 
>> missed to include as this is my first post on here. I will correct it as 
>> soon as I can when notified. Thank you again!
>>
>> Building CUDA object 
>> source/lac/CMakeFiles/obj_lac_release.dir/cuda_kernels.cu.o
>> nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 
>> 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a 
>> future release (Use -Wno-deprecated-gpu-targets to suppress warning).
>> /home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_atomic.h(54): 
>> error: no instance of overloaded function "atomicAdd" matches the argument 
>> list
>> argument types are: (double *, double)
>>
>> /home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(96):
>>  
>> error: no instance of overloaded function "atomicAdd" matches the argument 
>> list
>> argument types are: (double *, const double)
>>   detected during instantiation of "Number 
>> dealii::LinearAlgebra::CUDAWrappers::kernel::ElemSum::atomic_op(Number
>>  
>> *, Number) [with Number=double]" 
>> /home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(160): 
>> here
>>
>> /home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(132):
>>  
>> error: no instance of overloaded function "atomicAdd" matches the argument 
>> list
>> argument types are: (double *, const double)
>>   detected during instantiation of "Number 
>> dealii::LinearAlgebra::CUDAWrappers::kernel::L1Norm::atomic_op(Number
>>  
>> *, Number) [with Number=double]" 
>> /home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(161): 
>> here
>>
>> /home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(272):
>>  
>> error: no instance of overloaded function "atomicAdd" matches the argument 
>> list
>> argument types are: (double *, const double)
>>   detected during instantiation of "Number 
>> dealii::LinearAlgebra::CUDAWrappers::kernel::DotProduct::atomic_op(Number
>>  
>> *, Number) [with Number=double]" 
>> /home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(175): 
>> here
>>
>> 4 errors detected in the compilation of 
>> "/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu".
>> make[2]: *** [source/lac/CMakeFiles/obj_lac_release.dir/build.make:583: 
>> source/lac/CMakeFiles/obj_lac_release.dir/cuda_kernels.cu.o] Error 1
>> make[1]: *** [CMakeFiles/Makefile2:3790: 
>> source/lac/CMakeFiles/obj_lac_release.dir/all] Error 2
>> make: *** [Makefile:130: all] Error 2
>>
>

-- 
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/c9718683-32ed-48d3-9a85-643011d0f8e3n%40googlegroups.com.


[deal.II] Problem compiling deal.II with CUDA

2023-04-29 Thread Sean Johnson
Hey everyone,

Sorry I have been working on this problem for a few day. I believe the 
problem is with the mating of deal.II and CUDA because after installing 
CUDA it passed all the post installation tests. The error mentions the 
atomicAdd() function for doubles which is only for compute capability 6.x+ 
according to CUDA and my gpu is 5.0 but deal.II says it only needs compute 
capability of 3.2+ so I figure the problem isn't that simple. Below is the 
error code and attached are the log files.

Thanks for any help ahead of time! And sorry if there is anything I missed 
to include as this is my first post on here. I will correct it as soon as I 
can when notified. Thank you again!

Building CUDA object 
source/lac/CMakeFiles/obj_lac_release.dir/cuda_kernels.cu.o
nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 
'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a 
future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_atomic.h(54): 
error: no instance of overloaded function "atomicAdd" matches the argument 
list
argument types are: (double *, double)

/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(96):
 
error: no instance of overloaded function "atomicAdd" matches the argument 
list
argument types are: (double *, const double)
  detected during instantiation of "Number 
dealii::LinearAlgebra::CUDAWrappers::kernel::ElemSum::atomic_op(Number 
*, Number) [with Number=double]" 
/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(160): here

/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(132):
 
error: no instance of overloaded function "atomicAdd" matches the argument 
list
argument types are: (double *, const double)
  detected during instantiation of "Number 
dealii::LinearAlgebra::CUDAWrappers::kernel::L1Norm::atomic_op(Number 
*, Number) [with Number=double]" 
/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(161): here

/home/sjohnson/Downloads/dealii-9.4.1/include/deal.II/lac/cuda_kernels.templates.h(272):
 
error: no instance of overloaded function "atomicAdd" matches the argument 
list
argument types are: (double *, const double)
  detected during instantiation of "Number 
dealii::LinearAlgebra::CUDAWrappers::kernel::DotProduct::atomic_op(Number
 
*, Number) [with Number=double]" 
/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu(175): here

4 errors detected in the compilation of 
"/home/sjohnson/Downloads/dealii-9.4.1/source/lac/cuda_kernels.cu".
make[2]: *** [source/lac/CMakeFiles/obj_lac_release.dir/build.make:583: 
source/lac/CMakeFiles/obj_lac_release.dir/cuda_kernels.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3790: 
source/lac/CMakeFiles/obj_lac_release.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

-- 
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/eb4eb66d-b139-4d5e-b33b-859e9838a119n%40googlegroups.com.
###
#
#  deal.II configuration:
#CMAKE_BUILD_TYPE:   DebugRelease
#BUILD_SHARED_LIBS:  ON
#CMAKE_INSTALL_PREFIX:   /home/sjohnson
#CMAKE_SOURCE_DIR:   /home/sjohnson/Downloads/dealii-9.4.1
#(version 9.4.1)
#CMAKE_BINARY_DIR:   /home/sjohnson/Downloads/dealii-9.4.1/build
#CMAKE_CXX_COMPILER: GNU 9.4.0 on platform Linux x86_64
#/usr/bin/c++
#C++ language standard:  C++14
#CMAKE_C_COMPILER:   /usr/bin/cc
#CMAKE_Fortran_COMPILER: /usr/bin/gfortran
#CMAKE_GENERATOR:Unix Makefiles
#
#  Base configuration (prior to feature configuration):
#DEAL_II_CXX_FLAGS:-fPIC -Wall -Wextra -Wmissing-braces -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wsuggest-override -Wswitch -Wsynth -Wwrite-strings -Wno-placement-new -Wno-deprecated-declarations -Wno-literal-suffix -Wno-psabi -Wno-class-memaccess -fopenmp-simd
#DEAL_II_CXX_FLAGS_RELEASE:-O2 -funroll-loops -funroll-all-loops -fstrict-aliasing -Wno-unused-local-typedefs
#DEAL_II_CXX_FLAGS_DEBUG:  -O0 -ggdb -Wa,--compress-debug-sections
#DEAL_II_LINKER_FLAGS: -rdynamic -fuse-ld=gold -lpthread -fopenmp
#DEAL_II_LINKER_FLAGS_RELEASE: 
#DEAL_II_LINKER_FLAGS_DEBUG:   -ggdb
#DEAL_II_DEFINITIONS:  
#DEAL_II_DEFINITIONS_RELEASE:  NDEBUG
#DEAL_II_DEFINITIONS_DEBUG: