/[escript]/trunk/escript/src/AbstractTransportProblem.h
ViewVC logotype

Annotation of /trunk/escript/src/AbstractTransportProblem.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1367 - (hide annotations)
Wed Dec 19 02:45:07 2007 UTC (11 years, 10 months ago) by gross
File MIME type: text/plain
File size: 3117 byte(s)
finley can now assemble a transport problem.
1 elspeth 615
2 gross 1367 /* $Id$ */
3 jgs 480
4 ksteube 1312 /*******************************************************
5     *
6     * Copyright 2007 by University of Queensland
7     *
8     * http://esscc.uq.edu.au
9     * Primary Business: Queensland, Australia
10     * Licensed under the Open Software License version 3.0
11     * http://www.opensource.org/licenses/osl-3.0.php
12     *
13     *******************************************************/
14    
15 gross 1364 #if !defined escript_AbstractTransportProblem_H
16     #define escript_AbstractTransportProblem_H
17 woo409 757 #include "system_dep.h"
18 jgs 82
19 jgs 474 #include "FunctionSpace.h"
20 gross 1364 #include "TransportProblemException.h"
21 jgs 474
22 jgs 82 #include <boost/python/dict.hpp>
23    
24 jgs 480 //
25     // Forward declaration
26     class Data;
27    
28 jgs 82 namespace escript {
29    
30     /**
31     \brief
32 gross 1364 Give a short description of what AbstractTransportProblem does.
33 jgs 82
34     Description:
35 gross 1364 Give a detailed description of AbstractTransportProblem
36 jgs 82
37     Template Parameters:
38     For templates describe any conditions that the parameters used in the
39     template must satisfy
40     */
41 gross 1364 class AbstractTransportProblem {
42 jgs 82
43     public:
44    
45     /**
46     \brief
47 gross 1364 Default constructor for AbstractTransportProblem
48 jgs 82
49     Description:
50 gross 1364 Default constructor for AbstractTransportProblem
51 jgs 82
52     Preconditions:
53     Describe any preconditions
54    
55     Throws:
56     Describe any exceptions thrown
57     */
58 woo409 757 ESCRIPT_DLL_API
59 gross 1364 AbstractTransportProblem();
60 jgs 82
61 woo409 757 ESCRIPT_DLL_API
62 gross 1364 AbstractTransportProblem(const double theta,
63     const double dt_max,
64     const int blocksize,
65     const FunctionSpace& functionspace);
66    
67 jgs 82 /**
68     \brief
69     Destructor.
70     */
71 woo409 757 ESCRIPT_DLL_API
72 gross 1364 virtual ~AbstractTransportProblem();
73 jgs 82
74 woo409 757 ESCRIPT_DLL_API
75 jgs 82 int isEmpty() const;
76    
77     /**
78     \brief
79     returns the column function space
80     */
81 woo409 757 ESCRIPT_DLL_API
82 gross 1364 inline FunctionSpace getFunctionSpace() const
83 jgs 82 {
84     if (isEmpty())
85 gross 1367 throw TransportProblemException("Error - Transport Problem is empty.");
86 gross 1364 return m_functionspace;
87 jgs 82 }
88    
89     /**
90     \brief
91 gross 1364 returns the block size
92 jgs 82 */
93 woo409 757 ESCRIPT_DLL_API
94 gross 1364 inline int getBlockSize() const
95 jgs 82 {
96     if (isEmpty())
97 gross 1367 throw TransportProblemException("Error - Transport Problem is empty.");
98 gross 1364 return m_blocksize;
99 jgs 82 }
100    
101     /**
102 gross 1364 \brief
103     returns the solution u for a time step dt>0
104 jgs 82 */
105 woo409 757 ESCRIPT_DLL_API
106 gross 1364 Data solve(Data& source, const double dt, const boost::python::dict& options) const;
107 jgs 82
108     /**
109     \brief
110 gross 1364 sets the value for u at time t=0.
111 jgs 82 */
112 woo409 757 ESCRIPT_DLL_API
113 gross 1364 void setInitialValue(Data& u) const;
114 jgs 102 /**
115 gross 1364 \brief resets the transport operator typically as they have been updated.
116 jgs 102 */
117 woo409 757 ESCRIPT_DLL_API
118 gross 1364 virtual void resetTransport() const;
119 jgs 123
120 jgs 82 protected:
121    
122     private:
123    
124     /**
125     \brief
126 gross 1364 sets solution out by time step dt.
127 jgs 82 */
128 woo409 757 ESCRIPT_DLL_API
129 gross 1364 virtual void setToSolution(Data& out,Data& source,const double dt, const boost::python::dict& options) const;
130 jgs 82
131     /**
132     \brief
133 gross 1364 copies the initial value into the problem
134 jgs 82 */
135 woo409 757 ESCRIPT_DLL_API
136 gross 1364 virtual void copyInitialValue(Data& u) const;
137 jgs 82
138     int m_empty;
139 gross 1364 int m_blocksize;
140     double m_theta;
141     double m_dt_max;
142     FunctionSpace m_functionspace;
143 jgs 82
144     };
145    
146    
147     } // end of namespace
148     #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26