From: Daniel Arndt Date: Sat, 11 May 2019 15:38:04 +0000 (-0400) Subject: Remove RightHandSide X-Git-Tag: v9.1.0-rc1~58^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb8b64dbf33cb13c12c7d0d52039dc12561f496f;p=dealii.git Remove RightHandSide --- diff --git a/examples/step-46/step-46.cc b/examples/step-46/step-46.cc index 5b88cabebb..2e45fc9cde 100644 --- a/examples/step-46/step-46.cc +++ b/examples/step-46/step-46.cc @@ -150,12 +150,12 @@ namespace Step46 // @sect3{Boundary values and right hand side} - // The following classes do as their names suggest. The boundary values for + // The following class does as its names suggest. The boundary values for // the velocity are $\mathbf u=(0, \sin(\pi x))^T$ in 2d and $\mathbf u=(0, // 0, \sin(\pi x)\sin(\pi y))^T$ in 3d, respectively. The remaining boundary // conditions for this problem are all homogeneous and have been discussed in // the introduction. The right hand side forcing term is zero for both the - // fluid and the solid. + // fluid and the solid so we don't need an extra class for it. template class StokesBoundaryValues : public Function { @@ -204,40 +204,6 @@ namespace Step46 - template - class RightHandSide : public Function - { - public: - RightHandSide() - : Function(dim + 1) - {} - - virtual double value(const Point & p, - const unsigned int component = 0) const override; - - virtual void vector_value(const Point &p, - Vector & value) const override; - }; - - - template - double RightHandSide::value(const Point & /*p*/, - const unsigned int /*component*/) const - { - return 0; - } - - - template - void RightHandSide::vector_value(const Point &p, - Vector & values) const - { - for (unsigned int c = 0; c < this->n_components; ++c) - values(c) = RightHandSide::value(p, c); - } - - - // @sect3{The FluidStructureProblem implementation} // @sect4{Constructors and helper functions} @@ -556,7 +522,7 @@ namespace Step46 std::vector neighbor_dof_indices( stokes_dofs_per_cell); - const RightHandSide right_hand_side; + const Functions::ZeroFunction right_hand_side(dim + 1); // ...to variables that allow us to extract certain components of the // shape functions and cache their values rather than having to recompute