← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Permit access to values and size for a Constant.

 

On Thu, May 21, 2009 at 10:14:41PM +0100, Garth N. Wells wrote:
> 
> 
> Johan Hake wrote:
> > On Thursday 21 May 2009 22:22:11 Martin Sandve Alnæs wrote:
> >> Thanks.
> >> But those links are in my installation and I've used program_options
> >> in other places...
> >> I don't have time to start rebuilding everything now, so I'll get back
> >> to this in a couple of weeks.
> >> Has everybody built their own boost to get this to work? I have 1.35
> >> from Ubuntu Intrepid.
> > 
> > sudo apt-get install libboost-program-options-dev
> > 
> > works here with hardy
> >
> 
> I think that 'sudo apt-get install libboost-dev' will get all the bits 
> and pieces required by DOLFIN.

Yes, that's what I do (in Jaunty).

-- 
Anders


> Garth
> 
> > Johan
> > 
> >> Martin
> >>
> >> On Thu, May 21, 2009 at 9:22 PM, Shawn Walker <walker@xxxxxxxxxxxxxxx> 
> > wrote:
> >>> I put updated instructions for dealing with the boost::program_options
> >>> problem.  See:
> >>>
> >>> http://www.fenics.org/wiki/A_detailed_guide_to_installing_DOLFIN
> >>>
> >>> Look at the section on building boost.
> >>>
> >>> - Shawn
> >>>
> >>> On Thu, 21 May 2009, Martin Sandve Alnæs wrote:
> >>>> Add this as well, and you should be able to use a scalar Constant as
> >>>> if it was a double:
> >>>>
> >>>>   /// Scalar conversion operator
> >>>>   operator double() const
> >>>>   {
> >>>>       if(_size > 1)
> >>>>           error("Cannot convert non-scalar Constant to a double.");
> >>>>       return _values[0];
> >>>>   }
> >>>>
> >>>> I won't commit this myself since I currently can't compile dolfin,
> >>>> it complains about program_options although I have it and use
> >>>> it in some syfi demos. Probably the same as someone else
> >>>> experienced, but I don't have time to figure it out now.
> >>>>
> >>>> Martin
> >>>>
> >>>> On Thu, May 21, 2009 at 8:23 PM, DOLFIN <dolfin@xxxxxxxxxx> wrote:
> >>>>> One or more new changesets pushed to the primary dolfin repository.
> >>>>> A short summary of the last three changesets is included below.
> >>>>>
> >>>>> changeset:   6201:7bc584e24501b34ad40dc19b9e683b925681f5ad
> >>>>> tag:         tip
> >>>>> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> >>>>> date:        Thu May 21 19:22:35 2009 +0100
> >>>>> files:       demo/mesh/built-in/python/demo.py
> >>>>> dolfin/function/Constant.h dolfin/mesh/UnitCircle.cpp
> >>>>> description:
> >>>>> Permit access to values and size for a Constant.
> >>>>>
> >>>>> This avoid duplications like
> >>>>>
> >>>>>  double dt = 1.0;
> >>>>>  Constant delta_t(dt);
> >>>>>  double T = 100*dt;
> >>>>>
> >>>>>
> >>>>> changeset:   6200:dff601b6ee4aa498c3eda723ae5fba83feebf0fb
> >>>>> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> >>>>> date:        Thu May 21 17:46:52 2009 +0100
> >>>>> files:       demo/mesh/built-in/python/demo.py
> >>>>> dolfin/mesh/Rectangle.cpp dolfin/mesh/UnitCircle.cpp
> >>>>> dolfin/mesh/UnitSquare.cpp
> >>>>> description:
> >>>>> Fix a few bugs introduced in previous commits.
> >>>>>
> >>>>>
> >>>>> changeset:   6199:cbec89ba60e4e7ef9d7041963b82505ab62f90aa
> >>>>> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> >>>>> date:        Thu May 21 17:16:25 2009 +0100
> >>>>> files:       dolfin/mesh/Box.cpp dolfin/mesh/Rectangle.cpp
> >>>>> dolfin/mesh/UnitCircle.cpp dolfin/mesh/UnitSphere.cpp
> >>>>> dolfin/mesh/UnitSquare.cpp
> >>>>> description:
> >>>>> Some clean up of built-in meshes.
> >>>>>
> >>>>> ----------------------------------------------------------------------
> >>>>> For more details, visit http://www.fenics.org/hg/dolfin
> >>>>> _______________________________________________
> >>>>> DOLFIN-dev mailing list
> >>>>> DOLFIN-dev@xxxxxxxxxx
> >>>>> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>>> _______________________________________________
> >>>> DOLFIN-dev mailing list
> >>>> DOLFIN-dev@xxxxxxxxxx
> >>>> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >> _______________________________________________
> >> DOLFIN-dev mailing list
> >> DOLFIN-dev@xxxxxxxxxx
> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
> > 
> > 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev

Attachment: signature.asc
Description: Digital signature


Follow ups

References