// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
- return_value += std::exp(-x_minus_xi.square() /
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
+ return_value += std::exp(-x_minus_xi.norm_square() /
(this->width * this->width));
}
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
return_value += (-2 / (this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)) *
x_minus_xi);
}
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
return_value +=
- ((2*dim - 2*convection*x_minus_xi - 4*x_minus_xi.square()/
+ ((2*dim - 2*convection*x_minus_xi - 4*x_minus_xi.norm_square()/
(this->width * this->width)) /
(this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)));
}
// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
- return_value += std::exp(-x_minus_xi.square() /
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
+ return_value += std::exp(-x_minus_xi.norm_square() /
(this->width * this->width));
}
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
return_value += (-2 / (this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)) *
x_minus_xi);
}
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
return_value +=
- ((2*dim - 2*convection*x_minus_xi - 4*x_minus_xi.square()/
+ ((2*dim - 2*convection*x_minus_xi - 4*x_minus_xi.norm_square()/
(this->width * this->width)) /
(this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)));
}
// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
- return_value += std::exp(-x_minus_xi.square() /
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
+ return_value += std::exp(-x_minus_xi.norm_square() /
(this->width * this->width));
}
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
return_value += (-2 / (this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)) *
x_minus_xi);
}
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
- return_value += ((2*dim - 4*x_minus_xi.square()/
+ return_value += ((2*dim - 4*x_minus_xi.norm_square()/
(this->width * this->width)) /
(this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)));
- return_value += std::exp(-x_minus_xi.square() /
+ return_value += std::exp(-x_minus_xi.norm_square() /
(this->width * this->width));
}
// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
const Point<dim+1> &point);
private:
- double term_S(const Point<3> &r,
- const Point<3> &a1,
- const Point<3> &a2,
+ double term_S(const Tensor<1,3> &r,
+ const Tensor<1,3> &a1,
+ const Tensor<1,3> &a2,
const Point<3> &n,
const double &rn_c);
- double term_D(const Point<3> &r,
- const Point<3> &a1,
- const Point<3> &a2);
+ double term_D(const Tensor<1,3> &r,
+ const Tensor<1,3> &a1,
+ const Tensor<1,3> &a2);
SmartPointer<FEValues<dim,dim+1> > fe_values;
};
vector<DerivativeForm<1,2,3> > jacobians = fe_values->get_jacobians();
vector<Point<3> > normals = fe_values->get_normal_vectors();
- Point<3> r,a1,a2,n,r_c,n_c;
- r_c = point-cell->center();
+ Point<3> n,n_c;
+ Tensor<1,3> r_c = point-cell->center();
n_c = normals[4];
double rn_c = r_c*n_c;
vector<double> i_D(4);
for (unsigned int q_point=0; q_point < 4; ++q_point)
{
- r = point-cell->vertex(q_point);
- a1 = transpose(jacobians[q_point])[0];
- a2 = transpose(jacobians[q_point])[1];
+ const Tensor<1,3> r = point-cell->vertex(q_point);
+ const Tensor<1,3> a1 = transpose(jacobians[q_point])[0];
+ const Tensor<1,3> a2 = transpose(jacobians[q_point])[1];
n = normals[q_point];
i_S[q_point]=term_S(r,a1,a2,n,rn_c);
i_D[q_point]=term_D(r,a1,a2);
template <int dim>
double
-LaplaceKernelIntegration<dim>::term_S (const Point<3> &r,
- const Point<3> &a1,
- const Point<3> &a2,
+LaplaceKernelIntegration<dim>::term_S (const Tensor<1,3> &r,
+ const Tensor<1,3> &a1,
+ const Tensor<1,3> &a2,
const Point<3> &n,
const double &rn_c)
{
template <int dim>
double
-LaplaceKernelIntegration<dim>::term_D (const Point<3> &r,
- const Point<3> &a1,
- const Point<3> &a2)
+LaplaceKernelIntegration<dim>::term_D (const Tensor<1,3> &r,
+ const Tensor<1,3> &a1,
+ const Tensor<1,3> &a2)
{
Point<3> ra1, ra2, a12;
// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
- return_value += std::exp(-x_minus_xi.square() /
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
+ return_value += std::exp(-x_minus_xi.norm_square() /
(this->width * this->width));
}
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
return_value += (-2 / (this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)) *
x_minus_xi);
}
double return_value = 0;
for (unsigned int i=0; i<this->n_source_centers; ++i)
{
- const Point<dim> x_minus_xi = p - this->source_centers[i];
+ const Tensor<1,dim> x_minus_xi = p - this->source_centers[i];
- return_value += ((2*dim - 4*x_minus_xi.square()/
+ return_value += ((2*dim - 4*x_minus_xi.norm_square()/
(this->width * this->width)) /
(this->width * this->width) *
- std::exp(-x_minus_xi.square() /
+ std::exp(-x_minus_xi.norm_square() /
(this->width * this->width)));
- return_value += std::exp(-x_minus_xi.square() /
+ return_value += std::exp(-x_minus_xi.norm_square() /
(this->width * this->width));
}