These constructors were necessary in an earlier era when compilers would warn about this,
but they are no longer necessary now. We've removed them from a couple of tutorials
already, and this is the remainder.
// the sine-factor with <code>y</code> replaced by <code>z</code> and so
// on. Given this, the following two classes are probably straightforward
// from the previous examples.
- //
- // As in previous examples, the C++ language forces us to declare and define
- // a constructor to the following classes even though they are empty. This
- // is due to the fact that the base class has no default constructor
- // (i.e. one without arguments), even though it has a constructor which has
- // default values for all arguments.
template <int dim>
class Solution : public Function<dim>
{
public:
- Solution()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component) const override;
};
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component) const override;
};
class BoundaryValues : public Function<dim>
{
public:
- BoundaryValues()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component) const;
};
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component) const;
};
class BoundaryValues : public Function<dim>
{
public:
- BoundaryValues()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
};
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component) const override;
};
class Coefficient : public Function<dim>
{
public:
- Coefficient()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
class Solution : public Function<dim>
{
public:
- Solution()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
};
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & /*p*/,
const unsigned int component = 0) const override
{
class BoundaryValues : public Function<dim>
{
public:
- BoundaryValues()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & /*p*/,
const unsigned int component = 0) const override
{
class Obstacle : public Function<dim>
{
public:
- Obstacle()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override
{
class Coefficient : public Function<dim>
{
public:
- Coefficient()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
-// We start by putting the class into its own namespace.
+// We start by putting all of our classes into their own namespace.
namespace Step51
{
using namespace dealii;
class Solution : public Function<dim>, protected SolutionBase<dim>
{
public:
- Solution()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> &p,
const unsigned int /*component*/ = 0) const override
{
class RightHandSide : public Function<dim>, protected SolutionBase<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> &p,
const unsigned int /*component*/ = 0) const override
{
class Solution : public Function<dim>
{
public:
- Solution()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> &p,
const unsigned int = 0) const override final
{
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> &p,
const unsigned int = 0) const override final
{
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
};
class RightHandSide : public Function<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
class BoundaryValues : public Function<dim>
{
public:
- BoundaryValues()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
class Solution : public Function<dim>, protected SolutionBase<dim>
{
public:
- Solution()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
class RightHandSide : public Function<dim>, protected SolutionBase<dim>
{
public:
- RightHandSide()
- : Function<dim>()
- {}
-
virtual double value(const Point<dim> & p,
const unsigned int component = 0) const override;
};