Hey there!
For cell-wise error estimation calculations, I want to use the 
'approximate_gradient', 'approximate_derivative_tensor' and similar 
functionality available in 'DerivativeApproximation' namespace (here 
<http://dealii.org/developer/doxygen/deal.II/namespaceDerivativeApproximation.html>).
 
So I made the appropriate function calls and here is the code-snippet of it 
-

      Tensor<2,2> cell_hessian;
      Tensor<1,2> cell_grad;
      float magnitude = 0.;
    DoFHandler<2>::active_cell_iterator
    cell = dof_handler.begin_active(),
    endc = dof_handler.end();
    for (; cell!=endc; ++cell)
      {
        DerivativeApproximation::approximate_derivative_tensor(dof_handler, 
solution, cell, cell_grad, unsigned int);
        DerivativeApproximation::approximate_derivative_tensor(dof_handler, 
solution, cell, cell_hessian, unsigned int);
        magnitude = DerivativeApproximation::derivative_norm(cell_grad);
     ...

I get compilation errors and couldn't find why?
The errors:
   solver1.cc:171:98: error: expected primary-expression before ‘unsigned’
   DerivativeApproximation::approximate_derivative_tensor(dof_handler, 
solution, cell, cell_grad, unsigned int);
                                                                                
                                                              
^
   solver1.cc:173:101: error: expected primary-expression before ‘unsigned’
   DerivativeApproximation::approximate_derivative_tensor(dof_handler, 
solution, cell, cell_hessian, unsigned int);
                                                                                
                    
                                              ^
   I do understand that the tensor argument is passed wrong, but can't 
figure out? I do have proper dof_handler, solution objects.
   Please point out the mistake, thank you in advance!

-- 
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