Hi,

I'm trying to study how to use solution after the calculation is done.

So, What I'm trying to do in step6 tutorial program is to calculate 
f=x*solution+y;

So I add the following class.(that almost comes from assemble_system())

template <int dim>
void Step6<dim>::get_profile ()
{
  const QGauss<dim>  quadrature_formula(3);
  FEValues<dim> fe_values (fe, quadrature_formula,
                           update_values    |  update_gradients |
                           update_quadrature_points  |  update_JxW_values);
  const unsigned int   dofs_per_cell = fe.dofs_per_cell;
  const unsigned int   n_q_points    = quadrature_formula.size();

  std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);


  typename DoFHandler<dim>::active_cell_iterator
  cell = dof_handler.begin_active(),
  endc = dof_handler.end();
  f.reinit (dof_handler.n_dofs());    //f is already declared as private 
like solution

  for (; cell!=endc; ++cell)
    {
      fe_values.reinit (cell);

      for (unsigned int q_index=0; q_index<n_q_points; ++q_index)
{
   const Point<dim> &p=fe_values.quadrature_point(q_index);

            f[q_index]=p(0)*solution[q_index]+p(1);
        }
      cell->get_dof_indices (local_dof_indices);
     }
}


But, It seems that in the result of calculation, on the only one cell the 
calculation is done.

What is the problem??

Could you help me please...?

Thank you

Kyusik.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to