← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5620: - Make VariationalProblem Hierarchical

 

On Mon, Jan 31, 2011 at 12:51:42PM -0800, Johan Hake wrote:
> On Monday January 31 2011 12:45:24 Anders Logg wrote:
>
> > On Mon, Jan 31, 2011 at 12:21:05PM -0800, Johan Hake wrote:
>
> > > On Monday January 31 2011 12:07:38 noreply@xxxxxxxxxxxxx wrote:
>
> > > > ------------------------------------------------------------
>
> > > >
>
> > > > revno: 5620
>
> > > >
>
> > > > committer: Anders Logg <logg@xxxxxxxxx>
>
> > > >
>
> > > > branch nick: dolfin
>
> > > >
>
> > > > timestamp: Mon 2011-01-31 21:03:50 +0100
>
> > > >
>
> > > > message:
>
> > > >
>
> > > > - Make VariationalProblem Hierarchical
>
> > > >
>
> > > > - Implement refinement of VariationalProblem
>
> > > >
>
> > > > - Some shared_ptr fixes
>
> > > >
>
> > > >
>
> > > >
>
> > > > I suggest that all functions returning a shared_ptr are named
>
> > > >
>
> > > > foo_shared_ptr. modified:
>
> > > >
>
> > > > dolfin/adaptivity/refine.cpp
>
> > > >
>
> > > > dolfin/adaptivity/refine.h
>
> > > >
>
> > > > dolfin/fem/VariationalProblem.cpp
>
> > > >
>
> > > > dolfin/fem/VariationalProblem.h
>
> > >
>
> > > You are stretching the Python interface with your Hierarchical
>
> > > inheritance. :) Also all classes that inherit Hierarchical need to be
>
> > > stored as shared_ptr in the SWIG interface. This means that also
>
> > > VariationalProblem need to be shared_ptr stored.
>
> >
>
> > Sorry, but I didn't see any other way. Plus I know you can handle it. :-)
>
> Sure :)
>
> > Given a VariationalProblem that needs to be refined, it's quite a mess
>
> > to keep track of all its nested data: Forms, consisting of
>
> > FunctionSpaces and Functions, consisting of FiniteElements and
>
> > DofMaps, consisting of Meshes, the same FunctionSpace appearing in
>
> > many places throughout the hierarchy etc.
>
> >
>
> > > It looks like we end up with storing everything using shared_ptr in SWIG,
>
> > > which I guess is cool, but then would foo_shared_ptr not make too much
>
> > > sense. Maybe just foo in the Python interface?
>
> >
>
> > It makes sense to have foo() mean reference in the C++ interface and
>
> > foo() mean shared pointer in the Python interface. Is that possible to
>
> > handle without a lot of manual work (ignore + rename)?
>
> Will see what I can do when you have settled the C++ interface.

Great.

I don't expect to make many more interface changes (and it's mostly
minor changes in the refinement interface). It remains to add some
missing pieces + debugging + getting it to work with
AdaptiveVariationalSolver.

--
Anders



> Johan
>
> > --
>
> > Anders
>
> >
>
> > > Johan
>
> > >
>
> > > > --
>
> > > >
>
> > > > lp:dolfin
>
> > > >
>
> > > > https://code.launchpad.net/~dolfin-core/dolfin/main
>
> > > >
>
> > > >
>
> > > >
>
> > > > Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
>
> > > >
>
> > > > To unsubscribe from this branch go to
>
> > > >
>
> > > > https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
>
> > >
>
> > > _______________________________________________
>
> > > Mailing list: https://launchpad.net/~dolfin
>
> > > Post to : dolfin@xxxxxxxxxxxxxxxxxxx
>
> > > Unsubscribe : https://launchpad.net/~dolfin
>
> > > More help : https://help.launchpad.net/ListHelp
>



References