diff --git a/include/core/matrix_free_operator.h b/include/core/matrix_free_operator.h index 7a587431a..9ea72d581 100644 --- a/include/core/matrix_free_operator.h +++ b/include/core/matrix_free_operator.h @@ -9,34 +9,6 @@ using namespace dealii; -template -class Coefficient : public Function -{ -public: - virtual double - value(const Point &p, const unsigned int component = 0) const override; - - template - number - value(const Point &p, const unsigned int component = 0) const; -}; - -template -template -number -Coefficient::value(const Point &p, - const unsigned int /*component*/) const -{ - return 1.0 / (0.05 + 2.0 * p.square()); -} - -template -double -Coefficient::value(const Point &p, const unsigned int component) const -{ - return value(p, component); -} - /** * \brief This is the abstract base class for the matrix free implementation of some PDE. * @@ -69,9 +41,6 @@ class matrixFreeOperator void clear() override; - void - evaluate_coefficient(const Coefficient &coefficient_function); - /** * \brief Compute the diagonal of this operator. */ @@ -111,8 +80,6 @@ class matrixFreeOperator LinearAlgebra::distributed::Vector &dst, const unsigned int &dummy, const std::pair &cell_range) const; - - Table<2, VectorizedArray> coefficient; }; template @@ -124,29 +91,9 @@ template void matrixFreeOperator::clear() { - coefficient.reinit(0, 0); MatrixFreeOperators::Base>::clear(); } -template -void -matrixFreeOperator::evaluate_coefficient( - const Coefficient &coefficient_function) -{ - const unsigned int n_cells = this->data->n_cell_batches(); - FEEvaluation phi(*this->data); - - coefficient.reinit(n_cells, phi.n_q_points); - for (unsigned int cell = 0; cell < n_cells; ++cell) - { - phi.reinit(cell); - for (const unsigned int q : phi.quadrature_point_indices()) - { - coefficient(cell, q) = coefficient_function.value(phi.quadrature_point(q)); - } - } -} - template void matrixFreeOperator::local_apply( diff --git a/include/core/temp_test.h b/include/core/temp_test.h index 043966260..a7da695d3 100644 --- a/include/core/temp_test.h +++ b/include/core/temp_test.h @@ -135,8 +135,6 @@ LaplaceProblem::setup_system() system_matrix.initialize(system_mf_storage); } - system_matrix.evaluate_coefficient(Coefficient()); - system_matrix.initialize_dof_vector(solution); system_matrix.initialize_dof_vector(system_rhs); } @@ -181,7 +179,6 @@ LaplaceProblem::setup_system() additional_data); mg_matrices[level].initialize(mg_mf_storage_level, mg_constrained_dofs, level); - mg_matrices[level].evaluate_coefficient(Coefficient()); } } setup_time += time.wall_time();