/[escript]/branches/windows_from_1383_trunk/finley/src/CPPAdapter/TransportProblemAdapter.h
ViewVC logotype

Contents of /branches/windows_from_1383_trunk/finley/src/CPPAdapter/TransportProblemAdapter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1394 - (show annotations)
Wed Jan 23 05:24:17 2008 UTC (12 years, 5 months ago) by trankine
File MIME type: text/plain
File size: 3319 byte(s)
Somehow an ESCRIPT_DLL_API had crept into the header file, and to compound matters, the definition in the cpp file had no call method specifier at all. Windows hates people doing that.
1 /* $Id$ */
2
3 /*******************************************************
4 *
5 * Copyright 2007 by University of Queensland
6 *
7 * http://esscc.uq.edu.au
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14 #if !defined finley_TransportProblemAdapter_H
15 #define finley_TransportProblemAdapter_H
16 #include "system_dep.h"
17
18 extern "C" {
19 #include "paso/SolverFCT.h"
20 #include "paso/Options.h"
21 }
22
23 #include "FinleyAdapterException.h"
24 #include "FinleyError.h"
25
26 #include "escript/AbstractTransportProblem.h"
27 #include "escript/Data.h"
28 #include "escript/UtilC.h"
29
30 #include <boost/python/dict.hpp>
31 #include <boost/shared_ptr.hpp>
32 #include <boost/python/extract.hpp>
33
34 namespace finley {
35
36 class TransportProblemAdapter:public escript::AbstractTransportProblem {
37
38 /**
39 \brief
40 Wrapper for Paso_FCTransportProblem.
41
42 Description:
43 Wrapper for Paso_FCTransportProblem.
44 */
45
46 public:
47
48 /**
49 /brief
50 Default Constructor for TransportProblemAdapter.
51 NB: Only throws an exception.
52 */
53 FINLEY_DLL_API
54 TransportProblemAdapter();
55
56 /**
57 /brief
58 Constructor for TransportProblemAdapter.
59 */
60 FINLEY_DLL_API
61 TransportProblemAdapter(Paso_FCTransportProblem* transport_problem,
62 const double theta,
63 const double dt_max,
64 const int block_size,
65 const escript::FunctionSpace& functionspace);
66
67 /**
68 \brief
69 Destructor for TransportProblemAdapter. As specified in the constructor
70 this deallocates the pointer given to the constructor.
71 */
72 FINLEY_DLL_API
73 ~TransportProblemAdapter();
74
75 /**
76 \brief
77 Returns the pointer to the transport problem.
78 */
79 FINLEY_DLL_API
80 Paso_FCTransportProblem* getPaso_FCTransportProblem() const;
81
82 /**
83 \brief
84 Returns the transport problem as a const AbstractTransportProblem&.
85 */
86 inline const escript::AbstractTransportProblem& asAbstractTransportProblem() const
87 {
88 return dynamic_cast<const escript::AbstractTransportProblem&>(*this);
89 }
90
91 /**
92 \brief
93 Returns a transport problem as a const TransportProblemAdapter&.
94 */
95 inline static const TransportProblemAdapter& asTransportProblemAdapter(const AbstractTransportProblem& transportproblem)
96 {
97 return dynamic_cast<const TransportProblemAdapter&>(transportproblem);
98 }
99
100 /**
101 * \brief resets the transport operator typically as they have been updated.
102 * */
103 FINLEY_DLL_API
104 virtual void resetTransport() const;
105
106 protected:
107
108 private:
109
110 /**
111 * \brief
112 * sets solution out by time step dt.
113 * */
114 FINLEY_DLL_API
115 virtual void setToSolution(escript::Data& out,escript::Data& source,const double dt, const boost::python::dict& options) const;
116
117 /**
118 * \brief
119 * copies the initial value into the problem
120 * */
121 FINLEY_DLL_API
122 virtual void copyInitialValue(escript::Data& u) const;
123
124 //
125 // pointer to the externally created finley mesh - transport_problem.
126 //
127 boost::shared_ptr<Paso_FCTransportProblem> m_transport_problem;
128
129 };
130
131 } // end of namespace
132 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26