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

Sacconi, Andrea a.sacconi11 at imperial.ac.uk
Mon Sep 17 13:45:42 CEST 2012


Hi,

with respect to the mcf.cc you wrote, I modified the type of function (to AdaptiveDiscreteFunction), similarly to the Stokes example shown in the tutorial, and I can assure you that the method ".dofStorage()" never gave any problem.
I'll try to have a deeper look later ... so far, it doesn't work with 1.3.0.

Best,

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
________________________________
From: Dedner, Andreas [A.S.Dedner at warwick.ac.uk]
Sent: 17 September 2012 10:02
To: Sacconi, Andrea; dune-fem at dune-project.org
Subject: RE: [dune-fem] DoF vector for an AdaptiveDiscreteFunction: how to get the method dofStorage ()

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/4896c54a/attachment.htm>


More information about the dune-fem mailing list