// @sect4{Single curving crack permeability}
- // The first function for the permeability
- // was the one that models a single curving
- // crack. It was already used at the end of
- // step-20, and its functional form is given
- // in the introduction of the present
- // tutorial program:
+ // The first function for the
+ // permeability was the one that
+ // models a single curving crack. It
+ // was already used at the end of
+ // step-20, and its functional form
+ // is given in the introduction of
+ // the present tutorial program. As
+ // in some previous programs, we have
+ // to declare a (seemingly
+ // unnecessary) default constructor
+ // of the KInverse class to avoid
+ // warnings from some compilers:
namespace SingleCurvingCrack
{
template <int dim>
class KInverse : public TensorFunction<2,dim>
{
public:
+ KInverse ()
+ :
+ TensorFunction<2,dim> ()
+ {}
+
virtual void value_list (const std::vector<Point<dim> > &points,
std::vector<Tensor<2,dim> > &values) const;
};
class KInverse : public TensorFunction<2,dim>
{
public:
+ KInverse ()
+ :
+ TensorFunction<2,dim> ()
+ {}
+
virtual void value_list (const std::vector<Point<dim> > &points,
std::vector<Tensor<2,dim> > &values) const;
class KInverse : public TensorFunction<2,dim>
{
public:
+ KInverse ()
+ :
+ TensorFunction<2,dim>()
+ {}
+
virtual void value_list (const std::vector<Point<dim> > &points,
std::vector<Tensor<2,dim> > &values) const;
class InitialValuesP : public Function<dim>
{
public:
- InitialValuesP () : Function<dim>() {}
+ InitialValuesP ()
+ :
+ Function<dim>()
+ {}
virtual double value (const Point<dim> &p,
const unsigned int component = 0) const;
private:
struct Source
{
+ Source (const Point<dim> &l,
+ const double r)
+ :
+ location (l),
+ radius (r)
+ {}
+
const Point<dim> location;
const double radius;
};
double InitialValuesP<dim>::value (const Point<dim> &p,
const unsigned int /*component*/) const
{
- static const Source sources[] = {{ Point<dim> (0, 0), 0.025 },
- { Point<dim> (-0.135, 0), 0.05 },
- { Point<dim> (0.17, 0), 0.03 },
- { Point<dim> (-0.25, 0), 0.02 },
- { Point<dim> (-0.05, -0.15), 0.015 }};
+ static const Source sources[] = {Source (Point<dim> (0, 0), 0.025),
+ Source (Point<dim> (-0.135, 0), 0.05),
+ Source (Point<dim> (0.17, 0), 0.03),
+ Source (Point<dim> (-0.25, 0), 0.02),
+ Source (Point<dim> (-0.05, -0.15), 0.015)};
static const unsigned int n_sources = sizeof(sources)/sizeof(sources[0]);
for (unsigned int i=0; i<n_sources; ++i)