Dear all,
I am trying to port the Trilinos examples, for instance Step-31, to PETSc.
I am finding some difficulties, though, in the block matrix class, it seems
a little bit different from Trilinos. In this function:
template <int dim>
void BoussinesqFlowProblem<dim>::solve()
{
std::cout << " Solving..." << std::endl;
{
const LinearSolvers::InverseMatrix<PETScWrappers::SparseMatrix,
PETScWrappers::PreconditionICC>
mp_inverse(stokes_preconditioner_matrix.block(1, 1),
*Mp_preconditioner);
the LinearSolvers::InverseMatrix object can't be initialized
error: no matching constructor for initialization of 'const
LinearSolvers::InverseMatrix<PETScWrappers::SparseMatrix,
PETScWrappers::PreconditionICC>'
note: candidate constructor not viable: no known conversion from
'dealii::BlockMatrixBase<dealii::PETScWrappers::MPI::SparseMatrix>::BlockType'
(aka 'dealii::PETScWrappers::MPI::SparseMatrix') to 'const
dealii::SparseMatrix<double>' for 1st argument
As I didn't find a 1:1 correspondence between the two namespaces, I've
resorted to remove Trilinos classes as best as I could, for instance,
TrilinosWrappers::BlockSparseMatrix exists but in PETSc there is only
PETScWrappers::MPI::BlockSparseMatrix that I know of. And the two seem to
be not exactly equivalent.
The complete Trilinos/PETSc variables are the following:
// ORIGINAL TRILINOS
TrilinosWrappers::BlockSparseMatrix stokes_matrix;
TrilinosWrappers::BlockSparseMatrix stokes_preconditioner_matrix;
TrilinosWrappers::MPI::BlockVector stokes_solution;
TrilinosWrappers::MPI::BlockVector old_stokes_solution;
TrilinosWrappers::MPI::BlockVector stokes_rhs;
TrilinosWrappers::SparseMatrix temperature_mass_matrix;
TrilinosWrappers::SparseMatrix temperature_stiffness_matrix;
TrilinosWrappers::SparseMatrix temperature_matrix;
TrilinosWrappers::MPI::Vector temperature_solution;
TrilinosWrappers::MPI::Vector old_temperature_solution;
TrilinosWrappers::MPI::Vector old_old_temperature_solution;
TrilinosWrappers::MPI::Vector temperature_rhs;
std::shared_ptr<TrilinosWrappers::PreconditionAMG> Amg_preconditioner;
std::shared_ptr<TrilinosWrappers::PreconditionIC> Mp_preconditioner;
// NEW VARIABLES WITH PETSC
PETScWrappers::MPI::BlockSparseMatrix stokes_matrix;
PETScWrappers::MPI::BlockSparseMatrix stokes_preconditioner_matrix;
PETScWrappers::MPI::BlockVector stokes_solution;
PETScWrappers::MPI::BlockVector old_stokes_solution;
PETScWrappers::MPI::BlockVector stokes_rhs;
PETScWrappers::SparseMatrix temperature_mass_matrix;
PETScWrappers::SparseMatrix temperature_stiffness_matrix;
PETScWrappers::SparseMatrix temperature_matrix;
PETScWrappers::MPI::Vector temperature_solution;
PETScWrappers::MPI::Vector old_temperature_solution;
PETScWrappers::MPI::Vector old_old_temperature_solution;
PETScWrappers::MPI::Vector temperature_rhs;
std::shared_ptr<PETScWrappers::PreconditionILU> Amg_preconditioner;
std::shared_ptr<PETScWrappers::PreconditionICC> Mp_preconditioner;
What classes am I missing here?
Thanks!
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/f3c8d6c0-b094-4a75-8905-cda229410544%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.