Dear Wolfgang,

Moreover I have another problem. I want to loop over cells and calculate 
stress at each cell.
so I write below lined in stress_strain_nodal_values method:

const PrimalSolver<dim> &primal_solver = *this;

typename DoFHandler<dim>::active_cell_iterator
                                           cell = 
primal_solver.dof_handler.begin_active(),
                                           endc = 
primal_solver.dof_handler.end();
for (; cell!=endc; ++cell)
{
.....
}

Inside loop how can access fe_values from this pointer  to reinit(cell) it 
for each cell. 

Thanks
Elena


On Friday, November 25, 2016 at 12:14:57 AM UTC+1, Elena Greco wrote:
>
> Dear Wolfgang;
>
> it returns below error: 
> error: no match for call to '(const dealii::SmartPointer<const 
> dealii::Quadrature<2>, void>) ()'       
>        this->PrimalSolver<dim>::quadrature();
>
> Best regards.
> Elena
>
> On Thursday, November 24, 2016 at 4:12:24 PM UTC+1, Wolfgang Bangerth 
> wrote:
>>
>>
>> Elena, 
>>
>> > I would like to modify step-14 and calculate stress at nodes, but I 
>> found 
>> > step-14 complicated and also unfortunately my c++ is not good :( 
>>
>> Yes, step-14 is not the best example of a tutorial program :-( 
>>
>>
>> > I would like to add stress_strain_nodal_values method to classes Base, 
>> > PrimalSolver and WeightedResidual ( similar to output_solution() ) then 
>> inside 
>> > template <int dim> void Framework<dim>::run (const ProblemDescription 
>> > &descriptor) invoke it by solver->stress_strain_nodal_values() 
>> > 
>> > The problem is if I do so, inside stress_strain_nodal_values() method I 
>> can 
>> > not extract required data to calculate stresses from this pointer. For 
>> example 
>> > this->quadrature returns ambiguity error or I do not have access to 
>> fe_value 
>> > to calculate stress. 
>>
>> What exactly is the error? You may have to qualify access as in 
>>    this->PrimalSolver<dim>::quadrature () 
>> to specify whether you want the quadrature formula from the primal or 
>> dual 
>> solver. Similarly for the other variables and functions that are declared 
>> in 
>> the base class. 
>>
>> Best 
>> W. 
>>
>> -- 
>> ------------------------------------------------------------------------ 
>> Wolfgang Bangerth          email:                 [email protected] 
>>                             www: http://www.math.colostate.edu/~bangerth/ 
>>
>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to