Hello,

I am looking to use deal.ii to generate an assembled sparse matrix from a 
physical problem, but would like to use my own solver software. For 
example, if you consider the step-9, 

In AdvectionProblem::solve() function I would get the system-matrix, 
system_rhs from deal.ii's data structures and use them to get the solution 
vector and convert them back to deal.ii's type for 
hanging_node_constraints.distribute(solution) function.

Therefore, I would like to replace


     SolverControl           solver_control (1000, 1e-12);
     SolverBicgstab<>        bicgstab (solver_control);

     PreconditionJacobi<> preconditioner;
     preconditioner.initialize(system_matrix, 1.0);

     bicgstab.solve (system_matrix, solution, system_rhs,
                     preconditioner);

with my own solver. The purpose is to test our solver and be able to 
interface it with deal.ii. As I see it, I need:

1. the system_matrix to be converted to CSR format. I do this by using the 
member variables of the system_matrix, namely cols, which again has 
rowstart, colnums, so I should be able to access the column indices and row 
pointers by system_matrix.cols->colnums.get() and 
system_matrix.cols->rowstart.get() and the values by 
system_matrix.val.get(). The size of the matrix by system_matrix.m() and 
system_matrix.n() and the rhs values by system_rhs.values.get(). But I run 
into problems when I do this. I get the following error:

error: ‘dealii::SmartPointer<const dealii::SparsityPattern, 
dealii::SparseMatrix<double> > dealii::SparseMatrix<double>::cols’ is 
private within 
this context
     auto A = mtx::create(exec,gko::dim<2>(system_matrix.cols->cols),
                                           ~~~~~~~~~~~~~~^~~~
/home/pratik/Documents/10Softwares/dealii/install_dealii/include/deal.II/lac/sparse_matrix.h:1615:61:
 
note: declared private here
   SmartPointer<const SparsityPattern,SparseMatrix<number> > cols;

Essentially, it says the the member variable cols within system_matrix is 
private. Is there any other way or a remedy to this ? How do I access this 
matrix and rhs data ?

I am sorry for the long post. I wanted to give as much information as 
possible.

Thank you,
Pratik.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to