[dune-fem] DoF vector for an AdaptiveDiscreteFunction: how to get the method dofStorage ()

Dedner, Andreas A.S.Dedner at warwick.ac.uk
Mon Sep 17 11:02:35 CEST 2012


Hi.

I had another look - in the dune-fem release 1.2 the dofStorage is also protected as
far as I could tell and there seems to be no change. So I am not quite sure why this
ever work. I will need the full source code to check this.

In the mcf.cc version I have we wrote
VertexFunctionType vertices( "vertices", vxSpace, solution.blockVector() );
but there solution was a blockvector discrete function not AdaptiveDiscreteFunction.
The AdaptiveDiscreteFunction class has a method leakPointer, but that only
provides you with a double* and you could try that method instead.

Best
Andreas

________________________________
From: dune-fem-bounces+a.s.dedner=warwick.ac.uk at dune-project.org [dune-fem-bounces+a.s.dedner=warwick.ac.uk at dune-project.org] on behalf of Sacconi, Andrea [a.sacconi11 at imperial.ac.uk]
Sent: 13 September 2012 10:40
To: dune-fem at dune-project.org
Subject: [dune-fem] DoF vector for an AdaptiveDiscreteFunction: how to get the method dofStorage ()

Hi everyone,

I have a simple question about the " .dofStorage () " method. This is, maybe, a change between release 1.2.1 and 1.3.0.

Suppose you have the following definitions of pairs of function space and grid function:

typedef Dune:Fem::LagrangeDiscreteFunctionSpace< VertexFunctionSpaceType, HostGridPartType, 1 > VertexSpaceType;
typedef Dune::Fem::AdaptiveDiscreteFunction < VertexSpaceType > VertexFunctionType;
typedef Dune::Fem::LagrangeDiscreteFunctionSpace< VectorPositionFunctionSpaceType, GridPartType, vectorPolynomialOrder > DiscretePositionFunctionSpaceType;
typedef Dune::Fem::AdaptiveDiscreteFunction < DiscretePositionFunctionSpaceType > DiscretePositionFunctionType;

I instantiate these two objects of grid functions, and I want the second to take the same "algebraic counterpart" of the first. In other words, with release 1.2.1 I did

DiscretePositionFunctionType discrete_position_solution ( "discrete_position_solution", dfpSpace );
VertexFunctionType vertices ( "vertices", vxSpace, discrete_position_solution.dofStorage () );

but now I got the message that " .dofStorage () " is a protected method. How can I extract the vector and do the same operation allowed in the previous release?

Thanks again for your help,

Andrea

__________________________________________________________

Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-fem/attachments/20120917/5e417e2d/attachment.htm>


More information about the dune-fem mailing list