template<int dim>
double
SquareFunction<dim>::laplacian (const Point<dim> &,
- const unsigned int) const
+ const unsigned int) const
{
return 2*dim;
}
template<int dim>
double
PillowFunction<dim>::laplacian (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
switch(dim)
{
return -2.*((1.-p(0)*p(0))+(1.-p(1)*p(1)));
case 3:
return -2.*((1.-p(0)*p(0))*(1.-p(1)*p(1))
- +(1.-p(1)*p(1))*(1.-p(2)*p(2))
- +(1.-p(2)*p(2))*(1.-p(0)*p(0)));
+ +(1.-p(1)*p(1))*(1.-p(2)*p(2))
+ +(1.-p(2)*p(2))*(1.-p(0)*p(0)));
default:
Assert(false, ExcNotImplemented());
}
template<int dim>
double
CosineFunction<dim>::laplacian (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
switch(dim)
{
template<int dim>
double
ExpFunction<dim>::value (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
switch(dim)
{
template<int dim>
void
ExpFunction<dim>::value_list (const vector<Point<dim> > &points,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
template<int dim>
double
ExpFunction<dim>::laplacian (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
switch(dim)
{
template<int dim>
void
ExpFunction<dim>::laplacian_list (const vector<Point<dim> > &points,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
template<int dim>
Tensor<1,dim>
ExpFunction<dim>::gradient (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
Tensor<1,dim> result;
switch(dim)
template<int dim>
void
ExpFunction<dim>::gradient_list (const vector<Point<dim> > &points,
- vector<Tensor<1,dim> > &gradients,
- const unsigned int) const
+ vector<Tensor<1,dim> > &gradients,
+ const unsigned int) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
double
LSingularityFunction::value (const Point<2> &p,
- const unsigned int) const
+ const unsigned int) const
{
double x = p(0);
double y = p(1);
void
LSingularityFunction::value_list (const vector<Point<2> > &points,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
double
LSingularityFunction::laplacian (const Point<2> &,
- const unsigned int) const
+ const unsigned int) const
{
return 0.;
}
void
LSingularityFunction::laplacian_list (const vector<Point<2> > &points,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
Tensor<1,2>
LSingularityFunction::gradient (const Point<2> &p,
- const unsigned int) const
+ const unsigned int) const
{
Assert(false, ExcNotImplemented());
double x = p(0);
void
LSingularityFunction::gradient_list (const vector<Point<2> > &points,
- vector<Tensor<1,2> > &gradients,
- const unsigned int) const
+ vector<Tensor<1,2> > &gradients,
+ const unsigned int) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
double
SlitSingularityFunction::value (const Point<2> &p,
- const unsigned int) const
+ const unsigned int) const
{
double x = p(0);
double y = p(1);
void
SlitSingularityFunction::value_list (const vector<Point<2> > &points,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
double
SlitSingularityFunction::laplacian (const Point<2> &,
- const unsigned int) const
+ const unsigned int) const
{
return 0.;
}
void
SlitSingularityFunction::laplacian_list (const vector<Point<2> > &points,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == points.size(),
ExcDimensionMismatch(values.size(), points.size()));
Tensor<1,2>
SlitSingularityFunction::gradient (const Point<2> &/*p*/,
- const unsigned int) const
+ const unsigned int) const
{
Assert(false, ExcNotImplemented());
return Tensor<1,2>();
void
SlitSingularityFunction::gradient_list (const vector<Point<2> > &points,
- vector<Tensor<1,2> > &gradients,
- const unsigned int) const
+ vector<Tensor<1,2> > &gradients,
+ const unsigned int) const
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
//////////////////////////////////////////////////////////////////////
template<int dim>
-JumpFunction<dim>::JumpFunction(const Point<dim>& direction,
- double steepness)
+JumpFunction<dim>::JumpFunction(const Point<dim> &direction,
+ const double steepness)
:
direction(direction),
steepness(steepness)
template<int dim>
double
JumpFunction<dim>::value (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
double x = steepness*(cosine*p(0)+sine*p(1));
return -atan(x);
template<int dim>
void
JumpFunction<dim>::value_list (const vector<Point<dim> > &p,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == p.size(),
ExcDimensionMismatch(values.size(), p.size()));
template<int dim>
double
JumpFunction<dim>::laplacian (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
double x = steepness*(cosine*p(0)+sine*p(1));
double r = 1+x*x;
template<int dim>
void
JumpFunction<dim>::laplacian_list (const vector<Point<dim> > &p,
- vector<double> &values,
- const unsigned int) const
+ vector<double> &values,
+ const unsigned int) const
{
Assert (values.size() == p.size(),
ExcDimensionMismatch(values.size(), p.size()));
template<int dim>
Tensor<1,dim>
JumpFunction<dim>::gradient (const Point<dim> &p,
- const unsigned int) const
+ const unsigned int) const
{
double x = steepness*(cosine*p(0)+sine*p(1));
double r = -steepness*(1+x*x);
template<int dim>
void
JumpFunction<dim>::gradient_list (const vector<Point<dim> > &p,
- vector<Tensor<1,dim> > &gradients,
- const unsigned int) const
+ vector<Tensor<1,dim> > &gradients,
+ const unsigned int) const
{
Assert (gradients.size() == p.size(),
ExcDimensionMismatch(gradients.size(), p.size()));