# Diff of /trunk/escript/src/AbstractTransportProblem.h

revision 1367 by gross, Wed Dec 19 02:45:07 2007 UTC revision 2474 by gross, Tue Jun 16 06:32:15 2009 UTC
# Line 1  Line 1
1
/* \$Id\$ */

2  /*******************************************************  /*******************************************************
3   *  *
4   *       Copyright 2007 by University of Queensland  * Copyright (c) 2003-2008 by University of Queensland
5   *  * Earth Systems Science Computational Center (ESSCC)
6   *                http://esscc.uq.edu.au  * http://www.uq.edu.au/esscc
7   *        Primary Business: Queensland, Australia  *
11   *******************************************************/  *
12    *******************************************************/
13
14
15  #if !defined  escript_AbstractTransportProblem_H  #if !defined  escript_AbstractTransportProblem_H
16  #define escript_AbstractTransportProblem_H  #define escript_AbstractTransportProblem_H
# Line 18  Line 18
18
19  #include "FunctionSpace.h"  #include "FunctionSpace.h"
20  #include "TransportProblemException.h"  #include "TransportProblemException.h"
21    #include <boost/python/object.hpp>
#include <boost/python/dict.hpp>
22
23  //  //
24  // Forward declaration  // Forward declaration
# Line 60  class AbstractTransportProblem { Line 59  class AbstractTransportProblem {
59
60    ESCRIPT_DLL_API    ESCRIPT_DLL_API
61    AbstractTransportProblem(const double theta,    AbstractTransportProblem(const double theta,
const double dt_max,
62                             const int blocksize,                             const int blocksize,
63                             const FunctionSpace& functionspace);                             const FunctionSpace& functionspace);
64
# Line 103  class AbstractTransportProblem { Line 101  class AbstractTransportProblem {
101       returns the solution u for a time step dt>0       returns the solution u for a time step dt>0
102    */    */
103    ESCRIPT_DLL_API    ESCRIPT_DLL_API
104    Data solve(Data& source, const double dt, const boost::python::dict& options) const;    Data solve(Data& source, const double dt, boost::python::object& options) const;
105
106    /**    /**
107       \brief       \brief
# Line 111  class AbstractTransportProblem { Line 109  class AbstractTransportProblem {
109    */    */
110    ESCRIPT_DLL_API    ESCRIPT_DLL_API
111    void setInitialValue(Data& u) const;    void setInitialValue(Data& u) const;
112
113    /**    /**
114       \brief resets the transport operator typically as they have been updated.       \brief resets the transport operator typically as they have been updated.
115    */    */
116    ESCRIPT_DLL_API    ESCRIPT_DLL_API
117    virtual void resetTransport() const;    virtual void resetTransport() const;
118
119      /**
120         \brief
121         inserts constraint u_{,t}=r where q>0  into the problem using a weighting factor
122      */
123      ESCRIPT_DLL_API
124      void insertConstraint(Data& source, Data& q, Data& r, const double factor) const;
125      /*
126       *      \brief returns a safe time step size.
127       */
128      ESCRIPT_DLL_API
129      virtual double getSafeTimeStepSize() const;
130      /*
131       *      \brief returns the value for unlimited time step size.
132       */
133      ESCRIPT_DLL_API
134      virtual double getUnlimitedTimeStepSize() const;
135
136
137   protected:   protected:
138
139   private:   private:
# Line 126  class AbstractTransportProblem { Line 143  class AbstractTransportProblem {
143       sets solution out by time step dt.       sets solution out by time step dt.
144    */    */
145    ESCRIPT_DLL_API    ESCRIPT_DLL_API
146    virtual void setToSolution(Data& out,Data& source,const double dt, const boost::python::dict& options) const;    virtual void setToSolution(Data& out,Data& source,const double dt, boost::python::object& options) const;
147
148    /**    /**
149       \brief       \brief
# Line 134  class AbstractTransportProblem { Line 151  class AbstractTransportProblem {
151    */    */
152    ESCRIPT_DLL_API    ESCRIPT_DLL_API
153    virtual void copyInitialValue(Data& u) const;    virtual void copyInitialValue(Data& u) const;
154      /**
155         \brief
156         copy constraint u_{,t}=r where q>0  into the problem
157         it can be assumed that q and r are not empty and have
158         appropriate shape and function space.
159      */
160      ESCRIPT_DLL_API
161      virtual void copyConstraint(Data& source, Data& q, Data& r, const double factor) const;
162
163    int m_empty;    int m_empty;
164    int m_blocksize;    int m_blocksize;
165    double m_theta;    double m_theta;
double m_dt_max;
166    FunctionSpace m_functionspace;    FunctionSpace m_functionspace;
167
168  };  };

Legend:
 Removed from v.1367 changed lines Added in v.2474