/[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

branches/domexper/finley/src/CPPAdapter/finleycpp.cpp revision 3079 by jfenwick, Tue Aug 3 04:04:51 2010 UTC branches/domexper/dudley/src/CPPAdapter/dudleycpp.cpp revision 3114 by jfenwick, Fri Aug 27 05:26:25 2010 UTC
# Line 17  Line 17 
17  #include "paso/Paso_MPI.h"  #include "paso/Paso_MPI.h"
18  #endif  #endif
19  extern "C" {  extern "C" {
20  #include "../Finley.h"  #include "../Dudley.h"
21  }  }
22    
23  #include "MeshAdapter.h"  #include "MeshAdapter.h"
# Line 25  extern "C" { Line 25  extern "C" {
25  #include "SystemMatrixAdapter.h"  #include "SystemMatrixAdapter.h"
26  #include "TransportProblemAdapter.h"  #include "TransportProblemAdapter.h"
27    
28  #include "FinleyAdapterException.h"  #include "DudleyAdapterException.h"
29  // #include "esysUtils/EsysException.h"  // #include "esysUtils/EsysException.h"
30  #include "esysUtils/esysExceptionTranslator.h"  #include "esysUtils/esysExceptionTranslator.h"
31    
# Line 40  extern "C" { Line 40  extern "C" {
40  using namespace boost::python;  using namespace boost::python;
41    
42  /**  /**
43     \page finley Finley     \page dudley Dudley
44     Finley is the python module name that contains the interfaces     Dudley is the python module name that contains the interfaces
45     to the C++ wrapper to finley.     to the C++ wrapper to dudley.
46    
47     \version 1.0.0     \version 1.0.0
48    
# Line 60  using namespace boost::python; Line 60  using namespace boost::python;
60    
61  */  */
62    
63  //  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)  
64  {  {
65  // This feature was added in boost v1.34  // This feature was added in boost v1.34
66  #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 72  BOOST_PYTHON_MODULE(finleycpp)
72    // NOTE: The return_value_policy is necessary for functions that    // NOTE: The return_value_policy is necessary for functions that
73    // return pointers.    // return pointers.
74    //    //
75    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));    register_exception_translator<dudley::DudleyAdapterException>(&(esysUtils::esysExceptionTranslator));
76    
77    def("LoadMesh",finley::loadMesh,    def("LoadMesh",dudley::loadMesh,
78        (arg("fileName")="file.nc"),":rtype: `Domain`"        (arg("fileName")="file.nc"),":rtype: `Domain`"
79  /*      ,return_value_policy<manage_new_object>());*/  /*      ,return_value_policy<manage_new_object>());*/
80        );        );
81    
82    def("ReadMesh",finley::readMesh,    def("ReadMesh",dudley::readMesh,
83        (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)
84  /*      ,return_value_policy<manage_new_object>());*/  /*      ,return_value_policy<manage_new_object>());*/
85      ,"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 89  BOOST_PYTHON_MODULE(finleycpp)
89  ":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"
90  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``");
91    
92    def("ReadGmsh",finley::readGmsh,    def("ReadGmsh",dudley::readGmsh,
93        (arg("fileName")="file.msh",        (arg("fileName")="file.msh",
94         arg("numDim"),         arg("numDim"),
95         arg("integrationOrder")=-1,         arg("integrationOrder")=-1,
# Line 123  BOOST_PYTHON_MODULE(finleycpp) Line 106  BOOST_PYTHON_MODULE(finleycpp)
106  ":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``"
107  );  );
108    
109    def ("Brick",finley::brick,    def ("Brick",dudley::brick,
110        (arg("n0")=1,arg("n1")=1,arg("n2")=1,        (arg("n0")=1,arg("n1")=1,arg("n2")=1,
111        arg("order")=1,        arg("order")=1,
112        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 115  BOOST_PYTHON_MODULE(finleycpp)
115        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
116        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
117        arg("optimize")=false)        arg("optimize")=false)
         
 //       ,return_value_policy<manage_new_object>());  
118  ,"Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2]."  ,"Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2]."
119  "\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"
120  ":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"
# Line 148  BOOST_PYTHON_MODULE(finleycpp) Line 129  BOOST_PYTHON_MODULE(finleycpp)
129  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
130  );  );
131    
132    def ("Rectangle",finley::rectangle,    def ("Rectangle",dudley::rectangle,
133        (arg("n0")=1,arg("n1")=1,arg("order")=1,        (arg("n0")=1,arg("n1")=1,arg("order")=1,
134        arg("l0")=1.0,arg("l1")=1.0,        arg("l0")=1.0,arg("l1")=1.0,
135        arg("periodic0")=false,arg("periodic1")=false,        arg("periodic0")=false,arg("periodic1")=false,
# Line 156  BOOST_PYTHON_MODULE(finleycpp) Line 137  BOOST_PYTHON_MODULE(finleycpp)
137        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
138        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
139        arg("optimize")=false)        arg("optimize")=false)
 //       ,return_value_policy<manage_new_object>());  
140  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."  ,"Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1]."
141  "\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"
142  ":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"
# Line 172  BOOST_PYTHON_MODULE(finleycpp) Line 152  BOOST_PYTHON_MODULE(finleycpp)
152  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"  ":param optimize: Enable optimisation of node labels\n:type optimize: ``bool``"
153  );  );
154    
155    def("Merge",finley::meshMerge,args("meshList")    def("Merge",dudley::meshMerge,args("meshList")
156  //       ,return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
157  ,"Merges a list of meshes into one mesh.\n\n:rtype: `Domain`"  ,"Merges a list of meshes into one mesh.\n\n:rtype: `Domain`"
158    );    );
159    
160    def("GlueFaces",finley::glueFaces,    def("GlueFaces",dudley::glueFaces,
161        (arg("meshList"),arg("safetyFactor")=0.2,        (arg("meshList"),arg("safetyFactor")=0.2,
162        arg("tolerance")=1.e-8,        arg("tolerance")=1.e-8,
163        arg("optimize")=true)        arg("optimize")=true)
# Line 185  BOOST_PYTHON_MODULE(finleycpp) Line 165  BOOST_PYTHON_MODULE(finleycpp)
165  ,"Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements."  ,"Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements."
166      );      );
167    
168    def("JoinFaces",finley::joinFaces,    def("JoinFaces",dudley::joinFaces,
169        (arg("meshList"), arg("safetyFactor")=0.2,        (arg("meshList"), arg("safetyFactor")=0.2,
170        arg("tolerance")=1.e-8,        arg("tolerance")=1.e-8,
171        arg("optimize")=true)        arg("optimize")=true)
# Line 194  BOOST_PYTHON_MODULE(finleycpp) Line 174  BOOST_PYTHON_MODULE(finleycpp)
174      );      );
175    
176    
177    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<dudley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
178        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Finley_Mesh*> >())        ("MeshAdapter","A concrete class representing a domain. For more details, please consult the c++ documentation.",init<optional <Dudley_Mesh*> >())
179        .def(init<const finley::MeshAdapter&>())        .def(init<const dudley::MeshAdapter&>())
180        .def("write",&finley::MeshAdapter::write,args("filename"),        .def("write",&dudley::MeshAdapter::write,args("filename"),
181  "Write the current mesh to a file with the given name.")  "Write the current mesh to a file with the given name.")
182        .def("print_mesh_info",&finley::MeshAdapter::Print_Mesh_Info,(arg("full")=false),        .def("print_mesh_info",&dudley::MeshAdapter::Print_Mesh_Info,(arg("full")=false),
183  ":param full:\n:type full: ``bool``")  ":param full:\n:type full: ``bool``")
184        .def("dump",&finley::MeshAdapter::dump,args("fileName")        .def("dump",&dudley::MeshAdapter::dump,args("fileName")
185  ,"dumps the mesh to a file with the given name.")  ,"dumps the mesh to a file with the given name.")
186        .def("getDescription",&finley::MeshAdapter::getDescription,        .def("getDescription",&dudley::MeshAdapter::getDescription,
187  ":return: a description for this domain\n:rtype: ``string``")  ":return: a description for this domain\n:rtype: ``string``")
188        .def("getDim",&finley::MeshAdapter::getDim,":rtype: ``int``")        .def("getDim",&dudley::MeshAdapter::getDim,":rtype: ``int``")
189        .def("getDataShape",&finley::MeshAdapter::getDataShape, args("functionSpaceCode"),        .def("getDataShape",&dudley::MeshAdapter::getDataShape, args("functionSpaceCode"),
190  ":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``")
191        .def("getNumDataPointsGlobal",&finley::MeshAdapter::getNumDataPointsGlobal,        .def("getNumDataPointsGlobal",&dudley::MeshAdapter::getNumDataPointsGlobal,
192  ":return: the number of data points summed across all MPI processes\n"  ":return: the number of data points summed across all MPI processes\n"
193  ":rtype: ``int``")  ":rtype: ``int``")
194        .def("addPDEToSystem",&finley::MeshAdapter::addPDEToSystem,        .def("addPDEToSystem",&dudley::MeshAdapter::addPDEToSystem,
195  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"),
196  "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"
197  ":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"
198  ":param A:\n:type A: `Data`\n"  ":param A:\n:type A: `Data`\n"
# Line 222  args("mat", "rhs","A", "B", "C", "D", "X Line 202  args("mat", "rhs","A", "B", "C", "D", "X
202  ":param X:\n:type X: `Data`\n"  ":param X:\n:type X: `Data`\n"
203  ":param Y:\n:type Y: `Data`\n"  ":param Y:\n:type Y: `Data`\n"
204  ":param d:\n:type d: `Data`\n"  ":param d:\n:type d: `Data`\n"
 ":param d_contact:\n:type d_contact: `Data`\n"  
 ":param y_contact:\n:type y_contact: `Data`\n"  
205  )  )
206        .def("addPDEToLumpedSystem",&finley::MeshAdapter::addPDEToLumpedSystem,        .def("addPDEToLumpedSystem",&dudley::MeshAdapter::addPDEToLumpedSystem,
207  args("mat", "D", "d"),  args("mat", "D", "d"),
208  "adds a PDE onto the lumped stiffness matrix\n\n"  "adds a PDE onto the lumped stiffness matrix\n\n"
209  ":param mat:\n:type mat: `Data`\n"  ":param mat:\n:type mat: `Data`\n"
210  ":param D:\n:type D: `Data`\n"  ":param D:\n:type D: `Data`\n"
211  ":param d:\n:type d: `Data`\n")  ":param d:\n:type d: `Data`\n")
212        .def("addPDEToRHS",&finley::MeshAdapter::addPDEToRHS,        .def("addPDEToRHS",&dudley::MeshAdapter::addPDEToRHS,
213  args("rhs", "X", "Y", "y", "y_contact"),  args("rhs", "X", "Y", "y", "y_contact"),
214  "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"
215  ":param rhs:\n:type rhs: `Data`\n"  ":param rhs:\n:type rhs: `Data`\n"
# Line 240  args("rhs", "X", "Y", "y", "y_contact"), Line 218  args("rhs", "X", "Y", "y", "y_contact"),
218  ":param y:\n:type y: `Data`\n"  ":param y:\n:type y: `Data`\n"
219  ":param y_contact:\n:type y_contact: `Data`"  ":param y_contact:\n:type y_contact: `Data`"
220  )  )
221        .def("addPDEToTransportProblem",&finley::MeshAdapter::addPDEToTransportProblem,        .def("addPDEToTransportProblem",&dudley::MeshAdapter::addPDEToTransportProblem,
222  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"),
223  ":param tp:\n:type tp: `TransportProblemAdapter`\n"  ":param tp:\n:type tp: `TransportProblemAdapter`\n"
224  ":param source:\n:type source: `Data`\n"  ":param source:\n:type source: `Data`\n"
# Line 256  args( "tp", "source", "M", "A", "B", "C" Line 234  args( "tp", "source", "M", "A", "B", "C"
234  ":param d_contact:\n:type d_contact: `Data`\n"  ":param d_contact:\n:type d_contact: `Data`\n"
235  ":param y_contact:\n:type y_contact: `Data`\n"  ":param y_contact:\n:type y_contact: `Data`\n"
236  )  )
237        .def("newOperator",&finley::MeshAdapter::newSystemMatrix,        .def("newOperator",&dudley::MeshAdapter::newSystemMatrix,
238  args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),  args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
239  "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"  "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"
240  ":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 243  args("row_blocksize", "row_functionspace
243  ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"  ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
244  ":param type:\n:type type: ``int``\n"  ":param type:\n:type type: ``int``\n"
245  )  )
246        .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem,        .def("newTransportProblem",&dudley::MeshAdapter::newTransportProblem,
247  args("theta", "blocksize", "functionspace", "type"),  args("theta", "blocksize", "functionspace", "type"),
248  "creates a TransportProblemAdapter\n\n"  "creates a TransportProblemAdapter\n\n"
249  ":param theta:\n:type theta: ``float``\n"  ":param theta:\n:type theta: ``float``\n"
# Line 273  args("theta", "blocksize", "functionspac Line 251  args("theta", "blocksize", "functionspac
251  ":param functionspace:\n:type functionspace: `FunctionSpace`\n"  ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
252  ":param type:\n:type type: ``int``\n"  ":param type:\n:type type: ``int``\n"
253  )  )
254        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId,        .def("getSystemMatrixTypeId",&dudley::MeshAdapter::getSystemMatrixTypeId,
255  args("solver", "preconditioner", "package", "symmetry"),  args("solver", "preconditioner", "package", "symmetry"),
256  ":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"
257  ":rtype: ``int``\n"  ":rtype: ``int``\n"
# Line 282  args("solver", "preconditioner", "packag Line 260  args("solver", "preconditioner", "packag
260  ":param package:\n:type package: ``int``\n"  ":param package:\n:type package: ``int``\n"
261  ":param symmetry:\n:type symmetry: ``int``\n"  ":param symmetry:\n:type symmetry: ``int``\n"
262  )  )
263        .def("getTransportTypeId",&finley::MeshAdapter::getTransportTypeId,        .def("getTransportTypeId",&dudley::MeshAdapter::getTransportTypeId,
264  args("solver", "preconditioner", "package", "symmetry"),  args("solver", "preconditioner", "package", "symmetry"),
265  ":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"
266  ":rtype: ``int``\n"  ":rtype: ``int``\n"
# Line 291  args("solver", "preconditioner", "packag Line 269  args("solver", "preconditioner", "packag
269  ":param package:\n:type package: ``int``\n"  ":param package:\n:type package: ``int``\n"
270  ":param symmetry:\n:type symmetry: ``int``\n"  ":param symmetry:\n:type symmetry: ``int``\n"
271  )  )
272        .def("setX",&finley::MeshAdapter::setNewX,        .def("setX",&dudley::MeshAdapter::setNewX,
273  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`")
274        .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"
275  ":rtype: `Data`")  ":rtype: `Data`")
276        .def("getNormal",&finley::MeshAdapter::getNormal,        .def("getNormal",&dudley::MeshAdapter::getNormal,
277  ":return: boundary normals at the quadrature point on the face elements\n"  ":return: boundary normals at the quadrature point on the face elements\n"
278  ":rtype: `Data`")  ":rtype: `Data`")
279        .def("getSize",&finley::MeshAdapter::getSize,":return: the element size\n"        .def("getSize",&dudley::MeshAdapter::getSize,":return: the element size\n"
280  ":rtype: `Data`")  ":rtype: `Data`")
281        .def("saveDX",&finley::MeshAdapter::saveDX,args("filename" ,"arg"),        .def("saveDX",&dudley::MeshAdapter::saveDX,args("filename" ,"arg"),
282  "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"
283  "\n\n:param filename: \n:type filename: ``string``\n"  "\n\n:param filename: \n:type filename: ``string``\n"
284  "\n:param arg: \n:type arg: ``dict``\n")  "\n:param arg: \n:type arg: ``dict``\n")
285        .def("saveVTK",&finley::MeshAdapter::saveVTK,        .def("saveVTK",&dudley::MeshAdapter::saveVTK,
286  args("filename" ,"arg",  "metadata", "metadata_schema"),  args("filename" ,"arg",  "metadata", "metadata_schema"),
287  "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"
288  "\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 290  args("filename" ,"arg",  "metadata", "me
290  ":param metadata:\n:type metadata: ``string``\n"  ":param metadata:\n:type metadata: ``string``\n"
291  ":param metadata_schema:\n:type metadata_schema: ``string``\n"  ":param metadata_schema:\n:type metadata_schema: ``string``\n"
292  )  )
293        .def("setTagMap",&finley::MeshAdapter::setTagMap,args("name","tag"),        .def("setTagMap",&dudley::MeshAdapter::setTagMap,args("name","tag"),
294  "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"
295  ":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")
296        .def("getTag",&finley::MeshAdapter::getTag,args("name"),":return: tag id for "        .def("getTag",&dudley::MeshAdapter::getTag,args("name"),":return: tag id for "
297  "``name``\n:rtype: ``string``")  "``name``\n:rtype: ``string``")
298        .def("isValidTagName",&finley::MeshAdapter::isValidTagName,args("name"),        .def("isValidTagName",&dudley::MeshAdapter::isValidTagName,args("name"),
299  ":return: True is ``name`` corresponds to a tag\n:rtype: ``bool``")  ":return: True is ``name`` corresponds to a tag\n:rtype: ``bool``")
300        .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``")
301        .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``")
302        .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``")
303        .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")
304        .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`");
305    
306    class_<finley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >    class_<dudley::SystemMatrixAdapter, bases<escript::AbstractSystemMatrix> >
307        ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)        ("OperatorAdapter","A concrete class representing an operator. For more details, please see the c++ documentation.", no_init)
308        .def("print_matrix_info",&finley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")        .def("print_matrix_info",&dudley::SystemMatrixAdapter::Print_Matrix_Info,(arg("full")=false),"prints information about a system matrix")
309        .def("nullifyRowsAndCols",&finley::SystemMatrixAdapter::nullifyRowsAndCols)        .def("nullifyRowsAndCols",&dudley::SystemMatrixAdapter::nullifyRowsAndCols)
310        .def("resetValues",&finley::SystemMatrixAdapter::resetValues, "resets the matrix entries")        .def("resetValues",&dudley::SystemMatrixAdapter::resetValues, "resets the matrix entries")
311        .def("saveMM",&finley::SystemMatrixAdapter::saveMM,args("fileName"),        .def("saveMM",&dudley::SystemMatrixAdapter::saveMM,args("fileName"),
312  "writes the matrix to a file using the Matrix Market file format")  "writes the matrix to a file using the Matrix Market file format")
313        .def("saveHB",&finley::SystemMatrixAdapter::saveHB, args("filename"),        .def("saveHB",&dudley::SystemMatrixAdapter::saveHB, args("filename"),
314  "writes the matrix to a file using the Harwell-Boeing file format");  "writes the matrix to a file using the Harwell-Boeing file format");
315    
316    class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >    class_<dudley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
317        ("TransportProblemAdapter","",no_init)        ("TransportProblemAdapter","",no_init)
318        .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)        .def("getSafeTimeStepSize",&dudley::TransportProblemAdapter::getSafeTimeStepSize)
319        .def("getUnlimitedTimeStepSize",&finley::TransportProblemAdapter::getUnlimitedTimeStepSize)        .def("getUnlimitedTimeStepSize",&dudley::TransportProblemAdapter::getUnlimitedTimeStepSize)
320        .def("resetTransport",&finley::TransportProblemAdapter::resetTransport,        .def("resetTransport",&dudley::TransportProblemAdapter::resetTransport,
321  "resets the transport operator typically as they have been updated");  "resets the transport operator typically as they have been updated");
322  }  }

Legend:
Removed from v.3079  
changed lines
  Added in v.3114

  ViewVC Help
Powered by ViewVC 1.1.26