/[escript]/branches/dirac/finley/src/CPPAdapter/finleycpp.cpp
ViewVC logotype

Diff of /branches/dirac/finley/src/CPPAdapter/finleycpp.cpp

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

trunk/finley/src/CPPAdapter/finleycpp.cpp revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC branches/dirac/finley/src/CPPAdapter/finleycpp.cpp revision 3554 by jfenwick, Tue Aug 23 00:23:53 2011 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2010 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #ifdef PASO_MPI  #ifdef ESYS_MPI
16  #include <mpi.h>  #include "esysUtils/Esys_MPI.h"
17  #endif  #endif
18  extern "C" {  extern "C" {
19  #include "../Finley.h"  #include "../Finley.h"
# Line 23  extern "C" { Line 22  extern "C" {
22  #include "MeshAdapter.h"  #include "MeshAdapter.h"
23  #include "MeshAdapterFactory.h"  #include "MeshAdapterFactory.h"
24  #include "SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
25    #include "TransportProblemAdapter.h"
26    
27  #include "FinleyAdapterException.h"  #include "FinleyAdapterException.h"
28  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
# Line 34  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    
# Line 77  using namespace boost::python; Line 78  using namespace boost::python;
78    
79  BOOST_PYTHON_MODULE(finleycpp)  BOOST_PYTHON_MODULE(finleycpp)
80  {  {
81    // This feature was added in boost v1.34
82    #if ((BOOST_VERSION/100)%1000 > 34) || (BOOST_VERSION/100000 >1)
83      // params are: bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures
84      docstring_options docopt(true, true, false);
85    #endif
86    
   // def("ReadMesh",finley::readMesh,readMesh_overloads());  
   // def("Brick",finley::brick,brick_overloads());  
   // def("Rectangle",finley::rectangle,rectangle_overloads());  
   // def("Interval",finley::interval,interval_overloads());  
   // def("GlueFaces",finley::glueFaces,glueFaces_overloads());  
   // def("JoinFaces",finley::joinFaces,joinFaces_overloads());  
87    //    //
88    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
89    // return pointers.    // return pointers.
90      //
91      register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));
92    
93      def("LoadMesh",finley::loadMesh,
94          (arg("fileName")="file.nc"),":rtype: `Domain`"
95    /*      ,return_value_policy<manage_new_object>());*/
96          );
97    
   def("load",finley::loadMesh,  
       (arg("fileName")="file.nc"),  
       return_value_policy<manage_new_object>());  
98    def("ReadMesh",finley::readMesh,    def("ReadMesh",finley::readMesh,
99        (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),        (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true)
100        return_value_policy<manage_new_object>());  /*      ,return_value_policy<manage_new_object>());*/
101        ,"Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.\n\n"
102    ":rtype: `Domain`\n:param fileName:\n:type fileName: ``string``\n"
103    ":param integrationOrder: order of the quadrature scheme. If *integrationOrder<0* the integration order is selected independently.\n"
104    ":type integrationOrder: ``int``\n"
105    ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"
106    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");
107    
108    def("ReadGmsh",finley::readGmsh,    def("ReadGmsh",finley::readGmsh,
109        (arg("fileName")="file.msh",arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimize")=true),        (arg("fileName")="file.msh",
110        return_value_policy<manage_new_object>());         arg("numDim"),
111           arg("integrationOrder")=-1,
112           arg("reducedIntegrationOrder")=-1,
113           arg("optimize")=true,  
114           arg("useMacroElements")=false)
115    //       ,return_value_policy<manage_new_object>());
116    ,"Read a gmsh mesh file\n\n"
117    ":rtype: `Domain`\n:param fileName:\n:type fileName: ``string``\n"
118    ":param integrationOrder: order of the quadrature scheme. If *integrationOrder<0* the integration order is selected independently.\n"
119    ":type integrationOrder: ``int``\n"
120    ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"
121    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``\n"
122    ":param useMacroElements: Enable the usage of macro elements instead of second order elements.\n:type useMacroElements: ``bool``"
123    );
124    
125      def ("__Brick_driver",finley::brick_driver,
126          (arg("params"))
127    ,"Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2]."
128    "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n:param n2:\n:type n2:\n"
129    ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
130    ":param l0: length of side 0\n:param l1:\n:param l2:\n"
131    ":param integrationOrder: order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.\n"
132    ":param reducedIntegrationOrder: order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.\n"
133    ":param useElementsOnFace:  whether or not to use elements on face\n"
134    ":type useElementsOnFace: ``int``"
135    ":param periodic0:  whether or not boundary conditions are periodic\n"
136    ":param periodic1:\n:param periodic2:\n"
137    ":param useFullElementOrder:\n:param optimize:\n"
138    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
139    );
140    
141    def ("Brick",finley::brick,    def ("__Rectangle_driver",finley::rectangle,
       (arg("n0")=1,arg("n1")=1,arg("n2")=1,  
       arg("order")=1,  
       arg("l0")=1.0,arg("l1")=1.0,arg("l2")=1.0,  
       arg("periodic0")=false,arg("periodic1")=false,arg("periodic2")=false,  
       arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  
       arg("useElementsOnFace")=false,  
       arg("useFullElementOrder")=false,  
       arg("optimize")=false),  
       return_value_policy<manage_new_object>());  
   
   def ("Rectangle",finley::rectangle,  
142        (arg("n0")=1,arg("n1")=1,arg("order")=1,        (arg("n0")=1,arg("n1")=1,arg("order")=1,
143        arg("l0")=1.0,arg("l1")=1.0,        arg("l0")=1.0,arg("l1")=1.0,
144        arg("periodic0")=false,arg("periodic1")=false,        arg("periodic0")=false,arg("periodic1")=false,
145        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,
146        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
147        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
148        arg("optimize")=false),        arg("optimize")=false,
149        return_value_policy<manage_new_object>());        arg("points")=finley::EmptyPythonList,
150          arg("tags")=finley::EmptyPythonList)
151    def("Merge",finley::meshMerge,  //       ,return_value_policy<manage_new_object>());
152        return_value_policy<manage_new_object>());  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."
153    "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n"
154    ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
155    ":param l0: length of side 0\n:param l1:\n"
156    ":param integrationOrder: order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.\n"
157    ":param reducedIntegrationOrder: order of the quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.\n"
158    ":param useElementsOnFace:  whether or not to use elements on face\n"
159    ":type useElementsOnFace: ``int``"
160    ":param periodic0:  whether or not boundary conditions are periodic\n"
161    ":param periodic1:\n"
162    ":param useFullElementOrder:\n:param optimize:\n"
163    ":param useMacroElements: Enable the usage of first order macro elements.\n:type useMacroElements: ``bool``\n"
164    ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
165    );
166    
167      def("Merge",finley::meshMerge,args("meshList")
168    //       ,return_value_policy<manage_new_object>());
169    ,"Merges a list of meshes into one mesh.\n\n:rtype: `Domain`"
170      );
171    
172    def("GlueFaces",finley::glueFaces,    def("GlueFaces",finley::glueFaces,
173        (arg("safetyFactor")=0.2,        (arg("meshList"),arg("safetyFactor")=0.2,
174        arg("tolerance")=1.e-8,        arg("tolerance")=1.e-8,
175        arg("optimize")=true),        arg("optimize")=true)
176        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
177    ,"Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements."
178        );
179    
180    def("JoinFaces",finley::joinFaces,    def("JoinFaces",finley::joinFaces,
181        (arg("safetyFactor")=0.2,        (arg("meshList"), arg("safetyFactor")=0.2,
182        arg("tolerance")=1.e-8,        arg("tolerance")=1.e-8,
183        arg("optimize")=true),        arg("optimize")=true)
184        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
185    ,"Detects matching faces in the mesh and replaces them by joint elements."
186        );
187    
   register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));  
188    
189    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
190        ("MeshAdapter",init<optional <Finley_Mesh*> >())        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Finley_Mesh*> >())
191        .def(init<const finley::MeshAdapter&>())        .def(init<const finley::MeshAdapter&>())
192        .def("write",&finley::MeshAdapter::write)        .def("write",&finley::MeshAdapter::write,args("filename"),
193        .def("dump",&finley::MeshAdapter::write)  "Write the current mesh to a file with the given name.")
194        .def("getDescription",&finley::MeshAdapter::getDescription)        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false),
195        .def("getDim",&finley::MeshAdapter::getDim)  ":param full:\n:type full: ``bool``")
196        .def("getDataShape",&finley::MeshAdapter::getDataShape)        .def("dump",&finley::MeshAdapter::dump,args("fileName")
197        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem)  ,"dumps the mesh to a file with the given name.")
198        .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem)        .def("getDescription",&finley::MeshAdapter::getDescription,
199        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS)  ":return: a description for this domain\n:rtype: ``string``")
200        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)        .def("getDim",&finley::MeshAdapter::getDim,":rtype: ``int``")
201        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)        .def("getDataShape",&finley::MeshAdapter::getDataShape, args("functionSpaceCode"),
202        .def("setX",&finley::MeshAdapter::setNewX)  ":return: a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples\n:rtype: ``tuple``")
203        .def("getX",&finley::MeshAdapter::getX)        .def("getNumDataPointsGlobal",&finley::MeshAdapter::getNumDataPointsGlobal,
204        .def("getNormal",&finley::MeshAdapter::getNormal)  ":return: the number of data points summed across all MPI processes\n"
205        .def("getSize",&finley::MeshAdapter::getSize)  ":rtype: ``int``")
206        .def("saveDX",&finley::MeshAdapter::saveDX)        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem,
207        .def("saveVTK",&finley::MeshAdapter::saveVTK)  args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
208        .def("setTagMap",&finley::MeshAdapter::setTagMap)  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
209        .def("getTag",&finley::MeshAdapter::getTag)  ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"
210        .def("isValidTagName",&finley::MeshAdapter::isValidTagName)  ":param A:\n:type A: `Data`\n"
211        .def("showTagNames",&finley::MeshAdapter::showTagNames)  ":param B:\n:type B: `Data`\n"
212        .def("getMPISize",&finley::MeshAdapter::getMPISize)  ":param C:\n:type C: `Data`\n"
213        .def("getMPIRank",&finley::MeshAdapter::getMPIRank);  ":param D:\n:type D: `Data`\n"
214    ":param X:\n:type X: `Data`\n"
215    ":param Y:\n:type Y: `Data`\n"
216    ":param d:\n:type d: `Data`\n"
217    ":param d_contact:\n:type d_contact: `Data`\n"
218    ":param y_contact:\n:type y_contact: `Data`\n"
219    )
220          .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem,
221    args("mat", "D", "d"),
222    "adds a PDE onto the lumped stiffness matrix\n\n"
223    ":param mat:\n:type mat: `Data`\n"
224    ":param D:\n:type D: `Data`\n"
225    ":param d:\n:type d: `Data`\n"
226    ":param useHRZ:\n:type useHRZ: bool\n")
227          .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS,
228    args("rhs", "X", "Y", "y", "y_contact"),
229    "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
230    ":param rhs:\n:type rhs: `Data`\n"
231    ":param X:\n:type X: `Data`\n"
232    ":param Y:\n:type Y: `Data`\n"
233    ":param y:\n:type y: `Data`\n"
234    ":param y_contact:\n:type y_contact: `Data`"
235    )
236          .def("addPDEToTransportProblem",&finley::MeshAdapter::addPDEToTransportProblem,
237    args( "tp", "source", "M", "A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
238    ":param tp:\n:type tp: `TransportProblemAdapter`\n"
239    ":param source:\n:type source: `Data`\n"
240    ":param M:\n:type M: `Data`\n"
241    ":param A:\n:type A: `Data`\n"
242    ":param B:\n:type B: `Data`\n"
243    ":param C:\n:type C: `Data`\n"
244    ":param D:\n:type D: `Data`\n"
245    ":param X:\n:type X: `Data`\n"
246    ":param Y:\n:type Y: `Data`\n"
247    ":param d:\n:type d: `Data`\n"
248    ":param y:\n:type y: `Data`\n"
249    ":param d_contact:\n:type d_contact: `Data`\n"
250    ":param y_contact:\n:type y_contact: `Data`\n"
251    )
252          .def("newOperator",&finley::MeshAdapter::newSystemMatrix,
253    args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
254    "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"
255    ":param row_blocksize:\n:type row_blocksize: ``int``\n"
256    ":param row_functionspace:\n:type row_functionspace: `FunctionSpace`\n"
257    ":param column_blocksize:\n:type column_blocksize: ``int``\n"
258    ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
259    ":param type:\n:type type: ``int``\n"
260    )
261          .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem,
262    args("theta", "blocksize", "functionspace", "type"),
263    "creates a TransportProblemAdapter\n\n"
264    ":param theta:\n:type theta: ``float``\n"
265    ":param blocksize:\n:type blocksize: ``int``\n"
266    ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
267    ":param type:\n:type type: ``int``\n"
268    )
269          .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId,
270    args("solver", "preconditioner", "package", "symmetry"),
271    ":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"
272    ":rtype: ``int``\n"
273    ":param solver:\n:type solver: ``int``\n"
274    ":param preconditioner:\n:type preconditioner: ``int``\n"
275    ":param package:\n:type package: ``int``\n"
276    ":param symmetry:\n:type symmetry: ``int``\n"
277    )
278          .def("getTransportTypeId",&finley::MeshAdapter::getTransportTypeId,
279    args("solver", "preconditioner", "package", "symmetry"),
280    ":return: the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.\n"
281    ":rtype: ``int``\n"
282    ":param solver:\n:type solver: ``int``\n"
283    ":param preconditioner:\n:type preconditioner: ``int``\n"
284    ":param package:\n:type package: ``int``\n"
285    ":param symmetry:\n:type symmetry: ``int``\n"
286    )
287          .def("setX",&finley::MeshAdapter::setNewX,
288    args("arg"), "assigns new location to the domain\n\n:param arg:\n:type arg: `Data`")
289          .def("getX",&finley::MeshAdapter::getX, ":return: locations in the FEM nodes\n\n"
290    ":rtype: `Data`")
291          .def("getNormal",&finley::MeshAdapter::getNormal,
292    ":return: boundary normals at the quadrature point on the face elements\n"
293    ":rtype: `Data`")
294          .def("getSize",&finley::MeshAdapter::getSize,":return: the element size\n"
295    ":rtype: `Data`")
296          .def("saveDX",&finley::MeshAdapter::saveDX,args("filename" ,"arg"),
297    "Saves a dictonary of Data objects to an OpenDX input file. The keywords are used as identifier"
298    "\n\n:param filename: \n:type filename: ``string``\n"
299    "\n:param arg: \n:type arg: ``dict``\n")
300          .def("saveVTK",&finley::MeshAdapter::saveVTK,
301    args("filename" ,"arg",  "metadata", "metadata_schema"),
302    "Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier"
303    "\n\n:param filename:\n:type filename: ``string``\n"
304    ":param arg:\n:type arg: ``dict``\n"
305    ":param metadata:\n:type metadata: ``string``\n"
306    ":param metadata_schema:\n:type metadata_schema: ``string``\n"
307    )
308          .def("setTagMap",&finley::MeshAdapter::setTagMap,args("name","tag"),
309    "Give a tag number a name.\n\n:param name: Name for the tag\n:type name: ``string``\n"
310    ":param tag: numeric id\n:type tag: ``int``\n:note: Tag names must be unique within a domain")
311          .def("getTag",&finley::MeshAdapter::getTag,args("name"),":return: tag id for "
312    "``name``\n:rtype: ``string``")
313          .def("isValidTagName",&finley::MeshAdapter::isValidTagName,args("name"),
314    ":return: True is ``name`` corresponds to a tag\n:rtype: ``bool``")
315          .def("showTagNames",&finley::MeshAdapter::showTagNames,":return: A space separated list of tag names\n:rtype: ``string``")
316          .def("getMPISize",&finley::MeshAdapter::getMPISize,":return: the number of processes used for this `Domain`\n:rtype: ``int``")
317          .def("getMPIRank",&finley::MeshAdapter::getMPIRank,":return: the rank of this process\n:rtype: ``int``")
318          .def("MPIBarrier",&finley::MeshAdapter::MPIBarrier,"Wait until all processes have reached this point")
319          .def("onMasterProcessor",&finley::MeshAdapter::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`")
320    //       .def("addDiracPoints", &finley::MeshAdapter::addDiracPoints,(arg("points"), arg("tags")=finley::EmptyPythonList),
321    //       "adds points to support more Dirac delta function.\n\n"
322    //          ":param points: list of points where Dirac delta function are to be defined. The location will be adjusted to\n"
323    //  "               to match the nearest node of the finite element mesh.\n:type points: ``list`` of ``list``s of ``floats``\n"
324    //  ":param tags: list of tags to be assigned to the points.\n:type tags: ``list`` of ``int``s or ``strings``\n"    
325    //       )
326    //       .def("addDiracPoint", &finley::MeshAdapter::addDiracPoint,(arg("point"), arg("tag")=-1),
327    //         "adds a point to support more Dirac delta function.\n\n"
328    //          ":param point: point where Dirac delta function are to be defined. The location will be adjusted to\n"
329    //  "               to match the nearest node of the finite element mesh.\n:type point: ``list`` of ``floats``\n"
330    //  ":param tags: tag to be assigned to the point.\n:type tag: ``int``s or ``strings``\n"    
331    //       )
332    //       .def("addDiracPoint", &finley::MeshAdapter::addDiracPointWithTagName,(arg("point"), arg("tag")),
333    //         "adds a point to support more Dirac delta function.\n\n"
334    //          ":param point: point where Dirac delta function are to be defined. The location will be adjusted to\n"
335    //  "               to match the nearest node of the finite element mesh.\n:type point: ``list`` of ``floats``\n"
336    //  ":param tags: tag to be assigned to the point.\n:type tag: ``int``s or ``strings``\n"    
337    //       )
338    ;
339    
340    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
341        ("OperatorAdapter",no_init)        ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)
342          .def("print_matrix_info",&finley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")
343        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)
344        .def("resetValues",&finley::SystemMatrixAdapter::resetValues)        .def("resetValues",&finley::SystemMatrixAdapter::resetValues, "resets the matrix entries")
345        .def("saveMM",&finley::SystemMatrixAdapter::saveMM)        .def("saveMM",&finley::SystemMatrixAdapter::saveMM,args("fileName"),
346        .def("saveHB",&finley::SystemMatrixAdapter::saveHB);  "writes the matrix to a file using the Matrix Market file format")
347          .def("saveHB",&finley::SystemMatrixAdapter::saveHB, args("filename"),
348    "writes the matrix to a file using the Harwell-Boeing file format");
349    
350      class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
351          ("TransportProblemAdapter","",no_init)
352          .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)
353          .def("getUnlimitedTimeStepSize",&finley::TransportProblemAdapter::getUnlimitedTimeStepSize)
354          .def("resetTransport",&finley::TransportProblemAdapter::resetTransport,
355    "resets the transport operator typically as they have been updated");
356  }  }

Legend:
Removed from v.1312  
changed lines
  Added in v.3554

  ViewVC Help
Powered by ViewVC 1.1.26