106class OperatorBase :
public dealii::Subscriptor
109 typedef OperatorBase<dim, Number, n_components> This;
111 typedef dealii::LinearAlgebra::distributed::Vector<Number> VectorType;
112 typedef std::pair<unsigned int, unsigned int> Range;
113 typedef CellIntegrator<dim, n_components, Number> IntegratorCell;
114 typedef FaceIntegrator<dim, n_components, Number> IntegratorFace;
116 static unsigned int const dimension = dim;
117 static unsigned int const vectorization_length = dealii::VectorizedArray<Number>::size();
119 typedef dealii::LAPACKFullMatrix<Number> LAPACKMatrix;
121 typedef dealii::FullMatrix<dealii::TrilinosScalar> FullMatrix_;
125 virtual ~OperatorBase()
127 if(data.sparse_matrix_type == SparseMatrixType::PETSc)
129#ifdef DEAL_II_WITH_PETSC
130 if(system_matrix_petsc.m() > 0)
132 PetscErrorCode ierr = VecDestroy(&petsc_vector_dst);
133 AssertThrow(ierr == 0, dealii::ExcPETScError(ierr));
134 ierr = VecDestroy(&petsc_vector_src);
135 AssertThrow(ierr == 0, dealii::ExcPETScError(ierr));
145 set_time(
double const time)
const;
153 dealii::AffineConstraints<Number>
const &
154 get_affine_constraints()
const;
156 dealii::MatrixFree<dim, Number>
const &
157 get_matrix_free()
const;
160 get_dof_index()
const;
163 get_quad_index()
const;
170 operator_is_singular()
const;
173 vmult(VectorType & dst, VectorType
const & src)
const;
176 vmult_add(VectorType & dst, VectorType
const & src)
const;
179 vmult_interface_down(VectorType & dst, VectorType
const & src)
const;
182 vmult_add_interface_up(VectorType & dst, VectorType
const & src)
const;
184 dealii::types::global_dof_index
187 dealii::types::global_dof_index
191 el(
unsigned int const,
unsigned int const)
const;
194 is_empty_locally()
const;
197 initialize_dof_vector(VectorType & vector)
const;
204 set_inhomogeneous_boundary_values(VectorType & solution)
const;
207 set_constrained_dofs_to_zero(VectorType & vector)
const;
210 calculate_inverse_diagonal(VectorType & diagonal)
const;
217 initialize_block_diagonal_preconditioner(
bool const initialize)
const;
224 update_block_diagonal_preconditioner()
const;
236#ifdef DEAL_II_WITH_TRILINOS
238 init_system_matrix(dealii::TrilinosWrappers::SparseMatrix & system_matrix,
239 MPI_Comm
const & mpi_comm)
const;
242 calculate_system_matrix(dealii::TrilinosWrappers::SparseMatrix & system_matrix)
const;
248#ifdef DEAL_II_WITH_PETSC
250 init_system_matrix(dealii::PETScWrappers::MPI::SparseMatrix & system_matrix,
251 MPI_Comm
const & mpi_comm)
const;
254 calculate_system_matrix(dealii::PETScWrappers::MPI::SparseMatrix & system_matrix)
const;
263 get_constant_modes(std::vector<std::vector<bool>> & constant_modes,
264 std::vector<std::vector<double>> & constant_modes_values)
const;
273 apply(VectorType & dst, VectorType
const & src)
const;
279 apply_add(VectorType & dst, VectorType
const & src)
const;
282 assemble_matrix_if_necessary()
const;
289 apply_matrix_based(VectorType & dst, VectorType
const & src)
const;
295 apply_matrix_based_add(VectorType & dst, VectorType
const & src)
const;
312 rhs(VectorType & dst)
const;
318 rhs_add(VectorType & dst)
const;
334 evaluate(VectorType & dst, VectorType
const & src)
const;
340 evaluate_add(VectorType & dst, VectorType
const & src)
const;
346 calculate_diagonal(VectorType & diagonal)
const;
349 add_diagonal(VectorType & diagonal)
const;
355 add_block_diagonal_matrices(std::vector<LAPACKMatrix> & matrices)
const;
358 apply_inverse_block_diagonal_matrix_based(VectorType & dst, VectorType
const & src)
const;
366 initialize_block_diagonal_preconditioner_matrix_free(
bool const initialize)
const;
371 update_block_diagonal_preconditioner_matrix_free()
const;
375 initialize_block_diagonal_preconditioner_matrix_based(
bool const initialize)
const;
379 update_block_diagonal_preconditioner_matrix_based()
const;
382 apply_add_block_diagonal_elementwise(
unsigned int const cell,
383 dealii::VectorizedArray<Number> *
const dst,
384 dealii::VectorizedArray<Number>
const *
const src,
385 unsigned int const problem_size)
const;
391 compute_factorized_additive_schwarz_matrices()
const;
394 apply_inverse_additive_schwarz_matrices(VectorType & dst, VectorType
const & src)
const;
398 reinit(dealii::MatrixFree<dim, Number>
const & matrix_free,
399 dealii::AffineConstraints<Number>
const & constraints,
403 reinit_cell(IntegratorCell & integrator,
unsigned int const cell)
const;
406 reinit_face(IntegratorFace & integrator_m,
407 IntegratorFace & integrator_p,
408 unsigned int const face)
const;
411 reinit_boundary_face(IntegratorFace & integrator_m,
unsigned int const face)
const;
414 reinit_face_cell_based(IntegratorFace & integrator_m,
415 IntegratorFace & integrator_p,
416 unsigned int const cell,
417 unsigned int const face,
418 dealii::types::boundary_id
const boundary_id)
const;
427 do_cell_integral(IntegratorCell & integrator)
const;
430 do_face_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const;
433 do_boundary_integral(IntegratorFace & integrator,
434 OperatorType
const & operator_type,
435 dealii::types::boundary_id
const & boundary_id)
const;
438 do_boundary_integral_continuous(IntegratorFace & integrator,
439 dealii::types::boundary_id
const & boundary_id)
const;
444 do_face_int_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const;
447 do_face_ext_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const;
457 do_face_int_integral_cell_based(IntegratorFace & integrator_m,
458 IntegratorFace & integrator_p)
const;
475 mutable dealii::AffineConstraints<double> constraint_double;
499 ELEMENTWISE_PRECONDITIONER;
500 typedef Elementwise::
501 IterativeSolver<dim, n_components, Number, ELEMENTWISE_OPERATOR, ELEMENTWISE_PRECONDITIONER>
504 mutable std::shared_ptr<ELEMENTWISE_OPERATOR> elementwise_operator;
505 mutable std::shared_ptr<ELEMENTWISE_PRECONDITIONER> elementwise_preconditioner;
506 mutable std::shared_ptr<ELEMENTWISE_SOLVER> elementwise_solver;
510 reinit_cell_derived(IntegratorCell & integrator,
unsigned int const cell)
const;
513 reinit_face_derived(IntegratorFace & integrator_m,
514 IntegratorFace & integrator_p,
515 unsigned int const face)
const;
518 reinit_boundary_face_derived(IntegratorFace & integrator_m,
unsigned int const face)
const;
521 reinit_face_cell_based_derived(IntegratorFace & integrator_m,
522 IntegratorFace & integrator_p,
523 unsigned int const cell,
524 unsigned int const face,
525 dealii::types::boundary_id
const boundary_id)
const;
535 create_standard_basis(
unsigned int j, IntegratorCell & integrator)
const;
538 create_standard_basis(
unsigned int j, IntegratorFace & integrator)
const;
541 create_standard_basis(
unsigned int j,
542 IntegratorFace & integrator_1,
543 IntegratorFace & integrator_2)
const;
555 cell_loop_full_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
557 VectorType
const & src,
558 Range
const & range)
const;
564 cell_loop(dealii::MatrixFree<dim, Number>
const & matrix_free,
566 VectorType
const & src,
567 Range
const & range)
const;
573 face_loop(dealii::MatrixFree<dim, Number>
const & matrix_free,
575 VectorType
const & src,
576 Range
const & range)
const;
586 boundary_face_loop_hom_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
588 VectorType
const & src,
589 Range
const & range)
const;
593 boundary_face_loop_inhom_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
595 VectorType
const & src,
596 Range
const & range)
const;
600 boundary_face_loop_full_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
602 VectorType
const & src,
603 Range
const & range)
const;
611 cell_loop_empty(dealii::MatrixFree<dim, Number>
const & matrix_free,
613 VectorType
const & src,
614 Range
const & range)
const;
617 face_loop_empty(dealii::MatrixFree<dim, Number>
const & matrix_free,
619 VectorType
const & src,
620 Range
const & range)
const;
626 cell_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
628 VectorType
const & src,
629 Range
const & range)
const;
632 face_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
634 VectorType
const & src,
635 Range
const & range)
const;
638 boundary_face_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
640 VectorType
const & src,
641 Range
const & range)
const;
644 cell_based_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
646 VectorType
const & src,
647 Range
const & range)
const;
653 cell_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
654 std::vector<LAPACKMatrix> & matrices,
655 std::vector<LAPACKMatrix>
const & src,
656 Range
const & range)
const;
659 face_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
660 std::vector<LAPACKMatrix> & matrices,
661 std::vector<LAPACKMatrix>
const & src,
662 Range
const & range)
const;
665 boundary_face_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
666 std::vector<LAPACKMatrix> & matrices,
667 std::vector<LAPACKMatrix>
const & src,
668 Range
const & range)
const;
672 cell_based_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
673 std::vector<LAPACKMatrix> & matrices,
674 std::vector<LAPACKMatrix>
const & src,
675 Range
const & range)
const;
683 cell_loop_apply_inverse_block_diagonal_matrix_based(
684 dealii::MatrixFree<dim, Number>
const & matrix_free,
686 VectorType
const & src,
687 Range
const & range)
const;
693 template<
typename SparseMatrix>
695 internal_init_system_matrix(SparseMatrix & system_matrix,
696 dealii::DynamicSparsityPattern & dsp,
697 MPI_Comm
const & mpi_comm)
const;
699 template<
typename SparseMatrix>
701 internal_calculate_system_matrix(SparseMatrix & system_matrix)
const;
706 template<
typename SparseMatrix>
708 cell_loop_calculate_system_matrix(dealii::MatrixFree<dim, Number>
const & matrix_free,
710 SparseMatrix
const & src,
711 Range
const & range)
const;
713 template<
typename SparseMatrix>
715 face_loop_calculate_system_matrix(dealii::MatrixFree<dim, Number>
const & matrix_free,
717 SparseMatrix
const & src,
718 Range
const & range)
const;
720 template<
typename SparseMatrix>
722 boundary_face_loop_calculate_system_matrix(dealii::MatrixFree<dim, Number>
const & matrix_free,
724 SparseMatrix
const & src,
725 Range
const & range)
const;
731 set_constrained_dofs_to_one(VectorType & vector)
const;
738 evaluate_face_integrals()
const;
743 template<
typename SparseMatrix>
745 internal_compute_factorized_additive_schwarz_matrices()
const;
761 mutable std::vector<LAPACKMatrix> matrices;
766 mutable VectorType weights;
768 unsigned int n_mpi_processes;
771 mutable bool system_matrix_based_been_initialized;
773#ifdef DEAL_II_WITH_TRILINOS
774 mutable dealii::TrilinosWrappers::SparseMatrix system_matrix_trilinos;
777#ifdef DEAL_II_WITH_PETSC
778 mutable dealii::PETScWrappers::MPI::SparseMatrix system_matrix_petsc;
781 mutable Vec petsc_vector_src;
782 mutable Vec petsc_vector_dst;