Hi Mohammad

I presume what you show is an abbreviated version of a code snippet? Have you 
reinitialised the fe_values?
I don't understand what eps is doing? It's definitely not calculating the 
symmetric gradient of the velocity field. It's not even working out the 
symmetric part of anything actually. Also, why are you integrating it?

Cheers
Andrew

On 17.03.2012, at 10:23, Mohammad Mohsenie wrote:

> Hi there
> 
> to compute gradient of solutions of elasticity equation (as tutorial s.8) i 
> used fe_values[velocities].symmetric_gradient as :
> 
> for (unsigned int icell = 0; cell!=endc; ++cell, ++icell){
>                for (unsigned int i=0; i<dofs_per_cell; ++i)
>                  for (unsigned int j=0; j<dofs_per_cell; ++j) {
>                     for (unsigned int q_point=0; q_point<n_q_points; 
> ++q_point){
>                         for (unsigned int k=0; k<dofs_per_cell; ++k){
>                             epsilon[k] = 
> fe_values[velocities].symmetric_gradient (k, q_point);
>                         }
>                         eps(i,j) += ((epsilon[i] * epsilon[j])
>                         +(( i ==  j) ?
>                          (epsilon[i] * epsilon[j])  :
>                          0)) * fe_values.JxW(q_point);}  }
> 
> 
> in this code some parameters are defined as :
> 
>  const FEValuesExtractors::Vector velocities(1) ;
>  std::vector<SymmetricTensor<2,dim> >   epsilon(dofs_per_cell);
> 
> after checking ( aps ) calculated in code i found all zero .
> is there any problem in using symmetry.gradient here ? how can i fix problem ?
> any help would be appreciated.
> 
> regards,
> S.M.Mohseni
> 
> 
> 
> _______________________________________________
> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

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

Reply via email to