unsigned int
TableBase<N,T>::n_elements () const
{
- unsigned s = 1;
+ unsigned int s = 1;
for (unsigned int n=0; n<N; ++n)
s *= table_size[n];
return s;
/**
* Store the indices in an array.
*/
- unsigned indices[N];
+ unsigned int indices[N];
};
{
AssertDimension (result.size(),(Utilities::fixed_power<rank_, unsigned int>(dim)));
- unsigned index = 0;
+ unsigned int index = 0;
unroll_recursion (result, index);
}
Tensor<rank_, dim, Number>::unroll_recursion (Vector<Number2> &result,
unsigned int &index) const
{
- for (unsigned i=0; i<dim; ++i)
+ for (unsigned int i=0; i<dim; ++i)
{
operator[](i).unroll_recursion(result, index);
}
* inner product <tt> sum<sub>i,j</sub> src1[i][j]*src2[i][j]</tt>.
*
* @relates Tensor
- * @author Guido Kanschat, 2000
+ * @author Guido Kanschat, 2000
*/
template <int dim, typename Number>
inline
Number res = 0.;
for (unsigned int i=0; i<dim; ++i)
res += contract(src1[i],src2[i]);
-
+
return res;
}
Assert (result.size()==dim,
ExcDimensionMismatch(dim, result.size()));
- unsigned index = 0;
+ unsigned int index = 0;
unroll_recursion (result,index);
}
Tensor<1,dim,Number>::unroll_recursion (Vector<Number2> &result,
unsigned int &index) const
{
- for (unsigned i=0; i<dim; ++i)
+ for (unsigned int i=0; i<dim; ++i)
result(index++) = operator[](i);
}
AssertDimension(M.m(), t_dofs);
AssertDimension(M.n(), n_dofs);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = fe.JxW(k) * factor;
- for (unsigned i=0;i<t_dofs;++i)
+ for (unsigned int i=0;i<t_dofs;++i)
{
const double vv = fetest.shape_value(i,k);
for (unsigned int d=0;d<dim;++d)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int j=0;j<n_dofs;++j)
{
const double du = fe.shape_grad_component(j,k,d)[d];
M(i,j) += dx * du * vv;
const unsigned int t_dofs = fetest.dofs_per_cell;
Assert (result.size() == t_dofs, ExcDimensionMismatch(result.size(), t_dofs));
- for (unsigned k=0;k<fetest.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fetest.n_quadrature_points;++k)
{
const double dx = factor * fetest.JxW(k);
- for (unsigned i=0;i<t_dofs;++i)
+ for (unsigned int i=0;i<t_dofs;++i)
for (unsigned int d=0;d<dim;++d)
result(i) += dx * input[d][k][d] * fetest.shape_value(i,k);
}
AssertDimension(M.m(), t_dofs);
AssertDimension(M.n(), n_dofs);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = fe.JxW(k) * factor;
for (unsigned int d=0;d<dim;++d)
- for (unsigned i=0;i<t_dofs;++i)
+ for (unsigned int i=0;i<t_dofs;++i)
{
const double vv = fetest.shape_value_component(i,k,d);
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int j=0;j<n_dofs;++j)
{
const Tensor<1,dim>& Du = fe.shape_grad(j,k);
M(i,j) += dx * vv * Du[d];
const unsigned int t_dofs = fetest.dofs_per_cell;
Assert (result.size() == t_dofs, ExcDimensionMismatch(result.size(), t_dofs));
- for (unsigned k=0;k<fetest.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fetest.n_quadrature_points;++k)
{
const double dx = factor * fetest.JxW(k);
- for (unsigned i=0;i<t_dofs;++i)
+ for (unsigned int i=0;i<t_dofs;++i)
for (unsigned int d=0;d<dim;++d)
result(i) += dx * input[k][d] * fetest.shape_value_component(i,k,d);
}
AssertDimension(M.m(), t_dofs);
AssertDimension(M.n(), n_dofs);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const Tensor<1,dim> ndx = factor * fe.JxW(k) * fe.normal_vector(k);
- for (unsigned i=0;i<t_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<t_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<dim;++d)
M(i,j) += ndx[d] * fe.shape_value_component(j,k,d)
* fetest.shape_value(i,k);
AssertDimension(result.size(), t_dofs);
AssertVectorVectorDimension (data, dim, fe.n_quadrature_points);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const Tensor<1,dim> ndx = factor * fe.normal_vector(k) * fe.JxW(k);
- for (unsigned i=0;i<t_dofs;++i)
+ for (unsigned int i=0;i<t_dofs;++i)
for (unsigned int d=0;d<dim;++d)
result(i) += ndx[d] * fetest.shape_value(i,k) * data[d][k];
}
AssertDimension(M22.m(), t_dofs);
AssertDimension(M22.n(), n_dofs);
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = factor * fe1.JxW(k);
- for (unsigned i=0;i<t_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<t_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<dim;++d)
{
const double un1 = fe1.shape_value_component(j,k,d) * fe1.normal_vector(k)[d];
AssertDimension(M.m(), n_dofs);
AssertDimension(M.n(), n_dofs);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
{
double dv = 0.;
double du = 0.;
AssertDimension(M22.m(), n_dofs);
AssertDimension(M22.n(), n_dofs);
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = factor * fe1.JxW(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<dim;++d)
{
const double un1 = fe1.shape_value_component(j,k,d) * fe1.normal_vector(k)[d];
AssertVectorVectorDimension (Du, dim, fe.n_quadrature_points);
double result = 0;
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
double div = Du[0][k][0];
for (unsigned int d=1;d<dim;++d)
AssertDimension(M.m(), n_dofs);
AssertDimension(M.n(), n_dofs);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d1=0;d1<dim;++d1)
for (unsigned int d2=0;d2<dim;++d2)
M(i,j) += dx * .25 *
AssertDimension(M.m(), n_dofs);
AssertDimension(M.n(), n_dofs);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
const Point<dim>& n = fe.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d1=0;d1<dim;++d1)
{
const double u = fe.shape_value_component(j,k,d1);
const double nu2 = (ext_factor < 0) ? int_factor : ext_factor;
const double penalty = .5 * pen * (nu1 + nu2);
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = fe1.JxW(k);
const Point<dim>& n = fe1.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d1=0;d1<dim;++d1)
{
const double u1 = fe1.shape_value_component(j,k,d1);
const unsigned int n_dofs = fe.dofs_per_cell;
const unsigned int n_components = fe.get_fe().n_components();
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = fe.JxW(k) * factor;
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<n_components;++d)
M(i,j) += dx
* fe.shape_value_component(j,k,d)
AssertDimension(fe.get_fe().n_components(), 1);
AssertDimension(input.size(), fe.n_quadrature_points);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int i=0;i<n_dofs;++i)
result(i) += fe.JxW(k) * factor * input[k] * fe.shape_value(i,k);
}
AssertDimension(result.size(), n_dofs);
AssertDimension(input.size(), fe_components);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int i=0;i<n_dofs;++i)
for (unsigned int d=0;d<n_components;++d)
result(i) += fe.JxW(k) * factor * fe.shape_value_component(i,k,d) * input[d][k];
}
AssertDimension(M21.n(), n1_dofs);
AssertDimension(M22.n(), n2_dofs);
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = fe1.JxW(k);
- for (unsigned i=0;i<n1_dofs;++i)
- for (unsigned j=0;j<n1_dofs;++j)
+ for (unsigned int i=0;i<n1_dofs;++i)
+ for (unsigned int j=0;j<n1_dofs;++j)
for (unsigned int d=0;d<n_components;++d)
{
const double u1 = factor1*fe1.shape_value_component(j,k,d);
const unsigned int n_dofs = fe.dofs_per_cell;
const unsigned int n_components = fe.get_fe().n_components();
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = fe.JxW(k) * factor;
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
{
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<n_components;++d)
M(i,j) += dx *
(fe.shape_grad_component(j,k,d) * fe.shape_grad_component(i,k,d));
Assert(input.size() == nq, ExcDimensionMismatch(input.size(), nq));
Assert(result.size() == n_dofs, ExcDimensionMismatch(result.size(), n_dofs));
- for (unsigned k=0;k<nq;++k)
+ for (unsigned int k=0;k<nq;++k)
{
const double dx = factor * fe.JxW(k);
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
result(i) += dx * (input[k] * fe.shape_grad(i,k));
}
}
AssertVectorVectorDimension(input, n_comp, fe.n_quadrature_points);
Assert(result.size() == n_dofs, ExcDimensionMismatch(result.size(), n_dofs));
- for (unsigned k=0;k<nq;++k)
+ for (unsigned int k=0;k<nq;++k)
{
const double dx = factor * fe.JxW(k);
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
for (unsigned int d=0;d<n_comp;++d)
{
Assert (M.m() == n_dofs, ExcDimensionMismatch(M.m(), n_dofs));
Assert (M.n() == n_dofs, ExcDimensionMismatch(M.n(), n_dofs));
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = fe.JxW(k) * factor;
const Point<dim>& n = fe.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<n_comp;++d)
M(i,j) += dx *
(2. * fe.shape_value_component(i,k,d) * penalty * fe.shape_value_component(j,k,d)
AssertDimension(Dinput.size(), fe.n_quadrature_points);
AssertDimension(data.size(), fe.n_quadrature_points);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
const Point<dim>& n = fe.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
{
const double dnv = fe.shape_grad(i,k) * n;
const double dnu = Dinput[k] * n;
AssertVectorVectorDimension(Dinput, n_comp, fe.n_quadrature_points);
AssertVectorVectorDimension(data, n_comp, fe.n_quadrature_points);
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
const Point<dim>& n = fe.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
for (unsigned int d=0;d<n_comp;++d)
{
const double dnv = fe.shape_grad_component(i,k,d) * n;
const double nui = factor1;
const double nue = (factor2 < 0) ? factor1 : factor2;
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = fe1.JxW(k);
const Point<dim>& n = fe1.normal_vector(k);
for (unsigned int d=0;d<fe1.get_fe().n_components();++d)
{
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
{
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int j=0;j<n_dofs;++j)
{
const double vi = fe1.shape_value_component(i,k,d);
const double dnvi = n * fe1.shape_grad_component(i,k,d);
const unsigned int n_dofs = fe1.dofs_per_cell;
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = fe1.JxW(k);
const Point<dim>& n = fe1.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
+ for (unsigned int i=0;i<n_dofs;++i)
{
const double vi = fe1.shape_value(i,k);
const Tensor<1,dim>& Dvi = fe1.shape_grad(i,k);
const double penalty = .5 * pen * (nui + nue);
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = fe1.JxW(k);
const Point<dim>& n = fe1.normal_vector(k);
- for (unsigned i=0;i<n1;++i)
+ for (unsigned int i=0;i<n1;++i)
for (unsigned int d=0;d<n_comp;++d)
{
const double vi = fe1.shape_value_component(i,k,d);
// all dimensions
const unsigned int d_max = (dim==2) ? 1 : dim;
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<d_max;++d)
{
const unsigned int d1 = (d+1)%dim;
const unsigned int d_max = (dim==2) ? 1 : dim;
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = fe.JxW(k) * factor;
- for (unsigned i=0;i<t_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<t_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<d_max;++d)
{
const unsigned int d1 = (d+1)%dim;
// over all dimensions
const unsigned int d_max = (dim==2) ? 1 : dim;
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
const Point<dim>& n = fe.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<d_max;++d)
{
const unsigned int d1 = (d+1)%dim;
// over all dimensions
const unsigned int d_max = (dim==2) ? 1 : dim;
- for (unsigned k=0;k<fe.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe.n_quadrature_points;++k)
{
const double dx = factor * fe.JxW(k);
const Point<dim>& n = fe.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
for (unsigned int d=0;d<d_max;++d)
{
const unsigned int d1 = (d+1)%dim;
// over all dimensions
const unsigned int d_max = (dim==2) ? 1 : dim;
- for (unsigned k=0;k<fe1.n_quadrature_points;++k)
+ for (unsigned int k=0;k<fe1.n_quadrature_points;++k)
{
const double dx = fe1.JxW(k);
const Point<dim>& n = fe1.normal_vector(k);
- for (unsigned i=0;i<n_dofs;++i)
- for (unsigned j=0;j<n_dofs;++j)
- for (unsigned d=0;d<d_max;++d)
+ for (unsigned int i=0;i<n_dofs;++i)
+ for (unsigned int j=0;j<n_dofs;++j)
+ for (unsigned int d=0;d<d_max;++d)
{
const unsigned int d1 = (d+1)%dim;
const unsigned int d2 = (d+2)%dim;
{
AssertIndexRange(block, index_sets.size());
const block_container& b = index_sets[block];
- for (unsigned i=0;i<b.size();++i)
+ for (unsigned int i=0; i<b.size(); ++i)
if (b[i] == index)
return i;
return numbers::invalid_unsigned_int;
template <class BlockVectorType, bool constness>
Iterator<BlockVectorType,constness>::
- Iterator (BlockVector &parent,
- const unsigned global_index)
+ Iterator (BlockVector &parent,
+ const unsigned int global_index)
:
parent (&parent),
global_index (global_index)
Assert (!this->empty(), ExcEmptyMatrix());
const unsigned int size_m = m();
- for (unsigned l=0; l<size_m; ++l)
+ for (unsigned int l=0; l<size_m; ++l)
(*this)(i,l) += s*(*this)(j,l) + t*(*this)(k,l);
}
* compute_eigenvalues(), you can
* access each eigenvalue here.
*/
- number eigenvalue(const unsigned i) const;
+ number eigenvalue(const unsigned int i) const;
//@}
///@name Miscellanea
//@{
{
grad_out[comp][d] = (jac[d][0] *
this->gradients_quad[comp][0][q_point]);
- for (unsigned e=1; e<dim; ++e)
+ for (unsigned int e=1; e<dim; ++e)
grad_out[comp][d] += (jac[d][e] *
this->gradients_quad[comp][e][q_point]);
}
for (unsigned int d=0; d<dim; ++d)
{
VectorizedArray<Number> new_val = jac[0][d] * grad_in[comp][0];
- for (unsigned e=1; e<dim; ++e)
+ for (unsigned int e=1; e<dim; ++e)
new_val += (jac[e][d] * grad_in[comp][e]);
this->gradients_quad[comp][d][q_point] = new_val * JxW;
}
for (unsigned int d=0; d<dim; ++d)
{
grad_out[d] = (jac[d][0] * this->gradients_quad[0][0][q_point]);
- for (unsigned e=1; e<dim; ++e)
+ for (unsigned int e=1; e<dim; ++e)
grad_out[d] += (jac[d][e] * this->gradients_quad[0][e][q_point]);
}
}
for (unsigned int d=0; d<dim; ++d)
{
VectorizedArray<Number> new_val = jac[0][d] * grad_in[0];
- for (unsigned e=1; e<dim; ++e)
+ for (unsigned int e=1; e<dim; ++e)
new_val += jac[e][d] * grad_in[e];
this->gradients_quad[0][d][q_point] = new_val * JxW;
}
this->cell_type == internal::MatrixFreeFunctions::general ?
this->jacobian[q_point] : this->jacobian[0];
divergence = (jac[0][0] * this->gradients_quad[0][0][q_point]);
- for (unsigned e=1; e<dim; ++e)
+ for (unsigned int e=1; e<dim; ++e)
divergence += (jac[0][e] * this->gradients_quad[0][e][q_point]);
for (unsigned int d=1; d<dim; ++d)
- for (unsigned e=0; e<dim; ++e)
+ for (unsigned int e=0; e<dim; ++e)
divergence += (jac[d][e] * this->gradients_quad[d][e][q_point]);
}
return divergence;
this->quadrature_weights[q_point]) * div_in;
for (unsigned int d=0; d<dim; ++d)
{
- for (unsigned e=0; e<dim; ++e)
+ for (unsigned int e=0; e<dim; ++e)
this->gradients_quad[d][e][q_point] = jac[d][e] * fac;
}
}
for (unsigned int d=0; d<dim; ++d)
{
VectorizedArray<Number> new_val = jac[0][d] * weighted[comp][0];
- for (unsigned e=1; e<dim; ++e)
+ for (unsigned int e=1; e<dim; ++e)
new_val += jac[e][d] * weighted[comp][e];
this->gradients_quad[comp][d][q_point] = new_val;
}
// left-most and right-most
// vertex and query its vertex
// dof indices. that's easy :-)
- for (unsigned direction=0; direction<2; ++direction)
+ for (unsigned int direction=0; direction<2; ++direction)
{
dealii::DoFHandler<1>::cell_iterator
cell = dof_handler.begin(0);
// left-most and right-most
// vertex and query its vertex
// dof indices. that's easy :-)
- for (unsigned direction=0; direction<2; ++direction)
+ for (unsigned int direction=0; direction<2; ++direction)
{
dealii::DoFHandler<1,2>::cell_iterator
cell = dof_handler.begin(0);
case UpwindEuler:
{
Point<dim> q1;
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
for (unsigned int i=0; i<dim; ++i)
{
q1=points[p]-ht[i];
case Euler:
{
Point<dim> q1, q2;
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
for (unsigned int i=0; i<dim; ++i)
{
q1=points[p]+ht[i];
case FourthOrder:
{
Point<dim> q1, q2, q3, q4;
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
for (unsigned int i=0; i<dim; ++i)
{
q2=points[p]+ht[i];
{
Assert (gradients.size() == points.size(),
ExcDimensionMismatch(gradients.size(), points.size()));
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
Assert (gradients[p].size() == this->n_components,
ExcDimensionMismatch(gradients.size(), this->n_components));
case UpwindEuler:
{
Point<dim> q1;
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
for (unsigned int i=0; i<dim; ++i)
{
q1=points[p]-ht[i];
case Euler:
{
Point<dim> q1, q2;
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
for (unsigned int i=0; i<dim; ++i)
{
q1=points[p]+ht[i];
case FourthOrder:
{
Point<dim> q1, q2, q3, q4;
- for (unsigned p=0; p<points.size(); ++p)
+ for (unsigned int p=0; p<points.size(); ++p)
for (unsigned int i=0; i<dim; ++i)
{
q2=points[p]+ht[i];
GeometryInfo<dim>::project_to_unit_cell (const Point<dim> &q)
{
Point<dim> p = q;
- for(unsigned i=0; i<dim; i++)
+ for(unsigned int i=0; i<dim; i++)
if (p[i] < 0.) p[i] = 0.;
else if (p[i] > 1.) p[i] = 1.;
{
double result = 0.0;
- for(unsigned i=0; i<dim; i++)
+ for(unsigned int i=0; i<dim; i++)
if ((-p[i]) > result)
result = -p[i];
else if ((p[i]-1.) > result)
Assert(new_indices.size() == n_dofs,
ExcDimensionMismatch(new_indices.size(), n_dofs));
- for (unsigned i=0; i<n_dofs; ++i)
+ for (unsigned int i=0; i<n_dofs; ++i)
new_indices[i] = i;
std::random_shuffle (new_indices.begin(), new_indices.end());
.TableBase<2,double>::reinit (fe.interface_constraints_size());
for (unsigned int i=0; i<constraint_points.size(); ++i)
- for (unsigned j=0; j<fe.degree+1; ++j)
+ for (unsigned int j=0; j<fe.degree+1; ++j)
{
fe.interface_constraints(i,j) =
polynomials[fe.face_index_map[j]].value (constraint_points[i](0));
constraint_point(k) = 1.0 - constraint_point(k);
}
- for (unsigned j=0; j<pnts; ++j)
+ for (unsigned int j=0; j<pnts; ++j)
{
unsigned int indices[2]
= { fe.face_index_map[j] % (fe.degree + 1),
{
// delete base elements created in
// the constructor
- for (unsigned i=0; i<base_elements.size(); ++i)
+ for (unsigned int i=0; i<base_elements.size(); ++i)
{
base_elements[i].first->unsubscribe(typeid(*this).name());
delete base_elements[i].first;
{
unsigned comp_start = 0;
for(unsigned base = 0; base < this->n_base_elements(); ++base)
- for (unsigned m=0; m<this->element_multiplicity(base);
+ for (unsigned int m=0; m<this->element_multiplicity(base);
++m, comp_start += base_element(base).n_components())
for (unsigned local_index = 0;
local_index < base_element(base).dofs_per_line;
{
unsigned comp_start = 0;
for(unsigned base=0; base<this->n_base_elements(); ++base)
- for (unsigned m=0; m<this->element_multiplicity(base);
+ for (unsigned int m=0; m<this->element_multiplicity(base);
++m, comp_start += base_element(base).n_components())
for (unsigned local_index = 0;
local_index < base_element(base).dofs_per_quad;
// Assert that we can write all
// components into the result
// vectors
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
Assert (values[i].size() == n_components,
ExcDimensionMismatch(values[i].size(), n_components));
present_cell->get_interpolated_dof_values(fe_function, dof_values);
// initialize with zero
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
std::fill_n (values[i].begin(), values[i].size(), 0);
// add up contributions of trial
// finite element
const unsigned int result_components = indices.size() * n_components / dofs_per_cell;
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
Assert (values[i].size() == result_components,
ExcDimensionMismatch(values[i].size(), result_components));
Assert (this->update_flags & update_values, ExcAccessToUninitializedField());
// initialize with zero
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
std::fill_n (values[i].begin(), values[i].size(), 0);
// add up contributions of trial
{
Assert (values.size() == result_components,
ExcDimensionMismatch(values.size(), result_components));
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
Assert (values[i].size() == n_quadrature_points,
ExcDimensionMismatch(values[i].size(), n_quadrature_points));
}
{
Assert(values.size() == n_quadrature_points,
ExcDimensionMismatch(values.size(), n_quadrature_points));
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
Assert (values[i].size() == result_components,
ExcDimensionMismatch(values[i].size(), result_components));
}
Assert (this->update_flags & update_values, ExcAccessToUninitializedField());
// initialize with zero
- for (unsigned i=0;i<values.size();++i)
+ for (unsigned int i=0;i<values.size();++i)
std::fill_n (values[i].begin(), values[i].size(), 0);
// add up contributions of trial
ExcDimensionMismatch(gradients.size(), n_quadrature_points));
const unsigned int n_components = fe->n_components();
- for (unsigned i=0; i<gradients.size(); ++i)
+ for (unsigned int i=0; i<gradients.size(); ++i)
Assert (gradients[i].size() == n_components,
ExcDimensionMismatch(gradients[i].size(), n_components));
present_cell->get_interpolated_dof_values(fe_function, dof_values);
// initialize with zero
- for (unsigned i=0;i<gradients.size();++i)
+ for (unsigned int i=0;i<gradients.size();++i)
std::fill_n (gradients[i].begin(), gradients[i].size(), Tensor<1,spacedim>());
// add up contributions of trial
{
Assert (gradients.size() == result_components,
ExcDimensionMismatch(gradients.size(), result_components));
- for (unsigned i=0;i<gradients.size();++i)
+ for (unsigned int i=0;i<gradients.size();++i)
Assert (gradients[i].size() == n_quadrature_points,
ExcDimensionMismatch(gradients[i].size(), n_quadrature_points));
}
{
Assert(gradients.size() == n_quadrature_points,
ExcDimensionMismatch(gradients.size(), n_quadrature_points));
- for (unsigned i=0;i<gradients.size();++i)
+ for (unsigned int i=0;i<gradients.size();++i)
Assert (gradients[i].size() == result_components,
ExcDimensionMismatch(gradients[i].size(), result_components));
}
Assert (this->update_flags & update_gradients, ExcAccessToUninitializedField());
// initialize with zero
- for (unsigned i=0;i<gradients.size();++i)
+ for (unsigned int i=0;i<gradients.size();++i)
std::fill_n (gradients[i].begin(), gradients[i].size(), Tensor<1,spacedim>());
// add up contributions of trial
ExcDimensionMismatch(hessians.size(), n_quadrature_points));
const unsigned int n_components = fe->n_components();
- for (unsigned i=0;i<hessians.size();++i)
+ for (unsigned int i=0;i<hessians.size();++i)
Assert (hessians[i].size() == n_components,
ExcDimensionMismatch(hessians[i].size(), n_components));
present_cell->get_interpolated_dof_values(fe_function, dof_values);
// initialize with zero
- for (unsigned i=0;i<hessians.size();++i)
+ for (unsigned int i=0;i<hessians.size();++i)
std::fill_n (hessians[i].begin(), hessians[i].size(), Tensor<2,spacedim>());
// add up contributions of trial
{
Assert (hessians.size() == result_components,
ExcDimensionMismatch(hessians.size(), result_components));
- for (unsigned i=0;i<hessians.size();++i)
+ for (unsigned int i=0;i<hessians.size();++i)
Assert (hessians[i].size() == n_quadrature_points,
ExcDimensionMismatch(hessians[i].size(), n_quadrature_points));
}
{
Assert(hessians.size() == n_quadrature_points,
ExcDimensionMismatch(hessians.size(), n_quadrature_points));
- for (unsigned i=0;i<hessians.size();++i)
+ for (unsigned int i=0;i<hessians.size();++i)
Assert (hessians[i].size() == result_components,
ExcDimensionMismatch(hessians[i].size(), result_components));
}
const unsigned int component_multiple = result_components / n_components;
// initialize with zero
- for (unsigned i=0;i<hessians.size();++i)
+ for (unsigned int i=0;i<hessians.size();++i)
std::fill_n (hessians[i].begin(), hessians[i].size(), Tensor<2,spacedim>());
// add up contributions of trial
// Assert that we can write all
// components into the result
// vectors
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
Assert (laplacians[i].size() == n_components,
ExcDimensionMismatch(laplacians[i].size(), n_components));
present_cell->get_interpolated_dof_values(fe_function, dof_values);
// initialize with zero
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
std::fill_n (laplacians[i].begin(), laplacians[i].size(), 0);
// add up contributions of trial
// finite element
const unsigned int result_components = indices.size() * n_components / dofs_per_cell;
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
Assert (laplacians[i].size() == result_components,
ExcDimensionMismatch(laplacians[i].size(), result_components));
Assert (this->update_flags & update_hessians, ExcAccessToUninitializedField());
// initialize with zero
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
std::fill_n (laplacians[i].begin(), laplacians[i].size(), 0);
// add up contributions of trial
{
Assert (laplacians.size() == result_components,
ExcDimensionMismatch(laplacians.size(), result_components));
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
Assert (laplacians[i].size() == n_quadrature_points,
ExcDimensionMismatch(laplacians[i].size(), n_quadrature_points));
}
{
Assert(laplacians.size() == n_quadrature_points,
ExcDimensionMismatch(laplacians.size(), n_quadrature_points));
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
Assert (laplacians[i].size() == result_components,
ExcDimensionMismatch(laplacians[i].size(), result_components));
}
Assert (this->update_flags & update_hessians, ExcAccessToUninitializedField());
// initialize with zero
- for (unsigned i=0;i<laplacians.size();++i)
+ for (unsigned int i=0;i<laplacians.size();++i)
std::fill_n (laplacians[i].begin(), laplacians[i].size(), 0);
// add up contributions of trial
// in 3d also loop over the edges
if (dim >= 3)
{
- for (unsigned e=0; e<GeometryInfo<dim>::lines_per_cell; ++e)
+ for (unsigned int e=0; e<GeometryInfo<dim>::lines_per_cell; ++e)
if (cell->line(e)->has_children())
// the only place where this vertex could have been
// hiding is on the mid-edge point of the edge we
//Take care for periodic conditions,
//For instance phi0= 0, phi1= 3/2*Pi middle has to be 7/4*Pi not 3/4*Pi
//This also works for -Pi/2 + Pi, middle is 5/4*Pi
- for(unsigned i=0; i<2;i++)
+ for(unsigned int i=0; i<2;i++)
if(std::abs(p0(i)-p1(i))> numbers::PI)
middle(i)=2*numbers::PI;
//Just get the average
Point<2> p[4];
- for(unsigned i=0;i<4;i++)
+ for(unsigned int i=0;i<4;i++)
p[i]=get_surf_coord(quad->vertex(i));
Point<2> middle(0,0);
//Take care for periodic conditions, see get_new_point_on_line() above
//For instance phi0= 0, phi1= 3/2*Pi middle has to be 7/4*Pi not 3/4*Pi
//This also works for -Pi/2 + Pi + Pi- Pi/2, middle is 5/4*Pi
- for(unsigned i=0;i<2;i++)
- for(unsigned j=1;j<4;j++){
+ for(unsigned int i=0;i<2;i++)
+ for(unsigned int j=1;j<4;j++){
if(std::abs(p[0](i)-p[j](i))> numbers::PI){
middle(i)+=2*numbers::PI;
}
}
- for(unsigned i=0;i<4;i++)
+ for(unsigned int i=0;i<4;i++)
middle+=p[i];
middle*= 0.25;
Point<2> p[2];
- for(unsigned i=0;i<2;i++)
+ for(unsigned int i=0;i<2;i++)
p[i]=get_surf_coord(line->vertex(i));
unsigned offset[2];
//see get_new_point_on_line() above
//Because we dont have a symmetric interpolation (just the middle) we need to
//add 2*Pi to each almost zero and negative angles.
- for(unsigned i=0;i<2;i++)
- for(unsigned j=1;j<2;j++){
+ for(unsigned int i=0;i<2;i++)
+ for(unsigned int j=1;j<2;j++){
if(std::abs(p[0](i)-p[j](i))> numbers::PI){
offset[i]++;
break;
}
}
- for(unsigned i=0;i<2;i++)
- for(unsigned j=0;j<2;j++)
+ for(unsigned int i=0;i<2;i++)
+ for(unsigned int j=0;j<2;j++)
if(p[j](i)<1.E-12 ) //Take care for periodic conditions & negative angles
p[j](i)+=2*numbers::PI*offset[i];
double dx=1.0/(npoints+1);
double x=dx;
Point<2> target;
- for(unsigned i=0; i<npoints;i++,x+=dx){
+ for(unsigned int i=0; i<npoints;i++,x+=dx){
target= (1-x)*p[0] + x*p[1];
points[i]=get_real_coord(target);
}
Point<2> p[4];
- for(unsigned i=0;i<4;i++)
+ for(unsigned int i=0;i<4;i++)
p[i]=get_surf_coord(quad->vertex(i));
Point<2> target;
//see get_new_point_on_line() above
//Because we dont have a symmetric interpolation (just the middle) we need to
//add 2*Pi to each almost zero and negative angles.
- for(unsigned i=0;i<2;i++)
- for(unsigned j=1;j<4;j++){
+ for(unsigned int i=0;i<2;i++)
+ for(unsigned int j=1;j<4;j++){
if(std::abs(p[0](i)-p[j](i))> numbers::PI){
offset[i]++;
break;
}
}
- for(unsigned i=0;i<2;i++)
- for(unsigned j=0;j<4;j++)
+ for(unsigned int i=0;i<2;i++)
+ for(unsigned int j=0;j<4;j++)
if(p[j](i)<1.E-12 ) //Take care for periodic conditions & negative angles
p[j](i)+=2*numbers::PI*offset[i];
- for (unsigned i=0; i<m; ++i, y+=ds)
+ for (unsigned int i=0; i<m; ++i, y+=ds)
{
double x=ds;
- for (unsigned j=0; j<m; ++j, x+=ds){
+ for (unsigned int j=0; j<m; ++j, x+=ds){
target=((1-x) * p[0] +
x * p[1]) * (1-y) +
((1-x) * p[2] +
get_normals_at_vertices (const Triangulation<2,3 >::face_iterator &face,
Boundary<2,3>::FaceVertexNormals &face_vertex_normals) const
{
- for(unsigned i=0; i<GeometryInfo<2>::vertices_per_face; i++)
+ for(unsigned int i=0; i<GeometryInfo<2>::vertices_per_face; i++)
face_vertex_normals[i]=get_surf_norm(face->vertex(i));
}
{
// remove this row, except for the
// diagonal element
- for (unsigned j=0; j<n_local_dofs; ++j)
+ for (unsigned int j=0; j<n_local_dofs; ++j)
if (i != j)
local_matrix(i,j) = 0;