← Back to team overview

dolfin team mailing list archive

Re: Eigenvalues and time-dependent bc's

 

On Fri, Sep 02, 2005 at 02:56:48PM +0200, Garth N. Wells wrote:

> Quoting Anders Logg <logg@xxxxxxxxx>:
> 
> > Maybe we could add to BoundaryCondition and Function a member function
> > that can be called to connect any object to a given real t. Something
> > like
> > 
> > class Function
> > {
> > public:
> > 
> >     void synchronize(const real& t)
> >     {
> >        this->t = &t;
> >     }
> > 
> > private:
> > 
> >     const real* t;
> > 
> > }
> > 
> > Then in a time-stepping loop, one can keep a variable t and do
> > 
> >     t += k;
> > 
> > and all synchronized Functions and BoundaryConditions will be
> > automatically updated.
> > 
> > In addition, one could create a base class Synchronizable and put the
> > functionality in there so we don't have to duplicated. Then Function
> > and BoundaryCondition just inherit from Synchronizable.
> > 
> 
> Any objections to a new base class "Synchronizable" or "Time" (name
> suggestions?) from which BoundaryCondition and Function derive in order to keep
> track of time?
> 
> Garth 

Maybe Time is not a good name. Another option would be TimeDependent.

/Anders