/[escript]/branches/diaplayground/dudley/src/CPPAdapter/dudleycpp.cpp
ViewVC logotype

Diff of /branches/diaplayground/dudley/src/CPPAdapter/dudleycpp.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/finley/src/CPPAdapter/finleycpp.cpp revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC trunk/dudley/src/CPPAdapter/dudleycpp.cpp revision 3469 by jfenwick, Tue Feb 22 06:39:16 2011 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2008 by University of Queensland  * Copyright (c) 2003-2010 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 12  Line 12 
12  *******************************************************/  *******************************************************/
13    
14    
15  #ifdef PASO_MPI  #ifdef ESYS_MPI
16  #include <mpi.h>  #include "esysUtils/Esys_MPI.h"
 #include "paso/Paso_MPI.h"  
17  #endif  #endif
18  extern "C" {  extern "C" {
19  #include "../Finley.h"  #include "../Dudley.h"
20  }  }
21    
22  #include "MeshAdapter.h"  #include "MeshAdapter.h"
# Line 25  extern "C" { Line 24  extern "C" {
24  #include "SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
25  #include "TransportProblemAdapter.h"  #include "TransportProblemAdapter.h"
26    
27  #include "FinleyAdapterException.h"  #include "DudleyAdapterException.h"
28  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
29  #include "esysUtils/esysExceptionTranslator.h"  #include "esysUtils/esysExceptionTranslator.h"
30    
# Line 35  extern "C" { Line 34  extern "C" {
34  #include <boost/python/module.hpp>  #include <boost/python/module.hpp>
35  #include <boost/python/def.hpp>  #include <boost/python/def.hpp>
36  #include <boost/python/detail/defaults_gen.hpp>  #include <boost/python/detail/defaults_gen.hpp>
37    #include <boost/version.hpp>
38    
39  using namespace boost::python;  using namespace boost::python;
40    
41  /**  /**
42     \page finley Finley     \page dudley Dudley
43     Finley is the python module name that contains the interfaces     Dudley is the python module name that contains the interfaces
44     to the C++ wrapper to finley.     to the C++ wrapper to dudley.
45    
46     \version 1.0.0     \version 1.0.0
47    
# Line 59  using namespace boost::python; Line 59  using namespace boost::python;
59    
60  */  */
61    
62  //  BOOST_PYTHON_MODULE(dudleycpp)
 // The BOOST_PYTHON_FUNCTION_OVERLOADS macro generates function overloads for optional  
 // arguments to the respective finley functions.  
 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  
 //  
 // NOTE: If the number of arguments to the finley functions change  
 // the magic numbers in the BOOST_PYTHON_FUNCTION_OVERLOADS call  
 // must change.  
 //  
 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  
 // BOOST_PYTHON_FUNCTION_OVERLOADS(readMesh_overloads,finley::readMesh,1,2)  
 // BOOST_PYTHON_FUNCTION_OVERLOADS(brick_overloads,finley::brick,0,12)  
 // BOOST_PYTHON_FUNCTION_OVERLOADS(rectangle_overloads,finley::rectangle,0,9)  
 // BOOST_PYTHON_FUNCTION_OVERLOADS(interval_overloads,finley::interval,0,6)  
 // BOOST_PYTHON_FUNCTION_OVERLOADS(glueFaces_overloads,finley::glueFaces,1,3)  
 // BOOST_PYTHON_FUNCTION_OVERLOADS(joinFaces_overloads,finley::joinFaces,1,3)  
   
 BOOST_PYTHON_MODULE(finleycpp)  
