<!-- ----------- GENERAL IMPROVEMENTS ----------------- -->
+
+<!-- ********** BRANCH CHANGES -->
+
+<ol>
+<li> Changed: In many places throughout the library, second derivatives
+were previously referred to uniformly as "Hessians" of some function.
+However, in the internal interfaces of the finite element classes, we still
+used an older name, "grad_grad". This has now changed. None of these
+renamed functions should be used in user programs, however.
+<br>
+(Bärbel Janssen, Wolfgang Bangerth, 2012/05/18)
+</ol>
+
+
<a name="general"></a>
<h3>General</h3>
* than using any of the
* compute_value(),
* compute_grad() or
- * compute_grad_grad()
+ * compute_hessian()
* functions, see below, in a
* loop over all polynomials.
*/
void compute (const Point<dim> &unit_point,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
- std::vector<Tensor<2,dim> > &grad_grads) const;
+ std::vector<Tensor<2,dim> > &hessians) const;
/**
* Computes the value of the
/**
* Computes the second derivative
- * (grad_grad) of the <tt>i</tt>th
+ * (hessian) of the <tt>i</tt>th
* polynomial at
* <tt>unit_point</tt>.
*
* Consider using compute() instead.
*/
- Tensor<2,dim> compute_grad_grad (const unsigned int i,
+ Tensor<2,dim> compute_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
* using any of the
* <tt>compute_value</tt>,
* <tt>compute_grad</tt> or
- * <tt>compute_grad_grad</tt>
+ * <tt>compute_hessian</tt>
* functions, see below, in a
* loop over all tensor product
* polynomials.
void compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads) const;
+ std::vector<Tensor<3,dim> > &hessians) const;
/**
* Returns the number of ABF polynomials.
/**
* Auxiliary memory.
*/
- mutable std::vector<Tensor<2,dim> > p_grad_grads;
+ mutable std::vector<Tensor<2,dim> > p_hessians;
};
* than using any of the
* compute_value(),
* compute_grad() or
- * compute_grad_grad()
+ * compute_hessian()
* functions, see below, in a
* loop over all polynomials.
*/
void compute (const Point<2> &unit_point,
std::vector<double> &values,
std::vector<Tensor<1,2> > &grads,
- std::vector< Tensor<2,2> > &grad_grads) const;
+ std::vector< Tensor<2,2> > &hessians) const;
/**
* Computes the value of the
const Point<2> &p) const;
/**
* Computes the second derivative
- * (grad_grad) of the <tt>i</tt>th
+ * (hessian) of the <tt>i</tt>th
* polynomial at
* <tt>unit_point</tt>.
*
* Consider using compute() instead.
*/
- Tensor<2,2> compute_grad_grad (const unsigned int i, const Point<2> &p) const;
- Tensor<2,2> compute_grad_grad_2 (const unsigned int i, const Point<2> &p) const;
+ Tensor<2,2> compute_hessian (const unsigned int i, const Point<2> &p) const;
+ Tensor<2,2> compute_hessian_2 (const unsigned int i, const Point<2> &p) const;
private:
/**
* using any of the
* <tt>compute_value</tt>,
* <tt>compute_grad</tt> or
- * <tt>compute_grad_grad</tt>
+ * <tt>compute_hessian</tt>
* functions, see below, in a
* loop over all tensor product
* polynomials.
void compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads) const;
+ std::vector<Tensor<3,dim> > &hessians) const;
/**
* Returns the number of BDM polynomials.
/**
* Auxiliary memory.
*/
- mutable std::vector<Tensor<2,dim> > p_grad_grads;
+ mutable std::vector<Tensor<2,dim> > p_hessians;
};
* using any of the
* <tt>compute_value</tt>,
* <tt>compute_grad</tt> or
- * <tt>compute_grad_grad</tt>
+ * <tt>compute_hessian</tt>
* functions, see below, in a
* loop over all tensor product
* polynomials.
*/
- void compute (const Point<dim> &unit_point, std::vector<Tensor<1, dim> > &values, std::vector<Tensor<2, dim> > &grads, std::vector<Tensor<3, dim> > &grad_grads) const;
+ void compute (const Point<dim> &unit_point, std::vector<Tensor<1, dim> > &values, std::vector<Tensor<2, dim> > &grads, std::vector<Tensor<3, dim> > &hessians) const;
/**
* Returns the number of Nédélec
* using any of the
* <tt>compute_value</tt>,
* <tt>compute_grad</tt> or
- * <tt>compute_grad_grad</tt>
+ * <tt>compute_hessian</tt>
* functions, see below, in a
* loop over all tensor product
* polynomials.
void compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads) const;
+ std::vector<Tensor<3,dim> > &hessians) const;
/**
* Returns the number of Raviart-Thomas polynomials.
* using any of the
* compute_value(),
* compute_grad() or
- * compute_grad_grad()
+ * compute_hessian()
* functions, see below, in a
* loop over all tensor product
* polynomials.
void compute (const Point<dim> &unit_point,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
- std::vector<Tensor<2,dim> > &grad_grads) const;
+ std::vector<Tensor<2,dim> > &hessians) const;
/**
* Computes the value of the
/**
* Computes the second
- * derivative (grad_grad) of the
+ * derivative (hessian) of the
* <tt>i</tt>th tensor product
* polynomial at
* <tt>unit_point</tt>. Here <tt>i</tt> is
* computed several times.
* Instead use the compute()
* function, see above, with
- * <tt>grad_grads.size()==</tt>n()
+ * <tt>hessians.size()==</tt>n()
* to get the point value of all
* tensor polynomials all at once
* and in a much more efficient
* way.
*/
- Tensor<2,dim> compute_grad_grad (const unsigned int i,
+ Tensor<2,dim> compute_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
* using any of the
* <tt>compute_value</tt>,
* <tt>compute_grad</tt> or
- * <tt>compute_grad_grad</tt>
+ * <tt>compute_hessian</tt>
* functions, see below, in a
* loop over all tensor product
* polynomials.
void compute (const Point<dim> &unit_point,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
- std::vector<Tensor<2,dim> > &grad_grads) const;
+ std::vector<Tensor<2,dim> > &hessians) const;
/**
* Computes the value of the
/**
* Computes the second
- * derivative (grad_grad) of the
+ * derivative (hessian) of the
* <tt>i</tt>th tensor product
* polynomial at
* <tt>unit_point</tt>. Here <tt>i</tt> is
* computed several times.
* Instead use the <tt>compute</tt>
* function, see above, with
- * <tt>grad_grads.size()==n_tensor_pols</tt>
+ * <tt>hessians.size()==n_tensor_pols</tt>
* to get the point value of all
* tensor polynomials all at once
* and in a much more efficient
* way.
*/
- Tensor<2,dim> compute_grad_grad (const unsigned int i,
+ Tensor<2,dim> compute_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
* exception of type
* ExcShapeFunctionNotPrimitive. In
* that case, use the
- * shape_grad_grad_component()
+ * shape_hessian_component()
* function.
*
* An
* shape of the cell in real
* space.
*/
- virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
- * Just like for shape_grad_grad(),
+ * Just like for shape_hessian(),
* but this function will be
* called when the shape function
* has more than one non-zero
* component of the @p ith shape
* function at point @p p.
*/
- virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const;
+
/**
* Check for non-zero values on a
* face in order to optimize out
* about the semantics of this
* function.
*/
- virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
* called, provided that the
* specified component is zero.
*/
- virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const;
// have some scratch arrays
std::vector<double> values;
std::vector<Tensor<1,dim> > grads;
- std::vector<Tensor<2,dim> > grad_grads;
+ std::vector<Tensor<2,dim> > hessians;
};
/**
* Tensor<1,dim> compute_grad (const unsigned int i,
* const Point<dim> &p) const;
*
- * Tensor<2,dim> compute_grad_grad (const unsigned int i,
+ * Tensor<2,dim> compute_hessian (const unsigned int i,
* const Point<dim> &p) const;
* @endcode
* Example classes are TensorProductPolynomials, PolynomialSpace or
* for more information about the
* semantics of this function.
*/
- virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
* were called, provided that the
* specified component is zero.
*/
- virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const;
protected:
template <class POLY, int dim, int spacedim>
Tensor<2,dim>
-FE_Poly<POLY,dim,spacedim>::shape_grad_grad (const unsigned int i,
+FE_Poly<POLY,dim,spacedim>::shape_hessian (const unsigned int i,
const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
- return poly_space.compute_grad_grad(i, p);
+ return poly_space.compute_hessian(i, p);
}
template <class POLY, int dim, int spacedim>
Tensor<2,dim>
-FE_Poly<POLY,dim,spacedim>::shape_grad_grad_component (const unsigned int i,
+FE_Poly<POLY,dim,spacedim>::shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component == 0, ExcIndexRange (component, 0, 1));
- return poly_space.compute_grad_grad(i, p);
+ return poly_space.compute_hessian(i, p);
}
// some scratch arrays
std::vector<double> values(0);
std::vector<Tensor<1,dim> > grads(0);
- std::vector<Tensor<2,dim> > grad_grads(0);
+ std::vector<Tensor<2,dim> > hessians(0);
// initialize fields only if really
// necessary. otherwise, don't
for (unsigned int i=0; i<n_q_points; ++i)
{
poly_space.compute(quadrature.point(i),
- values, grads, grad_grads);
+ values, grads, hessians);
if (flags & update_values)
for (unsigned int k=0; k<this->dofs_per_cell; ++k)
* for more information about the
* semantics of this function.
*/
-// virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
+// virtual Tensor<2,dim> shape_hessian (const unsigned int i,
// const Point<dim> &p) const;
/**
* were called, provided that the
* specified component is zero.
*/
-// virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
+// virtual Tensor<2,dim> shape_hessian_component (const unsigned int i,
// const Point<dim> &p,
// const unsigned int component) const;
// some scratch arrays
std::vector<double> values(0);
std::vector<Tensor<1,dim-1> > grads(0);
- std::vector<Tensor<2,dim-1> > grad_grads(0);
+ std::vector<Tensor<2,dim-1> > hessians(0);
// initialize fields only if really
// necessary. otherwise, don't
for (unsigned int i=0; i<n_q_points; ++i)
{
poly_space.compute(quadrature.point(i),
- values, grads, grad_grads);
+ values, grads, hessians);
for (unsigned int k=0; k<poly_space.n(); ++k)
data->shape_values[k][i] = values[k];
* void compute (const Point<dim> &unit_point,
* std::vector<Tensor<1,dim> > &values,
* std::vector<Tensor<2,dim> > &grads,
- * std::vector<Tensor<3,dim> > &grad_grads) const;
+ * std::vector<Tensor<3,dim> > &hessians) const;
* @endcode
*
* In many cases, the node functionals depend on the shape of the mesh
* vector valued, an exception is
* thrown.
*/
- virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian (const unsigned int i,
const Point<dim> &p) const;
- virtual Tensor<2,dim> shape_grad_grad_component (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const;
/**
* Cached second derivatives of
* shape functions after call to
- * shape_grad_grad_component().
+ * shape_hessian_component().
*/
- mutable std::vector<Tensor<3,dim> > cached_grad_grads;
+ mutable std::vector<Tensor<3,dim> > cached_hessians;
};
DEAL_II_NAMESPACE_CLOSE
* shape of the cell in real
* space.
*/
- virtual Tensor<2,dim> shape_grad_grad (const unsigned int i,
+ virtual Tensor<2,dim> shape_hessian (const unsigned int i,
const Point<dim> &p) const;
/**
*/
virtual
Tensor<2,dim>
- shape_grad_grad_component (const unsigned int i,
+ shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const;
* exception of type
* ExcShapeFunctionNotPrimitive. In
* that case, use the
- * shape_grad_grad_component()
+ * shape_hessian_component()
* function.
*
* The same holds for the arguments
shape_gradients[my_i*n_q_points_1d+q] =
shape_gradient_number[my_i*n_q_points_1d+q];
shape_hessians[my_i*n_q_points_1d+q] =
- fe.shape_grad_grad(i,q_point)[0][0];
+ fe.shape_hessian(i,q_point)[0][0];
face_value[0][my_i*n_q_points_1d+q] = fe.shape_value(i,q_point*0.5);
face_value[1][my_i*n_q_points_1d+q] = fe.shape_value(i,Point<1>(0.5)+q_point*0.5);
}
template <int dim>
Tensor<2,dim>
-PolynomialSpace<dim>::compute_grad_grad (const unsigned int i,
+PolynomialSpace<dim>::compute_hessian (const unsigned int i,
const Point<dim> &p) const
{
unsigned int ix[dim];
PolynomialSpace<dim>::compute (const Point<dim> &p,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
- std::vector<Tensor<2,dim> > &grad_grads) const
+ std::vector<Tensor<2,dim> > &hessians) const
{
const unsigned int n_1d=polynomials.size();
ExcDimensionMismatch2(values.size(), n_pols, 0));
Assert(grads.size()==n_pols|| grads.size()==0,
ExcDimensionMismatch2(grads.size(), n_pols, 0));
- Assert(grad_grads.size()==n_pols|| grad_grads.size()==0,
- ExcDimensionMismatch2(grad_grads.size(), n_pols, 0));
+ Assert(hessians.size()==n_pols|| hessians.size()==0,
+ ExcDimensionMismatch2(hessians.size(), n_pols, 0));
unsigned int v_size=0;
- bool update_values=false, update_grads=false, update_grad_grads=false;
+ bool update_values=false, update_grads=false, update_hessians=false;
if (values.size()==n_pols)
{
update_values=true;
update_grads=true;
v_size=2;
}
- if (grad_grads.size()==n_pols)
+ if (hessians.size()==n_pols)
{
- update_grad_grads=true;
+ update_hessians=true;
v_size=3;
}
}
}
- if (update_grad_grads)
+ if (update_hessians)
{
unsigned int k = 0;
const unsigned int
j2 = ((d1==2) ? 1 : 0) + ((d2==2) ? 1 : 0);
- grad_grads[k2][d1][d2] =
+ hessians[k2][d1][d2] =
v[0][ix][j0]
* ((dim>1) ? v[1][iy][j1] : 1.)
* ((dim>2) ? v[2][iz][j2] : 1.);
PolynomialsABF<dim>::compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads) const
+ std::vector<Tensor<3,dim> > &hessians) const
{
Assert(values.size()==n_pols || values.size()==0,
ExcDimensionMismatch(values.size(), n_pols));
Assert(grads.size()==n_pols|| grads.size()==0,
ExcDimensionMismatch(grads.size(), n_pols));
- Assert(grad_grads.size()==n_pols|| grad_grads.size()==0,
- ExcDimensionMismatch(grad_grads.size(), n_pols));
+ Assert(hessians.size()==n_pols|| hessians.size()==0,
+ ExcDimensionMismatch(hessians.size(), n_pols));
const unsigned int n_sub = polynomial_space->n();
// guard access to the scratch
p_values.resize((values.size() == 0) ? 0 : n_sub);
p_grads.resize((grads.size() == 0) ? 0 : n_sub);
- p_grad_grads.resize((grad_grads.size() == 0) ? 0 : n_sub);
+ p_hessians.resize((hessians.size() == 0) ? 0 : n_sub);
for (unsigned int d=0;d<dim;++d)
{
for (unsigned int c=0;c<dim;++c)
p(c) = unit_point((c+d)%dim);
- polynomial_space->compute (p, p_values, p_grads, p_grad_grads);
+ polynomial_space->compute (p, p_values, p_grads, p_hessians);
for (unsigned int i=0;i<p_values.size();++i)
values[i+d*n_sub][d] = p_values[i];
for (unsigned int d1=0;d1<dim;++d1)
grads[i+d*n_sub][d][(d1+d)%dim] = p_grads[i][d1];
- for (unsigned int i=0;i<p_grad_grads.size();++i)
+ for (unsigned int i=0;i<p_hessians.size();++i)
for (unsigned int d1=0;d1<dim;++d1)
for (unsigned int d2=0;d2<dim;++d2)
- grad_grads[i+d*n_sub][d][(d1+d)%dim][(d2+d)%dim]
- = p_grad_grads[i][d1][d2];
+ hessians[i+d*n_sub][d][(d1+d)%dim][(d2+d)%dim]
+ = p_hessians[i][d1][d2];
}
}
PolynomialsAdini::compute (const Point<2> &unit_point,
std::vector<double> &values,
std::vector<Tensor<1,2> > &grads,
- std::vector< Tensor<2,2> > &grad_grads) const
+ std::vector< Tensor<2,2> > &hessians) const
{
if(values.empty() == false)//nur dann was tun
{
}
}
- if(grad_grads.empty() == false)//nur dann was tun
+ if(hessians.empty() == false)//nur dann was tun
{
- for(unsigned int i=0; i<grad_grads.size(); ++i)
+ for(unsigned int i=0; i<hessians.size(); ++i)
{
- grad_grads[i] = compute_grad_grad(i, unit_point);
+ hessians[i] = compute_hessian(i, unit_point);
}
}
return;
return tensor;
}
-Tensor<2,2> PolynomialsAdini::compute_grad_grad (const unsigned int i, const Point<2> &p) const
+Tensor<2,2> PolynomialsAdini::compute_hessian (const unsigned int i, const Point<2> &p) const
{
const double x = p(0);
const double y = p(1);
n_pols(compute_n_pols(k)),
p_values(polynomial_space.n()),
p_grads(polynomial_space.n()),
- p_grad_grads(polynomial_space.n())
+ p_hessians(polynomial_space.n())
{
switch(dim)
{
PolynomialsBDM<dim>::compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads) const
+ std::vector<Tensor<3,dim> > &hessians) const
{
Assert(values.size()==n_pols || values.size()==0,
ExcDimensionMismatch(values.size(), n_pols));
Assert(grads.size()==n_pols|| grads.size()==0,
ExcDimensionMismatch(grads.size(), n_pols));
- Assert(grad_grads.size()==n_pols|| grad_grads.size()==0,
- ExcDimensionMismatch(grad_grads.size(), n_pols));
+ Assert(hessians.size()==n_pols|| hessians.size()==0,
+ ExcDimensionMismatch(hessians.size(), n_pols));
const unsigned int n_sub = polynomial_space.n();
p_values.resize((values.size() == 0) ? 0 : n_sub);
p_grads.resize((grads.size() == 0) ? 0 : n_sub);
- p_grad_grads.resize((grad_grads.size() == 0) ? 0 : n_sub);
+ p_hessians.resize((hessians.size() == 0) ? 0 : n_sub);
// Compute values of complete space
// and insert into tensors. Result
// will have first all polynomials
// in the x-component, then y and
// z.
- polynomial_space.compute (unit_point, p_values, p_grads, p_grad_grads);
+ polynomial_space.compute (unit_point, p_values, p_grads, p_hessians);
std::fill(values.begin(), values.end(), Tensor<1,dim>());
for (unsigned int i=0;i<p_values.size();++i)
for (unsigned int j=0;j<dim;++j)
grads[i+j*n_sub][j] = p_grads[i];
- std::fill(grad_grads.begin(), grad_grads.end(), Tensor<3,dim>());
- for (unsigned int i=0;i<p_grad_grads.size();++i)
+ std::fill(hessians.begin(), hessians.end(), Tensor<3,dim>());
+ for (unsigned int i=0;i<p_hessians.size();++i)
for (unsigned int j=0;j<dim;++j)
- grad_grads[i+j*n_sub][j] = p_grad_grads[i];
+ hessians[i+j*n_sub][j] = p_hessians[i];
}
// This is the first polynomial not
grads[start+1][1][0] = 0.;
grads[start+1][1][1] = monovali[1][1];
}
- if (grad_grads.size() != 0)
+ if (hessians.size() != 0)
{
- grad_grads[start][0][0][0] = monovali[0][2];
- grad_grads[start][0][0][1] = 0.;
- grad_grads[start][0][1][0] = 0.;
- grad_grads[start][0][1][1] = 0.;
- grad_grads[start][1][0][0] = -unit_point(1) * monovali[0][3];
- grad_grads[start][1][0][1] = -monovali[0][2];
- grad_grads[start][1][1][0] = -monovali[0][2];
- grad_grads[start][1][1][1] = 0.;
- grad_grads[start+1][0][0][0] = 0;
- grad_grads[start+1][0][0][1] = -monovali[1][2];
- grad_grads[start+1][0][1][0] = -monovali[1][2];
- grad_grads[start+1][0][1][1] = -unit_point(0) * monovali[1][3];
- grad_grads[start+1][1][0][0] = 0.;
- grad_grads[start+1][1][0][1] = 0.;
- grad_grads[start+1][1][1][0] = 0.;
- grad_grads[start+1][1][1][1] = monovali[1][2];
+ hessians[start][0][0][0] = monovali[0][2];
+ hessians[start][0][0][1] = 0.;
+ hessians[start][0][1][0] = 0.;
+ hessians[start][0][1][1] = 0.;
+ hessians[start][1][0][0] = -unit_point(1) * monovali[0][3];
+ hessians[start][1][0][1] = -monovali[0][2];
+ hessians[start][1][1][0] = -monovali[0][2];
+ hessians[start][1][1][1] = 0.;
+ hessians[start+1][0][0][0] = 0;
+ hessians[start+1][0][0][1] = -monovali[1][2];
+ hessians[start+1][0][1][0] = -monovali[1][2];
+ hessians[start+1][0][1][1] = -unit_point(0) * monovali[1][3];
+ hessians[start+1][1][0][0] = 0.;
+ hessians[start+1][1][0][1] = 0.;
+ hessians[start+1][1][1][0] = 0.;
+ hessians[start+1][1][1][1] = monovali[1][2];
}
}
else // dim == 3
grads[start+2][1][0] = 0.;
grads[start+2][1][1] = 0.;
}
- if (grad_grads.size() != 0)
+ if (hessians.size() != 0)
{
Assert(false,ExcNotImplemented());
}
std::vector<Tensor<1,dim> > values(n());
std::vector<Tensor<2,dim> > grads;
- std::vector<Tensor<3,dim> > grad_grads;
+ std::vector<Tensor<3,dim> > hessians;
values.resize(n());
for (unsigned int face=0;face<2*dim;++face)
// << '\t' << moment_weight[1].value(x)
// ;
- compute (p, values, grads, grad_grads);
+ compute (p, values, grads, hessians);
for (unsigned int i=0;i<n();++i)
{
PolynomialsNedelec<dim>::compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads)
+ std::vector<Tensor<3,dim> > &hessians)
const
{
Assert(values.size () == n_pols || values.size () == 0,
ExcDimensionMismatch(values.size (), n_pols));
Assert(grads.size () == n_pols || grads.size () == 0,
ExcDimensionMismatch(grads.size (), n_pols));
- Assert(grad_grads.size () == n_pols || grad_grads.size () == 0,
- ExcDimensionMismatch(grad_grads.size (), n_pols));
+ Assert(hessians.size () == n_pols || hessians.size () == 0,
+ ExcDimensionMismatch(hessians.size (), n_pols));
// Declare the values, derivatives
// and second derivatives vectors of
std::vector<Tensor<1, dim> >
unit_point_grads ((grads.size () == 0) ? 0 : n_basis);
std::vector<Tensor<2, dim> >
- unit_point_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
+ unit_point_hessians ((hessians.size () == 0) ? 0 : n_basis);
switch (dim)
{
case 1:
{
polynomial_space.compute (unit_point, unit_point_values,
- unit_point_grads, unit_point_grad_grads);
+ unit_point_grads, unit_point_hessians);
// Assign the correct values to the
// corresponding shape functions.
for (unsigned int i = 0; i < unit_point_grads.size (); ++i)
grads[i][0][0] = unit_point_grads[i][0];
- if (grad_grads.size () > 0)
- for (unsigned int i = 0; i < unit_point_grad_grads.size (); ++i)
- grad_grads[i][0][0][0] = unit_point_grad_grads[i][0][0];
+ if (hessians.size () > 0)
+ for (unsigned int i = 0; i < unit_point_hessians.size (); ++i)
+ hessians[i][0][0][0] = unit_point_hessians[i][0][0];
break;
}
case 2:
{
polynomial_space.compute (unit_point, unit_point_values,
- unit_point_grads, unit_point_grad_grads);
+ unit_point_grads, unit_point_hessians);
// Declare the values, derivatives and
// second derivatives vectors of
std::vector<Tensor<1, dim> >
p_grads ((grads.size () == 0) ? 0 : n_basis);
std::vector<Tensor<2, dim> >
- p_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
+ p_hessians ((hessians.size () == 0) ? 0 : n_basis);
- polynomial_space.compute (p, p_values, p_grads, p_grad_grads);
+ polynomial_space.compute (p, p_values, p_grads, p_hessians);
// Assign the correct values to the
// corresponding shape functions.
}
}
- if (grad_grads.size () > 0)
+ if (hessians.size () > 0)
{
for (unsigned int i = 0; i <= my_degree; ++i)
for (unsigned int j = 0; j < 2; ++j)
for (unsigned int k = 0; k < dim; ++k)
for (unsigned int l = 0; l < dim; ++l)
{
- grad_grads[i + j * (my_degree + 1)][0][k][l] = 0.0;
- grad_grads[i + (j + 2) * (my_degree + 1)][0][k][l]
- = unit_point_grad_grads[i + j * (my_degree + 1)][k]
+ hessians[i + j * (my_degree + 1)][0][k][l] = 0.0;
+ hessians[i + (j + 2) * (my_degree + 1)][0][k][l]
+ = unit_point_hessians[i + j * (my_degree + 1)][k]
[l];
- grad_grads[i + (j + 2) * (my_degree + 1)][1][k][l]
+ hessians[i + (j + 2) * (my_degree + 1)][1][k][l]
= 0.0;
}
- grad_grads[i + j * (my_degree + 1)][1][0][0]
- = p_grad_grads[i + j * (my_degree + 1)][1][1];
- grad_grads[i + j * (my_degree + 1)][1][0][1]
- = p_grad_grads[i + j * (my_degree + 1)][1][0];
- grad_grads[i + j * (my_degree + 1)][1][1][0]
- = p_grad_grads[i + j * (my_degree + 1)][0][1];
- grad_grads[i + j * (my_degree + 1)][1][1][1]
- = p_grad_grads[i + j * (my_degree + 1)][0][0];
+ hessians[i + j * (my_degree + 1)][1][0][0]
+ = p_hessians[i + j * (my_degree + 1)][1][1];
+ hessians[i + j * (my_degree + 1)][1][0][1]
+ = p_hessians[i + j * (my_degree + 1)][1][0];
+ hessians[i + j * (my_degree + 1)][1][1][0]
+ = p_hessians[i + j * (my_degree + 1)][0][1];
+ hessians[i + j * (my_degree + 1)][1][1][1]
+ = p_hessians[i + j * (my_degree + 1)][0][0];
}
if (my_degree > 0)
for (unsigned int k = 0; k < dim; ++k)
for (unsigned int l = 0; l < dim; ++l)
{
- grad_grads[(i + GeometryInfo<dim>::lines_per_cell)
+ hessians[(i + GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][0]
[k][l]
- = unit_point_grad_grads[i + (j + 2)
+ = unit_point_hessians[i + (j + 2)
* (my_degree + 1)][k][l];
- grad_grads[(i + GeometryInfo<dim>::lines_per_cell)
+ hessians[(i + GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1]
[k][l] = 0.0;
- grad_grads[i + (j + my_degree
+ hessians[i + (j + my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][0][k][l] = 0.0;
}
- grad_grads[i + (j + my_degree
+ hessians[i + (j + my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][0][0]
- = p_grad_grads[i + (j + 2) * (my_degree + 1)][1][1];
- grad_grads[i + (j + my_degree
+ = p_hessians[i + (j + 2) * (my_degree + 1)][1][1];
+ hessians[i + (j + my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][0][1]
- = p_grad_grads[i + (j + 2) * (my_degree + 1)][1][0];
- grad_grads[i + (j + my_degree
+ = p_hessians[i + (j + 2) * (my_degree + 1)][1][0];
+ hessians[i + (j + my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][1][0]
- = p_grad_grads[i + (j + 2) * (my_degree + 1)][0][1];
- grad_grads[i + (j + my_degree
+ = p_hessians[i + (j + 2) * (my_degree + 1)][0][1];
+ hessians[i + (j + my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][1][1]
- = p_grad_grads[i + (j + 2) * (my_degree + 1)][0][0];
+ = p_hessians[i + (j + 2) * (my_degree + 1)][0][0];
}
}
case 3:
{
polynomial_space.compute (unit_point, unit_point_values,
- unit_point_grads, unit_point_grad_grads);
+ unit_point_grads, unit_point_hessians);
// Declare the values, derivatives
// and second derivatives vectors of
std::vector<Tensor<1, dim> >
p1_grads ((grads.size () == 0) ? 0 : n_basis);
std::vector<Tensor<2, dim> >
- p1_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
+ p1_hessians ((hessians.size () == 0) ? 0 : n_basis);
std::vector<double> p2_values ((values.size () == 0) ? 0 : n_basis);
std::vector<Tensor<1, dim> >
p2_grads ((grads.size () == 0) ? 0 : n_basis);
std::vector<Tensor<2, dim> >
- p2_grad_grads ((grad_grads.size () == 0) ? 0 : n_basis);
+ p2_hessians ((hessians.size () == 0) ? 0 : n_basis);
p1 (0) = unit_point (1);
p1 (1) = unit_point (2);
p1 (2) = unit_point (0);
- polynomial_space.compute (p1, p1_values, p1_grads, p1_grad_grads);
+ polynomial_space.compute (p1, p1_values, p1_grads, p1_hessians);
p2 (0) = unit_point (2);
p2 (1) = unit_point (0);
p2 (2) = unit_point (1);
- polynomial_space.compute (p2, p2_values, p2_grads, p2_grad_grads);
+ polynomial_space.compute (p2, p2_values, p2_grads, p2_hessians);
// Assign the correct values to the
// corresponding shape functions.
}
}
- if (grad_grads.size () > 0)
+ if (hessians.size () > 0)
{
for (unsigned int i = 0; i <= my_degree; ++i)
{
{
for (unsigned int n = 0; n < 2; ++n)
{
- grad_grads[i + (j + 4 * k) * (my_degree
+ hessians[i + (j + 4 * k) * (my_degree
+ 1)][2 * n]
[l][m] = 0.0;
- grad_grads[i + (j + 4 * k + 2) * (my_degree
+ hessians[i + (j + 4 * k + 2) * (my_degree
+ 1)]
[n + 1][l][m] = 0.0;
- grad_grads[i + (j + 2 * (k + 4))
+ hessians[i + (j + 2 * (k + 4))
* (my_degree + 1)][n][l][m]
= 0.0;
}
- grad_grads[i + (j + 4 * k + 2) * (my_degree
+ hessians[i + (j + 4 * k + 2) * (my_degree
+ 1)][0][l][m]
- = unit_point_grad_grads[i + (j + k
+ = unit_point_hessians[i + (j + k
* (my_degree
+ 2))
* (my_degree + 1)][l]
[m];
}
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][0][0]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][1][1];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][0][1]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][1][2];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][0][2]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][1][0];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][1][0]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][2][1];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][1][1]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][2][2];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][1][2]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][2][0];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][2][0]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][0][1];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][2][1]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][0][2];
- grad_grads[i + (j + 2 * (k + 4)) * (my_degree + 1)]
+ hessians[i + (j + 2 * (k + 4)) * (my_degree + 1)]
[2][2][2]
- = p2_grad_grads[i + (j + k * (my_degree + 2))
+ = p2_hessians[i + (j + k * (my_degree + 2))
* (my_degree + 1)][0][0];
}
- grad_grads[i + j * (my_degree + 1)][1][0][0]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][0][0]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][2][2];
- grad_grads[i + j * (my_degree + 1)][1][0][1]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][0][1]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][2][0];
- grad_grads[i + j * (my_degree + 1)][1][0][2]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][0][2]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][2][1];
- grad_grads[i + j * (my_degree + 1)][1][1][0]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][1][0]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][0][2];
- grad_grads[i + j * (my_degree + 1)][1][1][1]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][1][1]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][0][0];
- grad_grads[i + j * (my_degree + 1)][1][1][2]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][1][2]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][0][1];
- grad_grads[i + j * (my_degree + 1)][1][2][0]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][2][0]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][1][2];
- grad_grads[i + j * (my_degree + 1)][1][2][1]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][2][1]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][1][0];
- grad_grads[i + j * (my_degree + 1)][1][2][2]
- = p1_grad_grads[i + j * (my_degree + 1)
+ hessians[i + j * (my_degree + 1)][1][2][2]
+ = p1_hessians[i + j * (my_degree + 1)
* (my_degree + 2)][1][1];
}
- grad_grads[i + 4 * (my_degree + 1)][1][0][0]
- = p1_grad_grads[i + my_degree + 1][2][2];
- grad_grads[i + 4 * (my_degree + 1)][1][0][1]
- = p1_grad_grads[i + my_degree + 1][2][0];
- grad_grads[i + 4 * (my_degree + 1)][1][0][2]
- = p1_grad_grads[i + my_degree + 1][2][1];
- grad_grads[i + 4 * (my_degree + 1)][1][1][0]
- = p1_grad_grads[i + my_degree + 1][0][2];
- grad_grads[i + 4 * (my_degree + 1)][1][1][1]
- = p1_grad_grads[i + my_degree + 1][0][0];
- grad_grads[i + 4 * (my_degree + 1)][1][1][2]
- = p1_grad_grads[i + my_degree + 1][0][1];
- grad_grads[i + 4 * (my_degree + 1)][1][2][0]
- = p1_grad_grads[i + my_degree + 1][1][2];
- grad_grads[i + 4 * (my_degree + 1)][1][2][1]
- = p1_grad_grads[i + my_degree + 1][1][0];
- grad_grads[i + 4 * (my_degree + 1)][1][2][2]
- = p1_grad_grads[i + my_degree + 1][1][1];
- grad_grads[i + 5 * (my_degree + 1)][1][0][0]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2]
+ hessians[i + 4 * (my_degree + 1)][1][0][0]
+ = p1_hessians[i + my_degree + 1][2][2];
+ hessians[i + 4 * (my_degree + 1)][1][0][1]
+ = p1_hessians[i + my_degree + 1][2][0];
+ hessians[i + 4 * (my_degree + 1)][1][0][2]
+ = p1_hessians[i + my_degree + 1][2][1];
+ hessians[i + 4 * (my_degree + 1)][1][1][0]
+ = p1_hessians[i + my_degree + 1][0][2];
+ hessians[i + 4 * (my_degree + 1)][1][1][1]
+ = p1_hessians[i + my_degree + 1][0][0];
+ hessians[i + 4 * (my_degree + 1)][1][1][2]
+ = p1_hessians[i + my_degree + 1][0][1];
+ hessians[i + 4 * (my_degree + 1)][1][2][0]
+ = p1_hessians[i + my_degree + 1][1][2];
+ hessians[i + 4 * (my_degree + 1)][1][2][1]
+ = p1_hessians[i + my_degree + 1][1][0];
+ hessians[i + 4 * (my_degree + 1)][1][2][2]
+ = p1_hessians[i + my_degree + 1][1][1];
+ hessians[i + 5 * (my_degree + 1)][1][0][0]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][2]
[2];
- grad_grads[i + 5 * (my_degree + 1)][1][0][1]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2]
+ hessians[i + 5 * (my_degree + 1)][1][0][1]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][2]
[0];
- grad_grads[i + 5 * (my_degree + 1)][1][0][2]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][2]
+ hessians[i + 5 * (my_degree + 1)][1][0][2]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][2]
[1];
- grad_grads[i + 5 * (my_degree + 1)][1][1][0]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0]
+ hessians[i + 5 * (my_degree + 1)][1][1][0]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][0]
[2];
- grad_grads[i + 5 * (my_degree + 1)][1][1][1]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0]
+ hessians[i + 5 * (my_degree + 1)][1][1][1]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][0]
[0];
- grad_grads[i + 5 * (my_degree + 1)][1][1][2]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][0]
+ hessians[i + 5 * (my_degree + 1)][1][1][2]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][0]
[1];
- grad_grads[i + 5 * (my_degree + 1)][1][2][0]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1]
+ hessians[i + 5 * (my_degree + 1)][1][2][0]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][1]
[2];
- grad_grads[i + 5 * (my_degree + 1)][1][2][1]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1]
+ hessians[i + 5 * (my_degree + 1)][1][2][1]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][1]
[0];
- grad_grads[i + 5 * (my_degree + 1)][1][2][2]
- = p1_grad_grads[i + (my_degree + 1) * (my_degree + 3)][1]
+ hessians[i + 5 * (my_degree + 1)][1][2][2]
+ = p1_hessians[i + (my_degree + 1) * (my_degree + 3)][1]
[1];
}
{
for (unsigned int n = 0; n < 2; ++n)
{
- grad_grads[((i + 2
+ hessians[((i + 2
* GeometryInfo<dim>::faces_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell]
[n + 1][l][m] = 0.0;
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree
+ 1)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell]
[2 * n][l][m] = 0.0;
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree))
* my_degree
= 0.0;
}
- grad_grads[((i + 2
+ hessians[((i + 2
* GeometryInfo<dim>::faces_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell]
[0][l][m]
- = unit_point_grad_grads[i + (j + (k + 2)
+ = unit_point_hessians[i + (j + (k + 2)
* (my_degree + 2)
+ 2) * (my_degree
+ 1)][l][m];
}
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree)
* (my_degree + 1)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][0]
[0]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][2][2];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][0]
[1]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][2][0];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][0]
[2]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][2][1];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][1]
[0]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][0][2];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][1]
[1]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][0][0];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][1]
[2]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][0][1];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][2]
[0]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][1][2];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][2]
[1]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][1][0];
- grad_grads[(i + (j + 2
+ hessians[(i + (j + 2
* GeometryInfo<dim>::faces_per_cell
+ my_degree) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + k
+ GeometryInfo<dim>::lines_per_cell][1][2]
[2]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k
+ 2) * (my_degree + 1)][1][1];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][0][0]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][1][1];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][0][1]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][1][2];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree))
* my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][0][2]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][1][0];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree))
* my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][1][0]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][2][1];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][1][1]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][2][2];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][1][2]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][2][0];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][2][0]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][0][1];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][2][1]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][0][2];
- grad_grads[i + (j + (k + 2
+ hessians[i + (j + (k + 2
* (GeometryInfo<dim>::faces_per_cell
+ my_degree)) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][2][2]
- = p2_grad_grads[i + (j + (k + 2) * (my_degree + 2)
+ = p2_hessians[i + (j + (k + 2) * (my_degree + 2)
+ 2) * (my_degree + 1)][0][0];
}
{
for (unsigned int o = 0; o < 2; ++o)
{
- grad_grads[i + (j + (2 * (k + 2 * n)
+ hessians[i + (j + (2 * (k + 2 * n)
+ 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][o + n][l][m]
= 0.0;
- grad_grads[(i + 2 * (k + 2 * (n + 1))
+ hessians[(i + 2 * (k + 2 * (n + 1))
* (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
[o + k][l][m] = 0.0;
}
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell]
[2 * n][l][m] = 0.0;
- grad_grads[i + (j + (2 * k + 9)
+ hessians[i + (j + (2 * k + 9)
* my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2 * n][l][m]
= 0.0;
}
- grad_grads[i + (j + (2 * k + 5) * my_degree
+ hessians[i + (j + (2 * k + 5) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)]
[0][l][m]
- = unit_point_grad_grads[i + ((j + 2)
+ = unit_point_hessians[i + ((j + 2)
* (my_degree
+ 2) + k)
* (my_degree + 1)][l]
[m];
- grad_grads[(i + 2 * (k + 4) * (my_degree + 1)
+ hessians[(i + 2 * (k + 4) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell]
[0][l][m]
- = unit_point_grad_grads[i + (j + k
+ = unit_point_hessians[i + (j + k
* (my_degree
+ 2) + 2)
* (my_degree + 1)][l]
[m];
}
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][0]
[0]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][2][2];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][0]
[1]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][2][0];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][0]
[2]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][2][1];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][1]
[0]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][0][2];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][1]
[1]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][0][0];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][1]
[2]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][0][1];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][2]
[0]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][1][2];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][2]
[1]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][1][0];
- grad_grads[(i + 2 * k * (my_degree + 1)
+ hessians[(i + 2 * k * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][1][2]
[2]
- = p1_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p1_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][1][1];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][0][0]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][1][1];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][0][1]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][1][2];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][0][2]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][1][0];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][1][0]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][2][1];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][1][1]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][2][2];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][1][2]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][2][0];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][2][0]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][0][1];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][2][1]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][0][2];
- grad_grads[i + (j + (2 * k + 1) * my_degree
+ hessians[i + (j + (2 * k + 1) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][2][2][2]
- = p2_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p2_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][0][0];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][0][0]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][1][1];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][0][1]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][1][2];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][0][2]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][1][0];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][1][0]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][2][1];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][1][1]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][2][2];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][1][2]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][2][0];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][2][0]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][0][1];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][2][1]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][0][2];
- grad_grads[(i + 2 * (k + 2) * (my_degree + 1)
+ hessians[(i + 2 * (k + 2) * (my_degree + 1)
+ GeometryInfo<dim>::lines_per_cell)
* my_degree + j
+ GeometryInfo<dim>::lines_per_cell][2][2][2]
- = p2_grad_grads[i + (j + k * (my_degree + 2) + 2)
+ = p2_hessians[i + (j + k * (my_degree + 2) + 2)
* (my_degree + 1)][0][0];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][0][0]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][2][2];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][0][1]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][2][0];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][0][2]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][2][1];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][1][0]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][0][2];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][1][1]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][0][0];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][1][2]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][0][1];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][2][0]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][1][2];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][2][1]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][1][0];
- grad_grads[i + (j + (2 * k + 9) * my_degree
+ hessians[i + (j + (2 * k + 9) * my_degree
+ GeometryInfo<dim>::lines_per_cell)
* (my_degree + 1)][1][2][2]
- = p1_grad_grads[i + ((j + 2) * (my_degree + 2) + k)
+ = p1_hessians[i + ((j + 2) * (my_degree + 2) + k)
* (my_degree + 1)][1][1];
}
}
PolynomialsRaviartThomas<dim>::compute (const Point<dim> &unit_point,
std::vector<Tensor<1,dim> > &values,
std::vector<Tensor<2,dim> > &grads,
- std::vector<Tensor<3,dim> > &grad_grads) const
+ std::vector<Tensor<3,dim> > &hessians) const
{
Assert(values.size()==n_pols || values.size()==0,
ExcDimensionMismatch(values.size(), n_pols));
Assert(grads.size()==n_pols|| grads.size()==0,
ExcDimensionMismatch(grads.size(), n_pols));
- Assert(grad_grads.size()==n_pols|| grad_grads.size()==0,
- ExcDimensionMismatch(grad_grads.size(), n_pols));
+ Assert(hessians.size()==n_pols|| hessians.size()==0,
+ ExcDimensionMismatch(hessians.size(), n_pols));
// have a few scratch
// arrays. because we don't want to
static std::vector<double> p_values;
static std::vector<Tensor<1,dim> > p_grads;
- static std::vector<Tensor<2,dim> > p_grad_grads;
+ static std::vector<Tensor<2,dim> > p_hessians;
const unsigned int n_sub = polynomial_space.n();
p_values.resize((values.size() == 0) ? 0 : n_sub);
p_grads.resize((grads.size() == 0) ? 0 : n_sub);
- p_grad_grads.resize((grad_grads.size() == 0) ? 0 : n_sub);
+ p_hessians.resize((hessians.size() == 0) ? 0 : n_sub);
for (unsigned int d=0;d<dim;++d)
{
for (unsigned int c=0;c<dim;++c)
p(c) = unit_point((c+d)%dim);
- polynomial_space.compute (p, p_values, p_grads, p_grad_grads);
+ polynomial_space.compute (p, p_values, p_grads, p_hessians);
for (unsigned int i=0;i<p_values.size();++i)
values[i+d*n_sub][d] = p_values[i];
for (unsigned int d1=0;d1<dim;++d1)
grads[i+d*n_sub][d][(d1+d)%dim] = p_grads[i][d1];
- for (unsigned int i=0;i<p_grad_grads.size();++i)
+ for (unsigned int i=0;i<p_hessians.size();++i)
for (unsigned int d1=0;d1<dim;++d1)
for (unsigned int d2=0;d2<dim;++d2)
- grad_grads[i+d*n_sub][d][(d1+d)%dim][(d2+d)%dim]
- = p_grad_grads[i][d1][d2];
+ hessians[i+d*n_sub][d][(d1+d)%dim][(d2+d)%dim]
+ = p_hessians[i][d1][d2];
}
}
template <int dim>
Tensor<2,dim>
-TensorProductPolynomials<dim>::compute_grad_grad (const unsigned int i,
+TensorProductPolynomials<dim>::compute_hessian (const unsigned int i,
const Point<dim> &p) const
{
unsigned int indices[dim];
}
}
- Tensor<2,dim> grad_grad;
+ Tensor<2,dim> hessian;
for (unsigned int d1=0; d1<dim; ++d1)
for (unsigned int d2=0; d2<dim; ++d2)
{
- grad_grad[d1][d2] = 1.;
+ hessian[d1][d2] = 1.;
for (unsigned int x=0; x<dim; ++x)
{
unsigned int derivative=0;
else
derivative=1;
}
- grad_grad[d1][d2] *= v[x][derivative];
+ hessian[d1][d2] *= v[x][derivative];
}
}
- return grad_grad;
+ return hessian;
}
compute (const Point<dim> &p,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
- std::vector<Tensor<2,dim> > &grad_grads) const
+ std::vector<Tensor<2,dim> > &hessians) const
{
Assert (values.size()==n_tensor_pols || values.size()==0,
ExcDimensionMismatch2(values.size(), n_tensor_pols, 0));
Assert (grads.size()==n_tensor_pols || grads.size()==0,
ExcDimensionMismatch2(grads.size(), n_tensor_pols, 0));
- Assert (grad_grads.size()==n_tensor_pols|| grad_grads.size()==0,
- ExcDimensionMismatch2(grad_grads.size(), n_tensor_pols, 0));
+ Assert (hessians.size()==n_tensor_pols|| hessians.size()==0,
+ ExcDimensionMismatch2(hessians.size(), n_tensor_pols, 0));
const bool update_values = (values.size() == n_tensor_pols),
update_grads = (grads.size()==n_tensor_pols),
- update_grad_grads = (grad_grads.size()==n_tensor_pols);
+ update_hessians = (hessians.size()==n_tensor_pols);
// check how many
// values/derivatives we have to
n_values_and_derivatives = 1;
if (update_grads)
n_values_and_derivatives = 2;
- if (update_grad_grads)
+ if (update_hessians)
n_values_and_derivatives = 3;
grads[i][d] *= v(x,indices[x])[d==x];
}
- if (update_grad_grads)
+ if (update_hessians)
for (unsigned int d1=0; d1<dim; ++d1)
for (unsigned int d2=0; d2<dim; ++d2)
{
- grad_grads[i][d1][d2] = 1.;
+ hessians[i][d1][d2] = 1.;
for (unsigned int x=0; x<dim; ++x)
{
unsigned int derivative=0;
else
derivative=1;
}
- grad_grads[i][d1][d2]
+ hessians[i][d1][d2]
*= v(x,indices[x])[derivative];
}
}
template <int dim>
Tensor<2,dim>
-AnisotropicPolynomials<dim>::compute_grad_grad (const unsigned int i,
+AnisotropicPolynomials<dim>::compute_hessian (const unsigned int i,
const Point<dim> &p) const
{
unsigned int indices[dim];
for (unsigned int d=0; d<dim; ++d)
polynomials[d][indices[d]].value(p(d), v[d]);
- Tensor<2,dim> grad_grad;
+ Tensor<2,dim> hessian;
for (unsigned int d1=0; d1<dim; ++d1)
for (unsigned int d2=0; d2<dim; ++d2)
{
- grad_grad[d1][d2] = 1.;
+ hessian[d1][d2] = 1.;
for (unsigned int x=0; x<dim; ++x)
{
unsigned int derivative=0;
else
derivative=1;
}
- grad_grad[d1][d2] *= v[x][derivative];
+ hessian[d1][d2] *= v[x][derivative];
}
}
- return grad_grad;
+ return hessian;
}
compute (const Point<dim> &p,
std::vector<double> &values,
std::vector<Tensor<1,dim> > &grads,
- std::vector<Tensor<2,dim> > &grad_grads) const
+ std::vector<Tensor<2,dim> > &hessians) const
{
Assert (values.size()==n_tensor_pols || values.size()==0,
ExcDimensionMismatch2(values.size(), n_tensor_pols, 0));
Assert (grads.size()==n_tensor_pols|| grads.size()==0,
ExcDimensionMismatch2(grads.size(), n_tensor_pols, 0));
- Assert (grad_grads.size()==n_tensor_pols|| grad_grads.size()==0,
- ExcDimensionMismatch2(grad_grads.size(), n_tensor_pols, 0));
+ Assert (hessians.size()==n_tensor_pols|| hessians.size()==0,
+ ExcDimensionMismatch2(hessians.size(), n_tensor_pols, 0));
const bool update_values = (values.size() == n_tensor_pols),
update_grads = (grads.size()==n_tensor_pols),
- update_grad_grads = (grad_grads.size()==n_tensor_pols);
+ update_hessians = (hessians.size()==n_tensor_pols);
// check how many
// values/derivatives we have to
n_values_and_derivatives = 1;
if (update_grads)
n_values_and_derivatives = 2;
- if (update_grad_grads)
+ if (update_hessians)
n_values_and_derivatives = 3;
grads[i][d] *= v[x][indices[x]][d==x ? 1 : 0];
}
- if (update_grad_grads)
+ if (update_hessians)
for (unsigned int d1=0; d1<dim; ++d1)
for (unsigned int d2=0; d2<dim; ++d2)
{
- grad_grads[i][d1][d2] = 1.;
+ hessians[i][d1][d2] = 1.;
for (unsigned int x=0; x<dim; ++x)
{
unsigned int derivative=0;
else
derivative=1;
}
- grad_grads[i][d1][d2]
+ hessians[i][d1][d2]
*= v[x][indices[x]][derivative];
}
}
template <int dim, int spacedim>
Tensor<2,dim>
-FiniteElement<dim,spacedim>::shape_grad_grad (const unsigned int,
+FiniteElement<dim,spacedim>::shape_hessian (const unsigned int,
const Point<dim> &) const
{
AssertThrow(false, ExcUnitShapeValuesDoNotExist());
template <int dim, int spacedim>
Tensor<2,dim>
-FiniteElement<dim,spacedim>::shape_grad_grad_component (const unsigned int,
+FiniteElement<dim,spacedim>::shape_hessian_component (const unsigned int,
const Point<dim> &,
const unsigned int) const
{
template <int dim, int spacedim>
Tensor<2,dim>
-FE_DGPNonparametric<dim,spacedim>::shape_grad_grad (const unsigned int i,
+FE_DGPNonparametric<dim,spacedim>::shape_hessian (const unsigned int i,
const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
- return polynomial_space.compute_grad_grad(i, p);
+ return polynomial_space.compute_hessian(i, p);
}
template <int dim, int spacedim>
Tensor<2,dim>
-FE_DGPNonparametric<dim,spacedim>::shape_grad_grad_component (const unsigned int i,
+FE_DGPNonparametric<dim,spacedim>::shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
Assert (component == 0, ExcIndexRange (component, 0, 1));
- return polynomial_space.compute_grad_grad(i, p);
+ return polynomial_space.compute_hessian(i, p);
}
if (flags & update_hessians)
{
- data->grad_grads.resize (this->dofs_per_cell);
+ data->hessians.resize (this->dofs_per_cell);
}
return data;
}
for (unsigned int i=0; i<n_q_points; ++i)
{
polynomial_space.compute(data.quadrature_points[i],
- fe_data.values, fe_data.grads, fe_data.grad_grads);
+ fe_data.values, fe_data.grads, fe_data.hessians);
for (unsigned int k=0; k<this->dofs_per_cell; ++k)
{
if (flags & update_values)
if (flags & update_gradients)
data.shape_gradients[k][i] = fe_data.grads[k];
if (flags & update_hessians)
- data.shape_hessians[k][i] = fe_data.grad_grads[k];
+ data.shape_hessians[k][i] = fe_data.hessians[k];
}
}
}
for (unsigned int i=0; i<n_q_points; ++i)
{
polynomial_space.compute(data.quadrature_points[i],
- fe_data.values, fe_data.grads, fe_data.grad_grads);
+ fe_data.values, fe_data.grads, fe_data.hessians);
for (unsigned int k=0; k<this->dofs_per_cell; ++k)
{
if (flags & update_values)
if (flags & update_gradients)
data.shape_gradients[k][i] = fe_data.grads[k];
if (flags & update_hessians)
- data.shape_hessians[k][i] = fe_data.grad_grads[k];
+ data.shape_hessians[k][i] = fe_data.hessians[k];
}
}
}
for (unsigned int i=0; i<n_q_points; ++i)
{
polynomial_space.compute(data.quadrature_points[i],
- fe_data.values, fe_data.grads, fe_data.grad_grads);
+ fe_data.values, fe_data.grads, fe_data.hessians);
for (unsigned int k=0; k<this->dofs_per_cell; ++k)
{
if (flags & update_values)
if (flags & update_gradients)
data.shape_gradients[k][i] = fe_data.grads[k];
if (flags & update_hessians)
- data.shape_hessians[k][i] = fe_data.grad_grads[k];
+ data.shape_hessians[k][i] = fe_data.hessians[k];
}
}
}
{
cached_point = p;
cached_values.resize(poly_space.n());
- poly_space.compute(p, cached_values, cached_grads, cached_grad_grads);
+ poly_space.compute(p, cached_values, cached_grads, cached_hessians);
}
double s = 0;
{
cached_point = p;
cached_grads.resize(poly_space.n());
- poly_space.compute(p, cached_values, cached_grads, cached_grad_grads);
+ poly_space.compute(p, cached_values, cached_grads, cached_hessians);
}
Tensor<1,dim> s;
template <class POLY, int dim, int spacedim>
Tensor<2,dim>
-FE_PolyTensor<POLY,dim,spacedim>::shape_grad_grad (const unsigned int, const Point<dim> &) const
+FE_PolyTensor<POLY,dim,spacedim>::shape_hessian (const unsigned int, const Point<dim> &) const
{
typedef FiniteElement<dim,spacedim> FEE;
Assert(false, typename FEE::ExcFENotPrimitive());
template <class POLY, int dim, int spacedim>
Tensor<2,dim>
-FE_PolyTensor<POLY,dim,spacedim>::shape_grad_grad_component (const unsigned int i,
+FE_PolyTensor<POLY,dim,spacedim>::shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell));
Assert (component < dim, ExcIndexRange (component, 0, dim));
- if (cached_point != p || cached_grad_grads.size() == 0)
+ if (cached_point != p || cached_hessians.size() == 0)
{
cached_point = p;
- cached_grad_grads.resize(poly_space.n());
- poly_space.compute(p, cached_values, cached_grads, cached_grad_grads);
+ cached_hessians.resize(poly_space.n());
+ poly_space.compute(p, cached_values, cached_grads, cached_hessians);
}
Tensor<2,dim> s;
if (inverse_node_matrix.n_cols() == 0)
- return cached_grad_grads[i][component];
+ return cached_hessians[i][component];
else
for (unsigned int j=0;j<inverse_node_matrix.n_cols();++j)
- s += inverse_node_matrix(i,j) * cached_grad_grads[j][component];
+ s += inverse_node_matrix(i,j) * cached_hessians[j][component];
return s;
}
// some scratch arrays
std::vector<Tensor<1,dim> > values(0);
std::vector<Tensor<2,dim> > grads(0);
- std::vector<Tensor<3,dim> > grad_grads(0);
+ std::vector<Tensor<3,dim> > hessians(0);
// initialize fields only if really
// necessary. otherwise, don't
// that
if (flags & update_hessians)
{
-// grad_grads.resize (this->dofs_per_cell);
+// hessians.resize (this->dofs_per_cell);
data->initialize_2nd (this, mapping, quadrature);
}
for (unsigned int k=0; k<n_q_points; ++k)
{
poly_space.compute(quadrature.point(k),
- values, grads, grad_grads);
+ values, grads, hessians);
if (flags & update_values)
{
template <int dim, int spacedim>
Tensor<2,dim>
-FESystem<dim,spacedim>::shape_grad_grad (const unsigned int i,
+FESystem<dim,spacedim>::shape_hessian (const unsigned int i,
const Point<dim> &p) const
{
Assert (i<this->dofs_per_cell, ExcIndexRange(i, 0, this->dofs_per_cell));
(typename FiniteElement<dim,spacedim>::ExcShapeFunctionNotPrimitive(i)));
return (base_element(this->system_to_base_table[i].first.first)
- .shape_grad_grad(this->system_to_base_table[i].second, p));
+ .shape_hessian(this->system_to_base_table[i].second, p));
}
template <int dim, int spacedim>
Tensor<2,dim>
-FESystem<dim,spacedim>::shape_grad_grad_component (const unsigned int i,
+FESystem<dim,spacedim>::shape_hessian_component (const unsigned int i,
const Point<dim> &p,
const unsigned int component) const
{
// primitive; thus, there is no
// need to check this here
return (base_element(base).
- shape_grad_grad_component(this->system_to_base_table[i].second,
+ shape_hessian_component(this->system_to_base_table[i].second,
p,
component_in_base));
}