// ---------------------------------------------------------------------
//
-// Copyright (C) 2013 - 2014 by the deal.II authors
+// Copyright (C) 2013 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
v(i) = i;
FEValues<dim> feval(fe, quadrature, update_values);
- std::vector<Vector<double> > local(quadrature.size(),
- Vector<double>(fe.n_components()));
+ std::vector<Vector<float> > local(quadrature.size(),
+ Vector<float>(fe.n_components()));
typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active();
const typename DoFHandler<dim>::active_cell_iterator end = dof.end();
using namespace LocalIntegrators::Divergence;
+
template <int dim>
void test_cell(const FEValuesBase<dim> &fev, const FEValuesBase<dim> &fes)
{
u = 0.;
u(i) = 1.;
w = 0.;
- fev.get_function_gradients(u, indices, ugrad, true);
+ fev.get_function_gradients(u, indices, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(ugrad), true);
cell_residual(w, fes, make_slice(ugrad));
Md.vmult(v,u);
w.add(-1., v);
u = 0.;
u(i) = 1.;
w = 0.;
- fev.get_function_values(u, indices, uval, true);
+ fev.get_function_values(u, indices, VectorSlice<std::vector<std::vector<double> > >(uval), true);
u_dot_n_residual(w, fev, fes, make_slice(uval));
M.vmult(v,u);
w.add(-1., v);
// ---------------------------------------------------------------------
//
-// Copyright (C) 2012 - 2014 by the deal.II authors
+// Copyright (C) 2012 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
u = 0.;
u(i) = 1.;
w = 0.;
- fev.get_function_gradients(u, indices, ugrad, true);
+ fev.get_function_gradients(u, indices, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(ugrad), true);
cell_residual(w, fev, make_slice(ugrad));
M.vmult(v,u);
w.add(-1., v);
u = 0.;
u(i) = 1.;
w = 0.;
- fev.get_function_values(u, indices, uval, true);
- fev.get_function_gradients(u, indices, ugrad, true);
+ fev.get_function_values(u, indices, VectorSlice<std::vector<std::vector<double> > >(uval), true);
+ fev.get_function_gradients(u, indices, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(ugrad), true);
nitsche_residual(w, fev, make_slice(uval), make_slice(ugrad), make_slice(null_val), 17);
M.vmult(v,u);
w.add(-1., v);
u1(i1) = 1.;
w1 = 0.;
w2 = 0.;
- fev1.get_function_values(u1, indices1, u1val, true);
- fev1.get_function_gradients(u1, indices1, u1grad, true);
+ fev1.get_function_values(u1, indices1, VectorSlice<std::vector<std::vector<double> > >(u1val), true);
+ fev1.get_function_gradients(u1, indices1, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(u1grad), true);
ip_residual(w1, w2, fev1, fev2,
make_slice(u1val), make_slice(u1grad),
make_slice(nullval), make_slice(nullgrad),
w1 = 0.;
w2 = 0.;
- fev2.get_function_values(u1, indices2, u1val, true);
- fev2.get_function_gradients(u1, indices2, u1grad, true);
+ fev2.get_function_values(u1, indices2, VectorSlice<std::vector<std::vector<double> > >(u1val), true);
+ fev2.get_function_gradients(u1, indices2, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(u1grad), true);
ip_residual(w1, w2, fev1, fev2,
make_slice(nullval), make_slice(nullgrad),
make_slice(u1val), make_slice(u1grad),
// ---------------------------------------------------------------------
//
-// Copyright (C) 2012 - 2014 by the deal.II authors
+// Copyright (C) 2012 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
u = 0.;
u(i) = 1.;
w = 0.;
- fev.get_function_gradients(u, indices, ugrad, true);
+ fev.get_function_gradients(u, indices, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(ugrad), true);
cell_residual(w, fev, make_slice(ugrad));
M.vmult(v,u);
w.add(-1., v);
u = 0.;
u(i) = 1.;
w = 0.;
- fev.get_function_values(u, indices, uval, true);
- fev.get_function_gradients(u, indices, ugrad, true);
+ fev.get_function_values(u, indices, VectorSlice<std::vector<std::vector<double> > >(uval), true);
+ fev.get_function_gradients(u, indices, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(ugrad), true);
nitsche_residual(w, fev, make_slice(uval), make_slice(ugrad), make_slice(null_val), 17);
M.vmult(v,u);
w.add(-1., v);
u1(i1) = 1.;
w1 = 0.;
w2 = 0.;
- fev1.get_function_values(u1, indices1, u1val, true);
- fev1.get_function_gradients(u1, indices1, u1grad, true);
+ fev1.get_function_values(u1, indices1, VectorSlice<std::vector<std::vector<double> > >(u1val), true);
+ fev1.get_function_gradients(u1, indices1, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(u1grad), true);
ip_residual(w1, w2, fev1, fev2,
make_slice(u1val), make_slice(u1grad),
make_slice(nullval), make_slice(nullgrad),
w1 = 0.;
w2 = 0.;
- fev2.get_function_values(u1, indices2, u1val, true);
- fev2.get_function_gradients(u1, indices2, u1grad, true);
+ fev2.get_function_values(u1, indices2, VectorSlice<std::vector<std::vector<double> > >(u1val), true);
+ fev2.get_function_gradients(u1, indices2, VectorSlice<std::vector<std::vector<Tensor<1,dim> > > >(u1grad), true);
ip_residual(w1, w2, fev1, fev2,
make_slice(nullval), make_slice(nullgrad),
make_slice(u1val), make_slice(u1grad),
{
FEEvaluation<dim,fe_degree,n_q_points_1d,1,Number> fe_eval (data);
- std::vector<double> reference_values (fe_eval.n_q_points);
- std::vector<Tensor<1,dim> > reference_grads (fe_eval.n_q_points);
- std::vector<Tensor<2,dim> > reference_hess (fe_eval.n_q_points);
+ std::vector<Number> reference_values (fe_eval.n_q_points);
+ std::vector<Tensor<1,dim,Number> > reference_grads (fe_eval.n_q_points);
+ std::vector<Tensor<2,dim,Number> > reference_hess (fe_eval.n_q_points);
for (unsigned int cell=cell_range.first; cell<cell_range.second; ++cell)
{