63  {  {
64    // This feature was added in boost v1.34
65    #if ((BOOST_VERSION/100)%1000 > 34) || (BOOST_VERSION/100000 >1)
66      // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
67      docstring_options docopt(true, true, false);
68    #endif
69    
70    //    //
71    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
72    // return pointers.    // return pointers.
73    //    //
74    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));    register_exception_translator<dudley::DudleyAdapterException>(&(esysUtils::esysExceptionTranslator));
75    
76    def("LoadMesh",finley::loadMesh,    def("LoadMesh",dudley::loadMesh,
77        (arg("fileName")="file.nc"),        (arg("fileName")="file.nc"),":rtype: `Domain`"
78        return_value_policy<manage_new_object>());  /*      ,return_value_policy<manage_new_object>());*/
79    def("ReadMesh",finley::readMesh,        );
80        (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),  
81        return_value_policy<manage_new_object>());    def("ReadMesh",dudley::readMesh,
82          (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true)
83    def("ReadGmsh",finley::readGmsh,  /*      ,return_value_policy<manage_new_object>());*/
84        (arg("fileName")="file.msh",arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimize")=true),      ,"Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.\n\n"
85        return_value_policy<manage_new_object>());  ":rtype: `Domain`\n:param fileName:\n:type fileName: ``string``\n"
86    ":param integrationOrder: order of the quadrature scheme. If *integrationOrder<0* the integration order is selected independently.\n"
87    ":type integrationOrder: ``int``\n"
88    ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"
89    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");
90    
91      def("ReadGmsh",dudley::readGmsh,
92          (arg("fileName")="file.msh",
93           arg("numDim"),
94           arg("integrationOrder")=-1,
95           arg("reducedIntegrationOrder")=-1,
96           arg("optimize")=true,  
97           arg("useMacroElements")=false)
98    //       ,return_value_policy<manage_new_object>());
99    ,"Read a gmsh mesh file\n\n"
100    ":rtype: `Domain`\n:param fileName:\n:type fileName: ``string``\n"
101    ":param integrationOrder: order of the quadrature scheme. If *integrationOrder<0* the integration order is selected independently.\n"
102    ":type integrationOrder: ``int``\n"
103    ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"
104    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``\n"
105    ":param useMacroElements: Enable the usage of macro elements instead of second order elements.\n:type useMacroElements: ``bool``"
106    );
107    
108    def ("Brick",finley::brick,    def ("Brick",dudley::brick,
109        (arg("n0")=1,arg("n1")=1,arg("n2")=1,        (arg("n0")=1,arg("n1")=1,arg("n2")=1,
110        arg("order")=1,        arg("order")=1,
111        arg("l0")=1.0,arg("l1")=1.0,arg("l2")=1.0,        arg("l0")=1.0,arg("l1")=1.0,arg("l2")=1.0,
# Line 104  BOOST_PYTHON_MODULE(finleycpp) Line 113  BOOST_PYTHON_MODULE(finleycpp)
113        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,
114        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
115        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
116        arg("optimize")=false),        arg("optimize")=false)
117        return_value_policy<manage_new_object>());  ,"Creates a tetrahedral mesh by subdividing n0 x n1 x n2 rectangular elements over the brick [0,l0] x [0,l1] x [0,l2]."
118    "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n:param n2:\n:type n2:\n"
119    ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
120    ":param l0: length of side 0\n:param l1:\n:param l2:\n"
121    ":param integrationOrder: order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.\n"
122    ":param reducedIntegrationOrder: order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.\n"
123    ":param useElementsOnFace:  whether or not to use elements on face\n"
124    ":type useElementsOnFace: ``int``"
125    ":param periodic0:  whether or not boundary conditions are periodic\n"
126    ":param periodic1:\n:param periodic2:\n"
127    ":param useFullElementOrder:\n:param optimize:\n"
128    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
129    );
130    
131    def ("Rectangle",finley::rectangle,    def ("Rectangle",dudley::rectangle,
132        (arg("n0")=1,arg("n1")=1,arg("order")=1,        (arg("n0")=1,arg("n1")=1,arg("order")=1,
133        arg("l0")=1.0,arg("l1")=1.0,        arg("l0")=1.0,arg("l1")=1.0,
134        arg("periodic0")=false,arg("periodic1")=false,        arg("periodic0")=false,arg("periodic1")=false,
135        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,
136        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
137        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
138        arg("optimize")=false),        arg("optimize")=false)
139        return_value_policy<manage_new_object>());  ,"Creates a triangular mesh by subdividing n0 x n1 rectangular elements over the brick [0,l0] x [0,l1]."
140    "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n"
141    def("Merge",finley::meshMerge,  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
142        return_value_policy<manage_new_object>());  ":param l0: length of side 0\n:param l1:\n"
143    ":param integrationOrder: order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.\n"
144    def("GlueFaces",finley::glueFaces,  ":param reducedIntegrationOrder: order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.\n"
145        (arg("safetyFactor")=0.2,  ":param useElementsOnFace:  whether or not to use elements on face\n"
146        arg("tolerance")=1.e-8,  ":type useElementsOnFace: ``int``"
147        arg("optimize")=true),  ":param periodic0:  whether or not boundary conditions are periodic\n"
148        return_value_policy<manage_new_object>());  ":param periodic1:\n"
149    ":param useFullElementOrder:\n:param optimize:\n"
150    def("JoinFaces",finley::joinFaces,  ":param useMacroElements: Enable the usage of first order macro elements.\n:type useMacroElements: ``bool``\n"
151        (arg("safetyFactor")=0.2,  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
152        arg("tolerance")=1.e-8,  );
153        arg("optimize")=true),  
154        return_value_policy<manage_new_object>());    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
155          ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Dudley_Mesh*> >())
156          .def(init<const dudley::MeshAdapter&>())
157          .def("write",&dudley::MeshAdapter::write,args("filename"),
158    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >  "Write the current mesh to a file with the given name.")
159        ("MeshAdapter",init<optional <Finley_Mesh*> >())        .def("print_mesh_info",&dudley::MeshAdapter::Print_Mesh_Info,(arg("full")=false),
160        .def(init<const finley::MeshAdapter&>())  ":param full:\n:type full: ``bool``")
161        .def("write",&finley::MeshAdapter::write)        .def("dump",&dudley::MeshAdapter::dump,args("fileName")
162        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false))  ,"dumps the mesh to a file with the given name.")
163        .def("dump",&finley::MeshAdapter::dump)        .def("getDescription",&dudley::MeshAdapter::getDescription,
164        .def("getDescription",&finley::MeshAdapter::getDescription)  ":return: a description for this domain\n:rtype: ``string``")
165        .def("getDim",&finley::MeshAdapter::getDim)        .def("getDim",&dudley::MeshAdapter::getDim,":rtype: ``int``")
166        .def("getDataShape",&finley::MeshAdapter::getDataShape)        .def("getDataShape",&dudley::MeshAdapter::getDataShape, args("functionSpaceCode"),
167        .def("getNumDataPointsGlobal",&finley::MeshAdapter::getNumDataPointsGlobal)  ":return: a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples\n:rtype: ``tuple``")
168        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem)        .def("getNumDataPointsGlobal",&dudley::MeshAdapter::getNumDataPointsGlobal,
169        .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem)  ":return: the number of data points summed across all MPI processes\n"
170        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS)  ":rtype: ``int``")
171        .def("addPDEToTransportProblem",&finley::MeshAdapter::addPDEToTransportProblem)        .def("addPDEToSystem",&dudley::MeshAdapter::addPDEToSystem,
172        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)  args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
173        .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem)  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
174        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)  ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"
175        .def("setX",&finley::MeshAdapter::setNewX)  ":param A:\n:type A: `Data`\n"
176        .def("getX",&finley::MeshAdapter::getX)  ":param B:\n:type B: `Data`\n"
177        .def("getNormal",&finley::MeshAdapter::getNormal)  ":param C:\n:type C: `Data`\n"
178        .def("getSize",&finley::MeshAdapter::getSize)  ":param D:\n:type D: `Data`\n"
179        .def("saveDX",&finley::MeshAdapter::saveDX)  ":param X:\n:type X: `Data`\n"
180        .def("saveVTK",&finley::MeshAdapter::saveVTK)  ":param Y:\n:type Y: `Data`\n"
181        .def("setTagMap",&finley::MeshAdapter::setTagMap)  ":param d:\n:type d: `Data`\n"
182        .def("getTag",&finley::MeshAdapter::getTag)  ":param d_contact:\n:type d_contact: `Data`\n"
183        .def("isValidTagName",&finley::MeshAdapter::isValidTagName)  ":param y_contact:\n:type y_contact: `Data`\n"
184        .def("showTagNames",&finley::MeshAdapter::showTagNames)  )
185        .def("getMPISize",&finley::MeshAdapter::getMPISize)        .def("addPDEToLumpedSystem",&dudley::MeshAdapter::addPDEToLumpedSystem,
186        .def("getMPIRank",&finley::MeshAdapter::getMPIRank);  args("mat", "D", "d"),
187    "adds a PDE onto the lumped stiffness matrix\n\n"
188    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >  ":param mat:\n:type mat: `Data`\n"
189        ("OperatorAdapter",no_init)  ":param D:\n:type D: `Data`\n"
190        .def("print_matrix_info",&finley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false))  ":param d:\n:type d: `Data`\n"
191        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)  ":param useHRZ:\n:type useHRZ: bool\n"
192        .def("resetValues",&finley::SystemMatrixAdapter::resetValues)  )
193        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)        .def("addPDEToRHS",&dudley::MeshAdapter::addPDEToRHS,
194        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);  args("rhs", "X", "Y", "y", "y_contact"),
195    "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
196    class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >  ":param rhs:\n:type rhs: `Data`\n"
197        ("TransportProblemAdapter",no_init)  ":param X:\n:type X: `Data`\n"
198        .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)  ":param Y:\n:type Y: `Data`\n"
199        .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);  ":param y:\n:type y: `Data`\n"
200    ":param y_contact:\n:type y_contact: `Data`"
201    )
202          .def("addPDEToTransportProblem",&dudley::MeshAdapter::addPDEToTransportProblem,
203    args( "tp", "source", "M", "A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
204    ":param tp:\n:type tp: `TransportProblemAdapter`\n"
205    ":param source:\n:type source: `Data`\n"
206    ":param M:\n:type M: `Data`\n"
207    ":param A:\n:type A: `Data`\n"
208    ":param B:\n:type B: `Data`\n"
209    ":param C:\n:type C: `Data`\n"
210    ":param D:\n:type D: `Data`\n"
211    ":param X:\n:type X: `Data`\n"
212    ":param Y:\n:type Y: `Data`\n"
213    ":param d:\n:type d: `Data`\n"
214    ":param y:\n:type y: `Data`\n"
215    ":param d_contact:\n:type d_contact: `Data`\n"
216    ":param y_contact:\n:type y_contact: `Data`\n"
217    )
218          .def("newOperator",&dudley::MeshAdapter::newSystemMatrix,
219    args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
220    "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"
221    ":param row_blocksize:\n:type row_blocksize: ``int``\n"
222    ":param row_functionspace:\n:type row_functionspace: `FunctionSpace`\n"
223    ":param column_blocksize:\n:type column_blocksize: ``int``\n"
224    ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
225    ":param type:\n:type type: ``int``\n"
226    )
227          .def("newTransportProblem",&dudley::MeshAdapter::newTransportProblem,
228    args("theta", "blocksize", "functionspace", "type"),
229    "creates a TransportProblemAdapter\n\n"
230    ":param theta:\n:type theta: ``float``\n"
231    ":param blocksize:\n:type blocksize: ``int``\n"
232    ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
233    ":param type:\n:type type: ``int``\n"
234    )
235          .def("getSystemMatrixTypeId",&dudley::MeshAdapter::getSystemMatrixTypeId,
236    args("solver", "preconditioner", "package", "symmetry"),
237    ":return: the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, perconditioner, and symmetric matrix is used.\n"
238    ":rtype: ``int``\n"
239    ":param solver:\n:type solver: ``int``\n"
240    ":param preconditioner:\n:type preconditioner: ``int``\n"
241    ":param package:\n:type package: ``int``\n"
242    ":param symmetry:\n:type symmetry: ``int``\n"
243    )
244          .def("getTransportTypeId",&dudley::MeshAdapter::getTransportTypeId,
245    args("solver", "preconditioner", "package", "symmetry"),
246    ":return: the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.\n"
247    ":rtype: ``int``\n"
248    ":param solver:\n:type solver: ``int``\n"
249    ":param preconditioner:\n:type preconditioner: ``int``\n"
250    ":param package:\n:type package: ``int``\n"
251    ":param symmetry:\n:type symmetry: ``int``\n"
252    )
253          .def("setX",&dudley::MeshAdapter::setNewX,
254    args("arg"), "assigns new location to the domain\n\n:param arg:\n:type arg: `Data`")
255          .def("getX",&dudley::MeshAdapter::getX, ":return: locations in the FEM nodes\n\n"
256    ":rtype: `Data`")
257          .def("getNormal",&dudley::MeshAdapter::getNormal,
258    ":return: boundary normals at the quadrature point on the face elements\n"
259    ":rtype: `Data`")
260          .def("getSize",&dudley::MeshAdapter::getSize,":return: the element size\n"
261    ":rtype: `Data`")
262          .def("saveDX",&dudley::MeshAdapter::saveDX,args("filename" ,"arg"),
263    "Saves a dictonary of Data objects to an OpenDX input file. The keywords are used as identifier"
264    "\n\n:param filename: \n:type filename: ``string``\n"
265    "\n:param arg: \n:type arg: ``dict``\n")
266          .def("saveVTK",&dudley::MeshAdapter::saveVTK,
267    args("filename" ,"arg",  "metadata", "metadata_schema"),
268    "Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier"
269    "\n\n:param filename:\n:type filename: ``string``\n"
270    ":param arg:\n:type arg: ``dict``\n"
271    ":param metadata:\n:type metadata: ``string``\n"
272    ":param metadata_schema:\n:type metadata_schema: ``string``\n"
273    )
274          .def("setTagMap",&dudley::MeshAdapter::setTagMap,args("name","tag"),
275    "Give a tag number a name.\n\n:param name: Name for the tag\n:type name: ``string``\n"
276    ":param tag: numeric id\n:type tag: ``int``\n:note: Tag names must be unique within a domain")
277          .def("getTag",&dudley::MeshAdapter::getTag,args("name"),":return: tag id for "
278    "``name``\n:rtype: ``string``")
279          .def("isValidTagName",&dudley::MeshAdapter::isValidTagName,args("name"),
280    ":return: True is ``name`` corresponds to a tag\n:rtype: ``bool``")
281          .def("showTagNames",&dudley::MeshAdapter::showTagNames,":return: A space separated list of tag names\n:rtype: ``string``")
282          .def("getMPISize",&dudley::MeshAdapter::getMPISize,":return: the number of processes used for this `Domain`\n:rtype: ``int``")
283          .def("getMPIRank",&dudley::MeshAdapter::getMPIRank,":return: the rank of this process\n:rtype: ``int``")
284          .def("MPIBarrier",&dudley::MeshAdapter::MPIBarrier,"Wait until all processes have reached this point")
285          .def("onMasterProcessor",&dudley::MeshAdapter::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");
286    
287      class_<dudley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
288          ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)
289          .def("print_matrix_info",&dudley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")
290          .def("nullifyRowsAndCols",&dudley::SystemMatrixAdapter::nullifyRowsAndCols)
291          .def("resetValues",&dudley::SystemMatrixAdapter::resetValues, "resets the matrix entries")
292          .def("saveMM",&dudley::SystemMatrixAdapter::saveMM,args("fileName"),
293    "writes the matrix to a file using the Matrix Market file format")
294          .def("saveHB",&dudley::SystemMatrixAdapter::saveHB, args("filename"),
295    "writes the matrix to a file using the Harwell-Boeing file format");
296    
297      class_<dudley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
298          ("TransportProblemAdapter","",no_init)
299          .def("getSafeTimeStepSize",&dudley::TransportProblemAdapter::getSafeTimeStepSize)
300          .def("getUnlimitedTimeStepSize",&dudley::TransportProblemAdapter::getUnlimitedTimeStepSize)
301          .def("resetTransport",&dudley::TransportProblemAdapter::resetTransport,
302    "resets the transport operator typically as they have been updated");
303  }  }

Legend:
Removed from v.1811  
changed lines
  Added in v.3469

  ViewVC Help
Powered by ViewVC 1.1.26