Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Matthias Maier
In the debugger after you ran with the command »r« could you please try to generate a back trace with »bt«? (gdb) r ... (gdb) bt ... Best, Matthias On Thu, Jun 22, 2023, at 17:12 CDT, Mathieu wrote: > See ldd.txt for the output of > $ ldd ./step-1 > and gdb.txt for the output of > $ gdb ./s

Re: [deal.II] Sparsity pattern discrepancy when applying constraints using Affine constraints

2023-06-22 Thread Wolfgang Bangerth
On 6/12/23 02:35, Vinayak Vijay wrote: As per the output, I expect that columns 18-23 in rows 12-17 should be non-zero and vice versa. That is, the non-zero entries due to the above constraints should have been as highlighted in green in Image2.png. However, clearly, in Image2.png I see that

Re: [deal.II] Linearize the weak formulation - possible with tensors?

2023-06-22 Thread Wolfgang Bangerth
On 6/22/23 04:06, 'Jost Arndt' via deal.II User Group wrote: N_{i,j} F, with N_{i,j,k} = (\phi_i \phi_k, \phi_j) ? This would be a third order tensor. It would be sparse, because only those entries ijk are nonzero where phi_i, phi_j, and phi_k overlap. But that would still be quite a lot of

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Mathieu
See ldd.txt for the output of $ ldd ./step-1 and gdb.txt for the output of $ gdb ./step-1 Does this help? Matthias Maier schrieb am Donnerstag, 22. Juni 2023 um 23:28:16 UTC+2: > The most likely issue will be a "symbol clash" either due to ABI > incompatible versions of the same external shar

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Matthias Maier
The most likely issue will be a "symbol clash" either due to ABI incompatible versions of the same external shared library linked into the executable, or due to the matlab shared library you are linking against containing these. Can you send us the output of $ ldd executable (for a faulty one)?

Re: [deal.II] inverse matrix of matrix with dealii::BlockSparseMatrix

2023-06-22 Thread Wolfgang Bangerth
On 6/22/23 14:00, Lance Zhang wrote: May I know if there is any method which can be used for  adjoint sensitivity method? What is the connection between adjoint sensitivities and inverse matrices? In general, if you ever find that you want to compute something like y = A^{-1} x you never d

[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

Re: [deal.II] inverse matrix of matrix with dealii::BlockSparseMatrix

2023-06-22 Thread Lance Zhang
Hello Wolfgang, thanks for your message. May I know if there is any method which can be used for adjoint sensitivity method? Best regards Lance On Thursday, June 22, 2023 at 7:29:18 PM UTC+2 Wolfgang Bangerth wrote: > On 6/22/23 06:35, Lance Zhang wrote: > > > > May I know whether there is

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Matthias Maier
On Thu, Jun 22, 2023, at 04:13 CDT, Mathieu wrote: > Good point to narrow down the problem. > I modified step-1 so that the main function only calls matlab via > callFevalsqrt(). > This works fine, even if I use the mpi compiler mentioned in my original > post. > However, if I just add a sec

[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 no

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Wolfgang Bangerth
On 6/22/23 03:13, Mathieu wrote: Any idea why adding any dealii members/functions causes a segfault in startMatlab() ? May I have to pass some compiler flags to cmake, given that it works with the default compiler? I have no experience using Matlab, much less linking to it. I think you need

Re: [deal.II] inverse matrix of matrix with dealii::BlockSparseMatrix

2023-06-22 Thread Wolfgang Bangerth
On 6/22/23 06:35, Lance Zhang wrote: May I know whether there is any other method to change the matrix with data type BlockSparseMatrix into a matrix with BlockSparseMatrix? No. The inverse of a sparse matrix is, in general, not sparse. For all problems of a realistic size, even if you can s

Re: [deal.II] Re: matrix multiply matrix

2023-06-22 Thread Wolfgang Bangerth
On 6/22/23 10:31, Lance Zhang wrote:   BlockSparseMatrix output_vector; Lance: The function you are trying to call wants a vector as first argument. You name that variable 'output_vector', but it is not in fact a vector: it is a block sparse matrix. That can't work. Best W. -- ---

[deal.II] Re: matrix multiply matrix

2023-06-22 Thread Lance Zhang
Hello , I changed the code into : BlockSparseMatrix output_vector; SparseDirectUMFPACK A_direct; A_direct.initialize(solid_3d.tangent_matrix.block(solid_3d.u_dof,solid_3d.u_dof)); A_direct.vmult(output_vector.block(solid_3d.u_dof), solid_3d.system_rhs.block(solid_3

[deal.II] Re: matrix multiply matrix

2023-06-22 Thread Lance Zhang
the code is related to cook_membrane.cc. On Thursday, June 22, 2023 at 6:00:55 PM UTC+2 Lance Zhang wrote: > Hello , > > When I use vmult to multiply matrix with vector,I found error information: > Error information: > BOOST_HEADER_DEPRECATED("") > | ^~~ > /usr/share/do

[deal.II] matrix multiply matrix

2023-06-22 Thread Lance Zhang
Hello , When I use vmult to multiply matrix with vector,I found error information: Error information: BOOST_HEADER_DEPRECATED("") | ^~~ /usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc: In function ‘int main(int, char**)’: /usr/share/doc/libdeal.ii

[deal.II] Re: inverse matrix of matrix with dealii::BlockSparseMatrix in file cook_membrane.cc

2023-06-22 Thread Lance Zhang
Hello, The code is related to the file cook_membrane.cc. I added the content below in main function > double **get_matrix=new double*[get_rows]; for(int i=0;i >::operator() (j=24, i=0, this=0x7fffdde8) at /usr/include/deal.II/

[deal.II] inverse matrix of matrix with dealii::BlockSparseMatrix

2023-06-22 Thread Lance Zhang
Hello, Currently, I met one problem when I calculate the inverse matrix with datatype of class dealii::BlockSparseMatrix. I searched the website of dealii for the method,but it seems there is no method to get the inverse matrix in BlockSparseMatrix. May I know whether there is any other method

Re: [deal.II] Linearize the weak formulation - possible with tensors?

2023-06-22 Thread 'Jost Arndt' via deal.II User Group
Hi Wolfgang, thanks for your quick response and yes, I tried to indeed ask for the most elegant and deal.ii-native-way to rewrite (f*g, \phi), if f and g are finite element approximations of the functions I am trying to find and \phi (for all \phi) are the test functions. To clarify: In Tutori

[deal.II] Post-doc position at the University of Parma, Italy

2023-06-22 Thread Francesco Freddi
Dear all, There is an opening call for a two year post-doc position at the University of Parma, Italy within the project TWYRES: a digital twin for fracture and fatigue simulations in tyres. The broad scope of the work includes: — Phase-field formulation for fracture and fatigue in elast

Re: [deal.II] linking dealii (compiled with MPI) to MATLAB engine results in segmentation fault

2023-06-22 Thread Mathieu
"I don't know whether anyone has run into exactly this problem. What happens if you write a small program that does not use deal.II at all, but uses the uses the cmake scripts of one of the deal.II tutorial programs? That is, you take one of the deal.II tutorials, and replace the entire code of t