/[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 2722 by gross, Fri Oct 16 06:45:01 2009 UTC trunk/dudley/src/CPPAdapter/dudleycpp.cpp revision 3991 by caltinay, Tue Sep 25 23:52:22 2012 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*****************************************************************************
3  *  *
4  * Copyright (c) 2003-2009 by University of Queensland  * Copyright (c) 2003-2012 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * http://www.uq.edu.au
 * http://www.uq.edu.au/esscc  
6  *  *
7  * Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
8  * Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
9  * http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
10  *  *
11  *******************************************************/  * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12    * Development since 2012 by School of Earth Sciences
13    *
14    *****************************************************************************/
15    
16    
17  #ifdef PASO_MPI  #ifdef ESYS_MPI
18  #include <mpi.h>  #include "esysUtils/Esys_MPI.h"
 #include "paso/Paso_MPI.h"  
19  #endif  #endif
20  extern "C" {  extern "C" {
21  #include "../Finley.h"  #include "../Dudley.h"
22  }  }
23    
24    #include <pasowrap/SystemMatrixAdapter.h>
25    #include <pasowrap/TransportProblemAdapter.h>
26    
27  #include "MeshAdapter.h"  #include "MeshAdapter.h"
28  #include "MeshAdapterFactory.h"  #include "MeshAdapterFactory.h"
 #include "SystemMatrixAdapter.h"  
 #include "TransportProblemAdapter.h"  
29    
30  #include "FinleyAdapterException.h"  #include "DudleyAdapterException.h"
31  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
32  #include "esysUtils/esysExceptionTranslator.h"  #include "esysUtils/esysExceptionTranslator.h"
33    
# Line 39  extern "C" { Line 41  extern "C" {
41    
42  using namespace boost::python;  using namespace boost::python;
43    
44  /**  BOOST_PYTHON_MODULE(dudleycpp)
    \page finley Finley  
    Finley is the python module name that contains the interfaces  
    to the C++ wrapper to finley.  
   
    \version 1.0.0  
   
    \section class_desc Class Description:  
    Data  
   
    \section class_limits Class Limitations:  
    None  
   
    \section class_conds Class Conditions of Use:  
    None  
   
    \section throws Throws:  
    None  
   
 */  
   
 //  
 // 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)  
45  {  {
46  // This feature was added in boost v1.34  // This feature was added in boost v1.34
47  #if ((BOOST_VERSION/100)%1000 > 34) || (BOOST_VERSION/100000 >1)  #if ((BOOST_VERSION/100)%1000 > 34) || (BOOST_VERSION/100000 >1)
# Line 89  BOOST_PYTHON_MODULE(finleycpp) Line 53  BOOST_PYTHON_MODULE(finleycpp)
53    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
54    // return pointers.    // return pointers.
55    //    //
56    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));    register_exception_translator<dudley::DudleyAdapterException>(&(esysUtils::esysExceptionTranslator));
57    
58    def("LoadMesh",finley::loadMesh,    def("LoadMesh",dudley::loadMesh,
59        (arg("fileName")="file.nc"),":rtype: `Domain`"        (arg("fileName")="file.nc"),":rtype: `Domain`"
60  /*      ,return_value_policy<manage_new_object>());*/  /*      ,return_value_policy<manage_new_object>());*/
61        );        );
62    
63    def("ReadMesh",finley::readMesh,    def("ReadMesh",dudley::readMesh,
64        (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)
65  /*      ,return_value_policy<manage_new_object>());*/  /*      ,return_value_policy<manage_new_object>());*/
66      ,"Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.\n\n"      ,"Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.\n\n"
# Line 106  BOOST_PYTHON_MODULE(finleycpp) Line 70  BOOST_PYTHON_MODULE(finleycpp)
70  ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"  ":param reducedIntegrationOrder: order of the quadrature scheme. If *reducedIntegrationOrder<0* the integration order is selected independently.\n"
71  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");
72    
73    def("ReadGmsh",finley::readGmsh,    def("ReadGmsh",dudley::readGmsh,
74        (arg("fileName")="file.msh",        (arg("fileName")="file.msh",
75         arg("numDim"),         arg("numDim"),
76         arg("integrationOrder")=-1,         arg("integrationOrder")=-1,
# Line 123  BOOST_PYTHON_MODULE(finleycpp) Line 87  BOOST_PYTHON_MODULE(finleycpp)
87  ":param useMacroElements: Enable the usage of macro elements instead of second order elements.\n:type useMacroElements: ``bool``"  ":param useMacroElements: Enable the usage of macro elements instead of second order elements.\n:type useMacroElements: ``bool``"
88  );  );
89    
90    def ("Brick",finley::brick,    def ("Brick",dudley::brick,
91        (arg("n0")=1,arg("n1")=1,arg("n2")=1,        (arg("n0")=1,arg("n1")=1,arg("n2")=1,
92        arg("order")=1,        arg("order")=1,
93        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 132  BOOST_PYTHON_MODULE(finleycpp) Line 96  BOOST_PYTHON_MODULE(finleycpp)
96        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
97        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
98        arg("optimize")=false)        arg("optimize")=false)
99          ,"Creates a tetrahedral mesh by subdividing n0 x n1 x n2 rectangular elements over the brick [0,l0] x [0,l1] x [0,l2]."
100  //       ,return_value_policy<manage_new_object>());  "We accept floating point values for n0, n1 only to ease transition of scripts to python3 when the time comes."
 ,"Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2]."  
101  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n:param n2:\n:type n2:\n"  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n:param n2:\n:type n2:\n"
102  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
103  ":param l0: length of side 0\n:param l1:\n:param l2:\n"  ":param l0: length of side 0\n:param l1:\n:param l2:\n"
# Line 148  BOOST_PYTHON_MODULE(finleycpp) Line 111  BOOST_PYTHON_MODULE(finleycpp)
111  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
112  );  );
113    
114    def ("Rectangle",finley::rectangle,    def ("Rectangle",dudley::rectangle,
115        (arg("n0")=1,arg("n1")=1,arg("order")=1,        (arg("n0")=1,arg("n1")=1,arg("order")=1,
116        arg("l0")=1.0,arg("l1")=1.0,        arg("l0")=1.0,arg("l1")=1.0,
117        arg("periodic0")=false,arg("periodic1")=false,        arg("periodic0")=false,arg("periodic1")=false,
# Line 156  BOOST_PYTHON_MODULE(finleycpp) Line 119  BOOST_PYTHON_MODULE(finleycpp)
119        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
120        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
121        arg("optimize")=false)        arg("optimize")=false)
122  //       ,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]."
123  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."  "We accept floating point values for n0, n1 only to ease transition of scripts to python3 when the time comes."
124  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n"  "\n\n:param n0:\n:type n0:\n:param n1:\n:type n1:\n"
125  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"  ":param order: =1, =-1 or =2 gives the order of shape function. If -1 macro elements of order 1 are used.\n"
126  ":param l0: length of side 0\n:param l1:\n"  ":param l0: length of side 0\n:param l1:\n"
# Line 172  BOOST_PYTHON_MODULE(finleycpp) Line 135  BOOST_PYTHON_MODULE(finleycpp)
135  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
136  );  );
137    
138    def("Merge",finley::meshMerge,args("meshList")    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
139  //       ,return_value_policy<manage_new_object>());        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Dudley_Mesh*> >())
140  ,"Merges a list of meshes into one mesh.\n\n:rtype: `Domain`"        .def(init<const dudley::MeshAdapter&>())
141    );        .def("write",&dudley::MeshAdapter::write,args("filename"),
   
   def("GlueFaces",finley::glueFaces,  
       (arg("meshList"),arg("safetyFactor")=0.2,  
       arg("tolerance")=1.e-8,  
       arg("optimize")=true)  
 //       ,return_value_policy<manage_new_object>());  
 ,"Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements."  
     );  
   
   def("JoinFaces",finley::joinFaces,  
       (arg("meshList"), arg("safetyFactor")=0.2,  
       arg("tolerance")=1.e-8,  
       arg("optimize")=true)  
 //       ,return_value_policy<manage_new_object>());  
 ,"Detects matching faces in the mesh and replaces them by joint elements."  
     );  
   
   
   class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >  
       ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Finley_Mesh*> >())  
       .def(init<const finley::MeshAdapter&>())  
       .def("write",&finley::MeshAdapter::write,args("filename"),  
142  "Write the current mesh to a file with the given name.")  "Write the current mesh to a file with the given name.")
143        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false),        .def("print_mesh_info",&dudley::MeshAdapter::Print_Mesh_Info,(arg("full")=false),
144  ":param full:\n:type full: ``bool``")  ":param full:\n:type full: ``bool``")
145        .def("dump",&finley::MeshAdapter::dump,args("fileName")        .def("dump",&dudley::MeshAdapter::dump,args("fileName")
146  ,"dumps the mesh to a file with the given name.")  ,"dumps the mesh to a file with the given name.")
147        .def("getDescription",&finley::MeshAdapter::getDescription,        .def("getDescription",&dudley::MeshAdapter::getDescription,
148  ":return: a description for this domain\n:rtype: ``string``")  ":return: a description for this domain\n:rtype: ``string``")
149        .def("getDim",&finley::MeshAdapter::getDim,":rtype: ``int``")        .def("getDim",&dudley::MeshAdapter::getDim,":rtype: ``int``")
150        .def("getDataShape",&finley::MeshAdapter::getDataShape, args("functionSpaceCode"),        .def("getDataShape",&dudley::MeshAdapter::getDataShape, args("functionSpaceCode"),
151  ":return: a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples\n:rtype: ``tuple``")  ":return: a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples\n:rtype: ``tuple``")
152        .def("getNumDataPointsGlobal",&finley::MeshAdapter::getNumDataPointsGlobal,        .def("getNumDataPointsGlobal",&dudley::MeshAdapter::getNumDataPointsGlobal,
153  ":return: the number of data points summed across all MPI processes\n"  ":return: the number of data points summed across all MPI processes\n"
154  ":rtype: ``int``")  ":rtype: ``int``")
155        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem,        .def("addPDEToSystem",&dudley::MeshAdapter::addPDEToSystem,
156  args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),  args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
157  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
158  ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"  ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"
# Line 225  args("mat", "rhs","A", "B", "C", "D", "X Line 166  args("mat", "rhs","A", "B", "C", "D", "X
166  ":param d_contact:\n:type d_contact: `Data`\n"  ":param d_contact:\n:type d_contact: `Data`\n"
167  ":param y_contact:\n:type y_contact: `Data`\n"  ":param y_contact:\n:type y_contact: `Data`\n"
168  )  )
169        .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem,        .def("addPDEToLumpedSystem",&dudley::MeshAdapter::addPDEToLumpedSystem,
170  args("mat", "D", "d"),  args("mat", "D", "d"),
171  "adds a PDE onto the lumped stiffness matrix\n\n"  "adds a PDE onto the lumped stiffness matrix\n\n"
172  ":param mat:\n:type mat: `Data`\n"  ":param mat:\n:type mat: `Data`\n"
173  ":param D:\n:type D: `Data`\n"  ":param D:\n:type D: `Data`\n"
174  ":param d:\n:type d: `Data`\n")  ":param d:\n:type d: `Data`\n"
175        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS,  ":param useHRZ:\n:type useHRZ: bool\n"
176    )
177          .def("addPDEToRHS",&dudley::MeshAdapter::addPDEToRHS,
178  args("rhs", "X", "Y", "y", "y_contact"),  args("rhs", "X", "Y", "y", "y_contact"),
179  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"  "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
180  ":param rhs:\n:type rhs: `Data`\n"  ":param rhs:\n:type rhs: `Data`\n"
# Line 240  args("rhs", "X", "Y", "y", "y_contact"), Line 183  args("rhs", "X", "Y", "y", "y_contact"),
183  ":param y:\n:type y: `Data`\n"  ":param y:\n:type y: `Data`\n"
184  ":param y_contact:\n:type y_contact: `Data`"  ":param y_contact:\n:type y_contact: `Data`"
185  )  )
186        .def("addPDEToTransportProblem",&finley::MeshAdapter::addPDEToTransportProblem,        .def("addPDEToTransportProblem",&dudley::MeshAdapter::addPDEToTransportProblem,
187  args( "tp", "source", "M", "A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),  args( "tp", "source", "M", "A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
188  ":param tp:\n:type tp: `TransportProblemAdapter`\n"  ":param tp:\n:type tp: `TransportProblemAdapter`\n"
189  ":param source:\n:type source: `Data`\n"  ":param source:\n:type source: `Data`\n"
# Line 256  args( "tp", "source", "M", "A", "B", "C" Line 199  args( "tp", "source", "M", "A", "B", "C"
199  ":param d_contact:\n:type d_contact: `Data`\n"  ":param d_contact:\n:type d_contact: `Data`\n"
200  ":param y_contact:\n:type y_contact: `Data`\n"  ":param y_contact:\n:type y_contact: `Data`\n"
201  )  )
202        .def("newOperator",&finley::MeshAdapter::newSystemMatrix,        .def("newOperator",&dudley::MeshAdapter::newSystemMatrix,
203  args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),  args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
204  "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"  "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"
205  ":param row_blocksize:\n:type row_blocksize: ``int``\n"  ":param row_blocksize:\n:type row_blocksize: ``int``\n"
# Line 265  args("row_blocksize", "row_functionspace Line 208  args("row_blocksize", "row_functionspace
208  ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"  ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
209  ":param type:\n:type type: ``int``\n"  ":param type:\n:type type: ``int``\n"
210  )  )
211        .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem,        .def("newTransportProblem",&dudley::MeshAdapter::newTransportProblem,
212  args("theta", "blocksize", "functionspace", "type"),  args("theta", "blocksize", "functionspace", "type"),
213  "creates a TransportProblemAdapter\n\n"  "creates a TransportProblemAdapter\n\n"
214  ":param theta:\n:type theta: ``float``\n"  ":param theta:\n:type theta: ``float``\n"
# Line 273  args("theta", "blocksize", "functionspac Line 216  args("theta", "blocksize", "functionspac
216  ":param functionspace:\n:type functionspace: `FunctionSpace`\n"  ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
217  ":param type:\n:type type: ``int``\n"  ":param type:\n:type type: ``int``\n"
218  )  )
219        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId,        .def("getSystemMatrixTypeId",&dudley::MeshAdapter::getSystemMatrixTypeId,
220  args("solver", "preconditioner", "package", "symmetry"),  args("solver", "preconditioner", "package", "symmetry"),
221  ":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"  ":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"
222  ":rtype: ``int``\n"  ":rtype: ``int``\n"
# Line 282  args("solver", "preconditioner", "packag Line 225  args("solver", "preconditioner", "packag
225  ":param package:\n:type package: ``int``\n"  ":param package:\n:type package: ``int``\n"
226  ":param symmetry:\n:type symmetry: ``int``\n"  ":param symmetry:\n:type symmetry: ``int``\n"
227  )  )
228        .def("getTransportTypeId",&finley::MeshAdapter::getTransportTypeId,        .def("getTransportTypeId",&dudley::MeshAdapter::getTransportTypeId,
229  args("solver", "preconditioner", "package", "symmetry"),  args("solver", "preconditioner", "package", "symmetry"),
230  ":return: the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.\n"  ":return: the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.\n"
231  ":rtype: ``int``\n"  ":rtype: ``int``\n"
# Line 291  args("solver", "preconditioner", "packag Line 234  args("solver", "preconditioner", "packag
234  ":param package:\n:type package: ``int``\n"  ":param package:\n:type package: ``int``\n"
235  ":param symmetry:\n:type symmetry: ``int``\n"  ":param symmetry:\n:type symmetry: ``int``\n"
236  )  )
237        .def("setX",&finley::MeshAdapter::setNewX,        .def("setX",&dudley::MeshAdapter::setNewX,
238  args("arg"), "assigns new location to the domain\n\n:param arg:\n:type arg: `Data`")  args("arg"), "assigns new location to the domain\n\n:param arg:\n:type arg: `Data`")
239        .def("getX",&finley::MeshAdapter::getX, ":return: locations in the FEM nodes\n\n"        .def("getX",&dudley::MeshAdapter::getX, ":return: locations in the FEM nodes\n\n"
240  ":rtype: `Data`")  ":rtype: `Data`")
241        .def("getNormal",&finley::MeshAdapter::getNormal,        .def("getNormal",&dudley::MeshAdapter::getNormal,
242  ":return: boundary normals at the quadrature point on the face elements\n"  ":return: boundary normals at the quadrature point on the face elements\n"
243  ":rtype: `Data`")  ":rtype: `Data`")
244        .def("getSize",&finley::MeshAdapter::getSize,":return: the element size\n"        .def("getSize",&dudley::MeshAdapter::getSize,":return: the element size\n"
245  ":rtype: `Data`")  ":rtype: `Data`")
246        .def("saveDX",&finley::MeshAdapter::saveDX,args("filename" ,"arg"),        .def("saveDX",&dudley::MeshAdapter::saveDX,args("filename" ,"arg"),
247  "Saves a dictonary of Data objects to an OpenDX input file. The keywords are used as identifier"  "Saves a dictonary of Data objects to an OpenDX input file. The keywords are used as identifier"
248  "\n\n:param filename: \n:type filename: ``string``\n"  "\n\n:param filename: \n:type filename: ``string``\n"
249  "\n:param arg: \n:type arg: ``dict``\n")  "\n:param arg: \n:type arg: ``dict``\n")
250        .def("saveVTK",&finley::MeshAdapter::saveVTK,        .def("saveVTK",&dudley::MeshAdapter::saveVTK,
251  args("filename" ,"arg",  "metadata", "metadata_schema"),  args("filename" ,"arg",  "metadata", "metadata_schema"),
252  "Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier"  "Saves a dictonary of Data objects to an VTK XML input file. The keywords are used as identifier"
253  "\n\n:param filename:\n:type filename: ``string``\n"  "\n\n:param filename:\n:type filename: ``string``\n"
# Line 312  args("filename" ,"arg",  "metadata", "me Line 255  args("filename" ,"arg",  "metadata", "me
255  ":param metadata:\n:type metadata: ``string``\n"  ":param metadata:\n:type metadata: ``string``\n"
256  ":param metadata_schema:\n:type metadata_schema: ``string``\n"  ":param metadata_schema:\n:type metadata_schema: ``string``\n"
257  )  )
258        .def("setTagMap",&finley::MeshAdapter::setTagMap,args("name","tag"),        .def("setTagMap",&dudley::MeshAdapter::setTagMap,args("name","tag"),
259  "Give a tag number a name.\n\n:param name: Name for the tag\n:type name: ``string``\n"  "Give a tag number a name.\n\n:param name: Name for the tag\n:type name: ``string``\n"
260  ":param tag: numeric id\n:type tag: ``int``\n:note: Tag names must be unique within a domain")  ":param tag: numeric id\n:type tag: ``int``\n:note: Tag names must be unique within a domain")
261        .def("getTag",&finley::MeshAdapter::getTag,args("name"),":return: tag id for "        .def("getTag",&dudley::MeshAdapter::getTag,args("name"),":return: tag id for "
262  "``name``\n:rtype: ``string``")  "``name``\n:rtype: ``string``")
263        .def("isValidTagName",&finley::MeshAdapter::isValidTagName,args("name"),        .def("isValidTagName",&dudley::MeshAdapter::isValidTagName,args("name"),
264  ":return: True is ``name`` corresponds to a tag\n:rtype: ``bool``")  ":return: True is ``name`` corresponds to a tag\n:rtype: ``bool``")
265        .def("showTagNames",&finley::MeshAdapter::showTagNames,":return: A space separated list of tag names\n:rtype: ``string``")        .def("showTagNames",&dudley::MeshAdapter::showTagNames,":return: A space separated list of tag names\n:rtype: ``string``")
266        .def("getMPISize",&finley::MeshAdapter::getMPISize,":return: the number of processes used for this `Domain`\n:rtype: ``int``")        .def("getMPISize",&dudley::MeshAdapter::getMPISize,":return: the number of processes used for this `Domain`\n:rtype: ``int``")
267        .def("getMPIRank",&finley::MeshAdapter::getMPIRank,":return: the rank of this process\n:rtype: ``int``")        .def("getMPIRank",&dudley::MeshAdapter::getMPIRank,":return: the rank of this process\n:rtype: ``int``")
268        .def("MPIBarrier",&finley::MeshAdapter::MPIBarrier,"Wait until all processes have reached this point")        .def("MPIBarrier",&dudley::MeshAdapter::MPIBarrier,"Wait until all processes have reached this point")
269        .def("onMasterProcessor",&finley::MeshAdapter::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");        .def("onMasterProcessor",&dudley::MeshAdapter::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");
270    
   class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >  
       ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)  
       .def("print_matrix_info",&finley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")  
       .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)  
       .def("resetValues",&finley::SystemMatrixAdapter::resetValues, "resets the matrix entries")  
       .def("saveMM",&finley::SystemMatrixAdapter::saveMM,args("fileName"),  
 "writes the matrix to a file using the Matrix Market file format")  
       .def("saveHB",&finley::SystemMatrixAdapter::saveHB, args("filename"),  
 "writes the matrix to a file using the Harwell-Boeing file format");  
   
   class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >  
       ("TransportProblemAdapter","",no_init)  
       .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)  
       .def("getUnlimitedTimeStepSize",&finley::TransportProblemAdapter::getUnlimitedTimeStepSize)  
       .def("resetTransport",&finley::TransportProblemAdapter::resetTransport,  
 "resets the transport operator typically as they have been updated");  
271  }  }

Legend:
Removed from v.2722  
changed lines
  Added in v.3991

  ViewVC Help
Powered by ViewVC 1.1.26