← Back to team overview

dolfin team mailing list archive

Re: Introduce a global Time class

 

Since nobody has presented any counterarguments with convection, I suggest
you go ahead.

Martin


On 15 February 2013 12:15, Johan Hake <hake.dev@xxxxxxxxx> wrote:

> On 02/15/2013 12:11 PM, Anders Logg wrote:
> > On Fri, Feb 15, 2013 at 12:04:35PM +0100, Johan Hake wrote:
> >> Thinking just a little more about this I should be able to do what I
> >> want by enabling the following syntax in the CompiledExpression
> interface:
> >>  time = Constant("t", t=0.0)
> >>  time_dep_expression = Expression("sin(t)", t=time)
> >> Here we need to check that time is a scalar Constant, if so we generate
> >> a public Constant attribute instead of a double. The double operator in
> >> the Constant interface would make the code work nicely. With some luck
> will:
> >>  time_dep_expression.time = 0.2
> >> still work from Python dependent on how that call propagates down into
> >> C++ ;).
> >> The time object can then be used to declare forms aso. Finally it can be
> >> passed to the Solver which then take responsibility for updating it.
> >> Anyone viscously against implementing the above feature in the
> >> CompileExpression interface?
> >
> > No, my viscosity is very low at the moment.
>
> Damn autocorrelation!
>
> :D
>
> Johan
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help   : https://help.launchpad.net/ListHelp
>

References