Hi Timo,

Thank you for you email.  I am running version 7.1.0 (which I think is the 
latest).

The exact lines of code I am using are:

        Vector<float> gradient_indicator (triangulation.n_active_cells() );

        DerivativeApproximation::approximate_gradient(mapping, 
theta_dof_handler, theta_solution, gradient_indicator);



where

mapping is of type "const MappingQ1<dim>"
theta_solution is of type "TrilinosWrappers::Vector"

Are there some extra includes that I need to add in the preamble (apart from 
derivative_approximation.h and /lac/trilinos.... includes?) or is there 
something wrong with the code?   I have tried some other alternatives that 
seemed sensible to me, but they all produced errors in debug mode!

Many thanks for your help

Katie Leonard

DPhil student in Computational Biology,
The University of Oxford.
________________________________________
From: Timo Heister [[email protected]]
Sent: 15 February 2012 23:19
To: Katie Leonard
Cc: [email protected]
Subject: Re: [deal.II] DerivativeApproximation::approximate_gradient of a 
Trilinos Vector

Hi Katie,

I implemented DerivativeApproxmation for TrilinosVectors recently:
------------------------------------------------------------------------
r24829 | heister | 2011-12-15 11:44:58 -0500 (Thu, 15 Dec 2011) | 1 line

Fixed: DerivativeApproximation for distributed computations.

Are you running an older version (or the last release) of deal?


On Wed, Feb 15, 2012 at 4:20 PM, Katie Leonard
<[email protected]> wrote:
> Hello,
>
> I am trying to expand step-31, so that the "temperature" equation is a time 
> dependent hyperbolic equation of the form given for "S" in step-21 (two phase 
> flow).  Therefore, this is now using Disconinous Galerkin elements.
>
> In order to cope with the adaptive refinement, I have adapted the framework 
> in step-30.  However, because I am now using a TrillinosWrapper, I found I 
> could no longer use the DerivativeApproximation::approximate_gradient.  Is 
> there some way to get around this?  The error is pasted below
>
> undefined reference to `void 
> dealii::DerivativeApproximation::approximate_gradient<2, dealii::DoFHandler, 
> dealii::TrilinosWrappers::Vector, 2>(dealii::Mapping<2, 2> const&, 
> dealii::DoFHandler<2, 2> const&, dealii::TrilinosWrappers::Vector const&, 
> dealii::Vector<float>&, unsigned int)'
> collect2: ld returned 1 exit status
>
> Many thanks for your help,
>
>
> Katie Leonard
>
> DPhil student in Computational Biology,
> The University of Oxford.
> _______________________________________________
> dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii



--
Timo Heister
http://www.math.tamu.edu/~heister/
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to