My question is, I want to use the eigenvalue problem solving capability of armadillo in my code. However, my matrix type is of BlockSparseMatrix in dealii. How do I go about using my BlockSparseMatrix with the available armadillo functions that use sp_mat type matrices <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Farma.sourceforge.net%2Fdocs.html%23SpMat&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C3c0f13141aa44d63d86808d8a7fd509e%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637444053733683541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oAIyMJ24BSpj%2Ba%2FLVuLeQKBkCsjBL%2FYtzXXoeOBV00I%3D&reserved=0>? One idea that I thought was to print my block_sparse_matrix using the function block_write() <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dealii.org%2Fcurrent%2Fdoxygen%2Fdeal.II%2FclassSparseMatrix.html%23a8b32b99a054482f06fc026248c27bb74&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C3c0f13141aa44d63d86808d8a7fd509e%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637444053733693536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xdRe1JdGjZP9Lqs6bvluJjwMLhXnoJjOSgyczMfjPOc%3D&reserved=0> that prints the dealii Sparse_matrix in a binary format. However, I am not able to read that file using armadillo's functionality to load binary files <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Farma.sourceforge.net%2Fdocs.html%23save_load_mat&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7C3c0f13141aa44d63d86808d8a7fd509e%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637444053733693536%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Nbr5JZGjiCC7fx%2FMfGPvl6p0Ji39zLFeeW9Wv8aaAi8%3D&reserved=0>.

Just write a function that copies the data from one object to another. You can iterate over deal.II matrix entries, and then you just need to figure out how Armadillo wants its matrices filled.

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3b64f36b-70fc-762d-e9c2-e5e3c6f28208%40colostate.edu.

Reply via email to