@@ -28,9 +28,14 @@ class PoissonProblem : public PDESystemInterface<dim,spacedim, PoissonProblem<di
2828 LinearOperator<LATrilinos::VectorType> &,
2929 LinearOperator<LATrilinos::VectorType> &) const ;
3030
31+ void compute_system_operators (const std::vector<shared_ptr<LAPETSc::BlockMatrix> >,
32+ LinearOperator<LAPETSc::VectorType> &,
33+ LinearOperator<LAPETSc::VectorType> &,
34+ LinearOperator<LAPETSc::VectorType> &) const ;
35+
3136private:
3237 mutable shared_ptr<TrilinosWrappers::PreconditionJacobi> preconditioner;
33-
38+ mutable shared_ptr<PETScWrappers::PreconditionJacobi> PETSc_preconditioner;
3439};
3540
3641template <int dim, int spacedim, typename LAC>
@@ -120,4 +125,34 @@ PoissonProblem<dim,spacedim,LAC>::compute_system_operators(const std::vector<sha
120125 });
121126}
122127
128+ template <int dim, int spacedim, typename LAC>
129+ void
130+ PoissonProblem<dim,spacedim,LAC>::compute_system_operators(const std::vector<shared_ptr<LAPETSc::BlockMatrix> > matrices,
131+ LinearOperator<LAPETSc::VectorType> &system_op,
132+ LinearOperator<LAPETSc::VectorType> &prec_op,
133+ LinearOperator<LAPETSc::VectorType> &) const
134+ {
135+
136+ // PETSc_preconditioner.reset (new PETScWrappers::PreconditionJacobi());
137+ // PETSc_preconditioner->initialize(matrices[0]->block(0,0));
138+ //
139+ // auto A = linear_operator<LAPETSc::VectorType::BlockType>( matrices[0]->block(0,0) );
140+ //
141+ // LinearOperator<LAPETSc::VectorType::BlockType> P_inv;
142+ //
143+ // P_inv = A; //linear_operator<LAPETSc::VectorType::BlockType>(matrices[0]->block(0,0), *PETSc_preconditioner);
144+ //
145+ // auto P00 = P_inv;
146+ //
147+ // // ASSEMBLE THE PROBLEM:
148+ // system_op = block_operator<1, 1, LAPETSc::VectorType>({{
149+ // {{ A }}
150+ // }
151+ // });
152+ //
153+ // prec_op = block_operator<1, 1, LAPETSc::VectorType>({{
154+ // {{ P00}} ,
155+ // }
156+ // });
157+ }
123158#endif
0 commit comments