[deal.II] Re: Convergence failure in penalty method implementation

2023-07-17 Thread sabyasachi chatterjee
Hello, I have come up with a solution, although there may be other ones using iterative solvers. I changed the solver to SparseDirectMUMPS (from tutorial 62). It seems to have stopped generating the error. Note that my stiffness matrix is not symmetric ( system_matrix.is_symmetric() is retur

Re: [deal.II] adding openmp in CMakeLists.txt

2023-07-17 Thread Matthias Maier
- Most of your find package calls have to come after the project(...) call. deal.II is a bit special - we call find_package(deal.II) before project() so that the compiler is configured to be the same as the one used for deal.II. - Also you only need to call target_link_libraries() with

Re: [deal.II] change the value of item modul

2023-07-17 Thread Wolfgang Bangerth
On 7/17/23 16:19, Lance Zhang wrote: terminate called after throwing an instance of 'dealii::ParameterHandler::ExcNoSubsection'   what(): An error occurred in line <1848> of file <./source/base/parameter_handler.cc> in function     vo

Re: [deal.II] change the value of item modul

2023-07-17 Thread Lance Zhang
Hello Wolfgang, The error shows below: [ 66%] Built target cook_membrane [100%] Run cook_membrane with Release configuration /// // Test the GCMMA algorithm /// terminate called after throwing an insta

Re: [deal.II] change the value of item modul

2023-07-17 Thread Wolfgang Bangerth
On 7/17/23 15:57, Lance Zhang wrote: The information above is what I wrote,but the errors come out . Lance -- nobody can help you if you don't say what exactly the error is. Carefully reading the error message often is 50% of the process of figuring out what the problem is. Best W. -- --

[deal.II] change the value of item modul

2023-07-17 Thread Lance Zhang
Hello, I would like to change the value ofset Shear modulus to 1e6 using a parameter in function. so I can control the value of modulus and this parameter will be used and changed in each iteration of loop. There are two ideas 1st)I want to change the value of modulus and the new value wi

[deal.II] adding openmp in CMakeLists.txt

2023-07-17 Thread Lance Zhang
Hello everyone, I have one problem when I tried to add openmp lib to CMakeLists.txt to use parallel functionality. May I know how I could add openmp lib? And one more question,I wrote two code files which are called gcmma and mma,may I know how could I add these two files in this CMakeLists as

Re: [deal.II] Re: Issue on CUDA code

2023-07-17 Thread Bruno Turcksin
Giuseppe, We totally rewrote the GPU matrix-free framework on the latest release of deal.II (version 9.5). One of the advantages is that you can now write/debug the code on the CPU and then switch to run the code on the GPU. The new code is not 100% backward compatible but the changes are pretty s

Re: [deal.II] Re: Issue on CUDA code

2023-07-17 Thread giuseppe orlando
Dear Bruno, thank you very much. That was the issue with the matrix-based version. I take the opportunity for another question (sorry in advance to bother). I also tried to implement a matrix-free version of the same problem, exploiting therefore all the routines such as 'assemble_rhs' and deleg

Re: [deal.II] Re: Issue on CUDA code

2023-07-17 Thread Bruno Turcksin
Giuseppe, The CUDA::Handle needs to live longer than the sparse matrix but in your code it goes out-of-scope at the end of assemble_system(). I know the same code works with assemble_matrix but it only works "by chance" because nothing wrote over the memory. I don't know if that's the only proble

[deal.II] Re: Issue on CUDA code

2023-07-17 Thread giuseppe orlando
Here, you can find the two codes. 'SBR_GPU' is the one that arrives up to the end, whereas 'SBR_GPU_WRONG' is the one that stops with the error described above once I call 'output_results'. If the code is too long and can be helpful, I could try to reduce it avoiding ParameterHandler and other

[deal.II] Re: Issue on CUDA code

2023-07-17 Thread Bruno Turcksin
Giuseppe, It's hard to tell what's wrong without seeing the code. Best, Bruno On Monday, July 17, 2023 at 9:04:42 AM UTC-4 gius...@gmail.com wrote: > Hello everyone, > I'm writing this post to ask some help for a CUDA code. I have implemented > a matrix-based CUDA coda for the so-called solid

[deal.II] Issue on CUDA code

2023-07-17 Thread giuseppe orlando
Hello everyone, I'm writing this post to ask some help for a CUDA code. I have implemented a matrix-based CUDA coda for the so-called solid body rotation, namely a time dependent advection problem. In my first implementation, I encapulased the computation of the matrix and of the right-hand side

[deal.II] Re: Error evaluating derivative of abs() function using symbolic differentiation

2023-07-17 Thread Bruno Turcksin
Vinayak, The error is pretty explicit, the function is not implemented in SymEngine. Maybe it is fixed in a newer version of SymEngine. If it is not, you will need to change the formulation of your equation. Best, Bruno On Monday, July 17, 2023 at 3:51:24 AM UTC-4 vinay...@gmail.com wrote: >

[deal.II] Error evaluating derivative of abs() function using symbolic differentiation

2023-07-17 Thread Vinayak Vijay
Hello, I am trying to differentiate and then evaluate a function with abs(). As a simple example, consider the function to be f(x) = abs(x). I use the following code to first define the symbolic function and then try to evaluate its derivative: double x = -2; Differentiation::SD::Expression

Re: [deal.II] Integrate difference isn't picking on the

2023-07-17 Thread Abbas Ballout
YES. Would take me a while but I ll do it. Be prepared for many questions. On Monday, July 17, 2023 at 2:44:01 AM UTC+2 Wolfgang Bangerth wrote: > On 7/16/23 07:22, Abbas Ballout wrote: > > I get this error when I call the > exact_solution_vector_function.gradient(p1): > > !ERROR Message: > >