106class OperatorBase :
public dealii::EnableObserverPointer
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_dof_index_inhomogeneous()
const;
166 get_quad_index()
const;
173 operator_is_singular()
const;
176 vmult(VectorType & dst, VectorType
const & src)
const;
179 vmult_add(VectorType & dst, VectorType
const & src)
const;
182 vmult_interface_down(VectorType & dst, VectorType
const & src)
const;
185 vmult_add_interface_up(VectorType & dst, VectorType
const & src)
const;
187 dealii::types::global_dof_index
190 dealii::types::global_dof_index
194 el(
unsigned int const,
unsigned int const)
const;
197 is_empty_locally()
const;
200 initialize_dof_vector(VectorType & vector)
const;
207 set_inhomogeneous_constrained_values(VectorType & solution)
const;
210 set_constrained_dofs_to_zero(VectorType & vector)
const;
213 calculate_inverse_diagonal(VectorType & diagonal)
const;
220 initialize_block_diagonal_preconditioner(
bool const initialize)
const;
227 update_block_diagonal_preconditioner()
const;
239#ifdef DEAL_II_WITH_TRILINOS
241 init_system_matrix(dealii::TrilinosWrappers::SparseMatrix & system_matrix,
242 MPI_Comm
const & mpi_comm)
const;
245 calculate_system_matrix(dealii::TrilinosWrappers::SparseMatrix & system_matrix)
const;
251#ifdef DEAL_II_WITH_PETSC
253 init_system_matrix(dealii::PETScWrappers::MPI::SparseMatrix & system_matrix,
254 MPI_Comm
const & mpi_comm)
const;
257 calculate_system_matrix(dealii::PETScWrappers::MPI::SparseMatrix & system_matrix)
const;
266 get_constant_modes(std::vector<std::vector<bool>> & constant_modes,
267 std::vector<std::vector<double>> & constant_modes_values)
const;
276 apply(VectorType & dst, VectorType
const & src)
const;
282 apply_add(VectorType & dst, VectorType
const & src)
const;
285 assemble_matrix_if_matrix_based()
const;
292 apply_matrix_based(VectorType & dst, VectorType
const & src)
const;
298 apply_matrix_based_add(VectorType & dst, VectorType
const & src)
const;
315 rhs(VectorType & dst)
const;
321 rhs_add(VectorType & dst)
const;
338 evaluate(VectorType & dst, VectorType
const & src)
const;
344 evaluate_add(VectorType & dst, VectorType
const & src)
const;
350 calculate_diagonal(VectorType & diagonal)
const;
353 add_diagonal(VectorType & diagonal)
const;
359 add_block_diagonal_matrices(std::vector<LAPACKMatrix> & matrices)
const;
362 apply_inverse_block_diagonal_matrix_based(VectorType & dst, VectorType
const & src)
const;
370 initialize_block_diagonal_preconditioner_matrix_free(
bool const initialize)
const;
375 update_block_diagonal_preconditioner_matrix_free()
const;
379 initialize_block_diagonal_preconditioner_matrix_based(
bool const initialize)
const;
383 update_block_diagonal_preconditioner_matrix_based()
const;
386 apply_add_block_diagonal_elementwise(
unsigned int const cell,
387 dealii::VectorizedArray<Number> *
const dst,
388 dealii::VectorizedArray<Number>
const *
const src,
389 unsigned int const problem_size)
const;
395 compute_factorized_additive_schwarz_matrices()
const;
398 apply_inverse_additive_schwarz_matrices(VectorType & dst, VectorType
const & src)
const;
402 reinit(dealii::MatrixFree<dim, Number>
const & matrix_free,
403 dealii::AffineConstraints<Number>
const & constraints,
407 reinit_cell(IntegratorCell & integrator,
unsigned int const cell)
const;
410 reinit_face(IntegratorFace & integrator_m,
411 IntegratorFace & integrator_p,
412 unsigned int const face)
const;
415 reinit_boundary_face(IntegratorFace & integrator_m,
unsigned int const face)
const;
418 reinit_face_cell_based(IntegratorFace & integrator_m,
419 IntegratorFace & integrator_p,
420 unsigned int const cell,
421 unsigned int const face,
422 dealii::types::boundary_id
const boundary_id)
const;
431 do_cell_integral(IntegratorCell & integrator)
const;
434 do_face_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const;
437 do_boundary_integral(IntegratorFace & integrator,
438 OperatorType
const & operator_type,
439 dealii::types::boundary_id
const & boundary_id)
const;
442 do_boundary_integral_continuous(IntegratorFace & integrator,
443 dealii::types::boundary_id
const & boundary_id)
const;
448 do_face_int_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const;
451 do_face_ext_integral(IntegratorFace & integrator_m, IntegratorFace & integrator_p)
const;
461 do_face_int_integral_cell_based(IntegratorFace & integrator_m,
462 IntegratorFace & integrator_p)
const;
479 mutable dealii::AffineConstraints<double> constraint_double;
503 ElementwisePreconditionerBase;
504 typedef Elementwise::
505 IterativeSolver<dim, n_components, Number, ElementwiseOperator, ElementwisePreconditionerBase>
508 mutable std::shared_ptr<ElementwiseOperator> elementwise_operator;
509 mutable std::shared_ptr<ElementwisePreconditionerBase> elementwise_preconditioner;
510 mutable std::shared_ptr<ElementwiseSolver> elementwise_solver;
514 reinit_cell_derived(IntegratorCell & integrator,
unsigned int const cell)
const;
517 reinit_face_derived(IntegratorFace & integrator_m,
518 IntegratorFace & integrator_p,
519 unsigned int const face)
const;
522 reinit_boundary_face_derived(IntegratorFace & integrator_m,
unsigned int const face)
const;
525 reinit_face_cell_based_derived(IntegratorFace & integrator_m,
526 IntegratorFace & integrator_p,
527 unsigned int const cell,
528 unsigned int const face,
529 dealii::types::boundary_id
const boundary_id)
const;
539 create_standard_basis(
unsigned int j, IntegratorCell & integrator)
const;
542 create_standard_basis(
unsigned int j, IntegratorFace & integrator)
const;
545 create_standard_basis(
unsigned int j,
546 IntegratorFace & integrator_1,
547 IntegratorFace & integrator_2)
const;
559 cell_loop_full_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
561 VectorType
const & src,
562 Range
const & range)
const;
568 cell_loop(dealii::MatrixFree<dim, Number>
const & matrix_free,
570 VectorType
const & src,
571 Range
const & range)
const;
577 face_loop(dealii::MatrixFree<dim, Number>
const & matrix_free,
579 VectorType
const & src,
580 Range
const & range)
const;
590 boundary_face_loop_hom_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
592 VectorType
const & src,
593 Range
const & range)
const;
597 boundary_face_loop_inhom_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
599 VectorType
const & src,
600 Range
const & range)
const;
604 boundary_face_loop_full_operator(dealii::MatrixFree<dim, Number>
const & matrix_free,
606 VectorType
const & src,
607 Range
const & range)
const;
615 cell_loop_empty(dealii::MatrixFree<dim, Number>
const & matrix_free,
617 VectorType
const & src,
618 Range
const & range)
const;
621 face_loop_empty(dealii::MatrixFree<dim, Number>
const & matrix_free,
623 VectorType
const & src,
624 Range
const & range)
const;
630 cell_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
632 VectorType
const & src,
633 Range
const & range)
const;
636 face_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
638 VectorType
const & src,
639 Range
const & range)
const;
642 boundary_face_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
644 VectorType
const & src,
645 Range
const & range)
const;
648 cell_based_loop_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
650 VectorType
const & src,
651 Range
const & range)
const;
657 cell_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
658 std::vector<LAPACKMatrix> & matrices,
659 std::vector<LAPACKMatrix>
const & src,
660 Range
const & range)
const;
663 face_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
664 std::vector<LAPACKMatrix> & matrices,
665 std::vector<LAPACKMatrix>
const & src,
666 Range
const & range)
const;
669 boundary_face_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
670 std::vector<LAPACKMatrix> & matrices,
671 std::vector<LAPACKMatrix>
const & src,
672 Range
const & range)
const;
676 cell_based_loop_block_diagonal(dealii::MatrixFree<dim, Number>
const & matrix_free,
677 std::vector<LAPACKMatrix> & matrices,
678 std::vector<LAPACKMatrix>
const & src,
679 Range
const & range)
const;
687 cell_loop_apply_inverse_block_diagonal_matrix_based(
688 dealii::MatrixFree<dim, Number>
const & matrix_free,
690 VectorType
const & src,
691 Range
const & range)
const;
697 template<
typename SparseMatrix>
699 internal_init_system_matrix(SparseMatrix & system_matrix,
700 dealii::DynamicSparsityPattern & dsp,
701 MPI_Comm
const & mpi_comm)
const;
703 template<
typename SparseMatrix>
705 internal_calculate_system_matrix(SparseMatrix & system_matrix)
const;
710 template<
typename SparseMatrix>
712 cell_loop_calculate_system_matrix(dealii::MatrixFree<dim, Number>
const & matrix_free,
714 SparseMatrix
const & src,
715 Range
const & range)
const;
717 template<
typename SparseMatrix>
719 face_loop_calculate_system_matrix(dealii::MatrixFree<dim, Number>
const & matrix_free,
721 SparseMatrix
const & src,
722 Range
const & range)
const;
724 template<
typename SparseMatrix>
726 boundary_face_loop_calculate_system_matrix(dealii::MatrixFree<dim, Number>
const & matrix_free,
728 SparseMatrix
const & src,
729 Range
const & range)
const;
735 set_constrained_dofs_to_one(VectorType & vector)
const;
742 evaluate_face_integrals()
const;
747 template<
typename SparseMatrix>
749 internal_compute_factorized_additive_schwarz_matrices()
const;
765 mutable std::vector<LAPACKMatrix> matrices;
770 mutable VectorType weights;
772 unsigned int n_mpi_processes;
775 mutable bool system_matrix_based_been_initialized;
777#ifdef DEAL_II_WITH_TRILINOS
778 mutable dealii::TrilinosWrappers::SparseMatrix system_matrix_trilinos;
781#ifdef DEAL_II_WITH_PETSC
782 mutable dealii::PETScWrappers::MPI::SparseMatrix system_matrix_petsc;
785 mutable Vec petsc_vector_src;
786 mutable Vec petsc_vector_dst;