Hello

I am trying to modify step-12 to do explicit time-stepping RKDG.

I only have to compute rhs vector using MeshWorker. So for example I modify
integrate_cell_term as follows

// Compute cell integral

template <int dim>

void Step12<dim>::integrate_cell_term (DoFInfo& dinfo, CellInfo& info)

{

   const FEValuesBase<dim>& fe_v  = info.fe_values();

   Vector<double>& local_vector   = dinfo.vector(0).block(0);

   const std::vector<double> &JxW = fe_v.get_JxW_values ();

   std::vector<unsigned int>& local_dof_indices = dinfo.indices;



   for (unsigned int point=0; point<fe_v.n_quadrature_points; ++point)

   {

      Point<dim> beta;

      beta(0) = -fe_v.quadrature_point(point)(1);

      beta(1) = fe_v.quadrature_point(point)(0);

      beta /= beta.norm();



      for (unsigned int i=0; i<fe_v.dofs_per_cell; ++i)

         for (unsigned int j=0; j<fe_v.dofs_per_cell; ++j)

            local_vector(i) += beta * fe_v.shape_grad(i,point) *

                               solution(local_dof_indices[j]) *

                               fe_v.shape_value(j,point) *

                               JxW[point];

   }

}


However since this function is static, it cannot access the class member
variable "solution". In step-12, it is recommended to use boost:bind but I
could not find any use of this in the examples. Where can I learn about this
topic, preferably with some dealii examples ?

Thanks
praveen
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to