Dear Bruno,

Thank you  for your response.

On Friday, February 14, 2020 at 2:34:41 PM UTC+1, Bruno Turcksin wrote:
>
> Paras,
>
> You could try to use SuperLU_MT (see 
> https://portal.nersc.gov/project/sparse/superlu/) but we don't have 
> wrapper for it. The Krylov solver in deal.II are multithreaded but the 
> preconditioners are not. What you can try is to use deal.II solvers and 
> STRUMPACK (https://github.com/pghysels/STRUMPACK) for the preconditioner 
> but again we don't have wrapper for it. 
>
> Best,
>
> Bruno
>


A bit more search let to the fact that the SuperLu-MT solver is also 
available in Trilinos-Ameso2 package (see 
https://docs.trilinos.org/latest-release/packages/amesos2/doc/html/classAmesos2_1_1Superlumt.html#a102812eafbb572475b7330b825809b09).
 


The current code uses dealii::SparseMatrix<double> and 
dealii::Vector<double> objects to store the system matrix and, the solution 
and rhs vectors respectively.

In order to test it out, my idea was to use a 
dealii::TrilinosWrappers::SparseMatrix (which would be reinit from the 
already assembled dealii::SparseMatrix) and then extract the underlying 
matrix (using the TrilinosWrappers::SparseMatrix::trilinos_matrix() 
function) for use with the Superlu-MT solver. This works fine.

For the vectors (solution & rhs), the idea was to copy the values from the 
dealii::Vector to dealii::LinearAlgebra::EpetraWrappers::Vector. As an 
intermediate step I first copy the dealii::Vector to 
dealii::LinearAlgebra::Vector<doule> using the constructor : 
https://www.dealii.org/current/doxygen/deal.II/classLinearAlgebra_1_1Vector.html#af441b2c23134f8e6e08c833f918888a2.
 
This works fine. However, when I try to call 
dealii::LinearAlgebra::EpetraWrappers::Vector::reinit(dealii::LinearAlgebra::Vector<doule>)
 
the following error occurs:

An error occurred in line <85> of file 
</opt/spack/var/spack/stage/dealii-9.0.1-ssxm6qr7mlmymdmjssazlr4s32qar5cv/dealii-9.0.1/source/lac/trilinos_epetra_vector.cc>
 
in function
    virtual void 
dealii::LinearAlgebra::EpetraWrappers::Vector::reinit(const 
dealii::LinearAlgebra::VectorSpaceVector<double>&, bool)
The violated condition was: 
    dynamic_cast<const Vector *>(&V)!=nullptr
Additional information: 
    (none)

Stacktrace:
-----------
#0  
/opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/dealii-9.0.1-ssxm6qr7mlmymdmjssazlr4s32qar5cv/lib/libdeal_II.g.so.9.0.1:
 
dealii::LinearAlgebra::EpetraWrappers::Vector::reinit(dealii::LinearAlgebra::VectorSpaceVector<double>
 
const&, bool)
#1  
/calculate/Paras_Work/PhD_Work/FRASCAL-CODE/MNC-Frac/_build/libmncfrac.so: 
std::pair<unsigned int, double> mncfrac::Solve_linearEquationSystem<2u, 
double>(mncfrac::LinearAlgebraItems<double>&, 
mncfrac::buildingblocks::inputreader::LinearSolverParameters const&, 
dealii::Vector<double>&)
#2  ./variants/homogenization: mncfrac::homogenization::RVE<2u, 
double>::Solve_timeStep(dealii::Tensor<2, 2, double> const&, 
mncfrac::utilities::BoundaryConditionType const&, dealii::Vector<double>&)
#3  ./variants/homogenization: mncfrac::homogenization::RVE<2u, 
double>::Homogenize(dealii::Tensor<2, 2, double> const&, 
mncfrac::utilities::BoundaryConditionType)
#4  ./variants/homogenization: main


I could not understand why does the conversion fails? Could you please help 
me understand where am I doing wrong. Any better alternatives you would 
suggest?

It is clear that copying matrices and vectors for each solver call is 
probably not very efficient, but this is just for trying out the solver.


Best regards,
Paras

-- 
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/9384e043-e49c-42e6-b72b-a08328addb62%40googlegroups.com.

Reply via email to