/[escript]/trunk/escript/src/escriptcpp.cpp
ViewVC logotype

Diff of /trunk/escript/src/escriptcpp.cpp

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

revision 3258 by jfenwick, Tue Jul 6 03:31:48 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 22  Line 22 
22  #include "AbstractSystemMatrix.h"  #include "AbstractSystemMatrix.h"
23  #include "AbstractTransportProblem.h"  #include "AbstractTransportProblem.h"
24  #include "DataVector.h"  #include "DataVector.h"
25  #include "paso/Paso_MPI.h"  #include "esysUtils/Esys_MPI.h"
26  #include "EscriptParams.h"  #include "EscriptParams.h"
27  #include "TestDomain.h"  #include "TestDomain.h"
28    
# Line 52  using namespace boost::python; Line 52  using namespace boost::python;
52   *   *
53   * - \ref esys_exception "Esys Exception"   * - \ref esys_exception "Esys Exception"
54   *   *
55   * - \ref finley   * - \ref dudley
56   *   *
57   * - <a href="../../epydoc/index.html">Python module documentation (epydoc generated)</a>   * - <a href="../../epydoc/index.html">Python module documentation (epydoc generated)</a>
58   *   *
# Line 155  BOOST_PYTHON_MODULE(escriptcpp) Line 155  BOOST_PYTHON_MODULE(escriptcpp)
155       .def("getMPIRank",&escript::AbstractDomain::getMPIRank,":return: the rank of this process\n:rtype: ``int``")       .def("getMPIRank",&escript::AbstractDomain::getMPIRank,":return: the rank of this process\n:rtype: ``int``")
156       .def("MPIBarrier",&escript::AbstractDomain::MPIBarrier,"Wait until all processes have reached this point")       .def("MPIBarrier",&escript::AbstractDomain::MPIBarrier,"Wait until all processes have reached this point")
157       .def("onMasterProcessor",&escript::AbstractDomain::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`")       .def("onMasterProcessor",&escript::AbstractDomain::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`")
158         .def("supportsContactElements", &escript::AbstractDomain::supportsContactElements,"Does this domain support contact elements.")
159       .def(self == self)       .def(self == self)
160       .def(self != self);       .def(self != self);
161    
# Line 169  args("solver", "preconditioner", "packag Line 169  args("solver", "preconditioner", "packag
169  "when a particular solver package and symmetric matrix is used.\n"  "when a particular solver package and symmetric matrix is used.\n"
170  ":rtype: int")  ":rtype: int")
171         .def("getTransportTypeId",&escript::AbstractContinuousDomain::getTransportTypeId,         .def("getTransportTypeId",&escript::AbstractContinuousDomain::getTransportTypeId,
172  args("solver", "preconditioner", "package", "symmetry"));  args("solver", "preconditioner", "package", "symmetry"))
173    
174          .def("addPDEToSystem",&escript::AbstractContinuousDomain::addPDEToSystem,
175    args("mat", "rhs","A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
176    "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
177    ":param mat:\n:type mat: `OperatorAdapter`\n:param rhs:\n:type rhs: `Data`\n"
178    ":param A:\n:type A: `Data`\n"
179    ":param B:\n:type B: `Data`\n"
180    ":param C:\n:type C: `Data`\n"
181    ":param D:\n:type D: `Data`\n"
182    ":param X:\n:type X: `Data`\n"
183    ":param Y:\n:type Y: `Data`\n"
184    ":param d:\n:type d: `Data`\n"
185    ":param d_contact:\n:type d_contact: `Data`\n"
186    ":param y_contact:\n:type y_contact: `Data`\n"
187    )
188          .def("addPDEToRHS",&escript::AbstractContinuousDomain::addPDEToRHS,
189    args("rhs", "X", "Y", "y", "y_contact"),
190    "adds a PDE onto the stiffness matrix mat and a rhs\n\n"
191    ":param rhs:\n:type rhs: `Data`\n"
192    ":param X:\n:type X: `Data`\n"
193    ":param Y:\n:type Y: `Data`\n"
194    ":param y:\n:type y: `Data`\n"
195    ":param y_contact:\n:type y_contact: `Data`"
196    )
197          .def("addPDEToTransportProblem",&escript::AbstractContinuousDomain::addPDEToTransportProblem,
198    args( "tp", "source", "M", "A", "B", "C", "D", "X", "Y", "d", "y", "d_contact", "y_contact"),
199    ":param tp:\n:type tp: `TransportProblemAdapter`\n"
200    ":param source:\n:type source: `Data`\n"
201    ":param M:\n:type M: `Data`\n"
202    ":param A:\n:type A: `Data`\n"
203    ":param B:\n:type B: `Data`\n"
204    ":param C:\n:type C: `Data`\n"
205    ":param D:\n:type D: `Data`\n"
206    ":param X:\n:type X: `Data`\n"
207    ":param Y:\n:type Y: `Data`\n"
208    ":param d:\n:type d: `Data`\n"
209    ":param y:\n:type y: `Data`\n"
210    ":param d_contact:\n:type d_contact: `Data`\n"
211    ":param y_contact:\n:type y_contact: `Data`\n"
212    )
213          .def("newOperator",&escript::AbstractContinuousDomain::newSystemMatrix,
214    args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
215    "creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros\n\n"
216    ":param row_blocksize:\n:type row_blocksize: ``int``\n"
217    ":param row_functionspace:\n:type row_functionspace: `FunctionSpace`\n"
218    ":param column_blocksize:\n:type column_blocksize: ``int``\n"
219    ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
220    ":param type:\n:type type: ``int``\n"
221    )
222          .def("newTransportProblem",&escript::AbstractContinuousDomain::newTransportProblem,
223    args("theta", "blocksize", "functionspace", "type"),
224    "creates a TransportProblemAdapter\n\n"
225    ":param theta:\n:type theta: ``float``\n"
226    ":param blocksize:\n:type blocksize: ``int``\n"
227    ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
228    ":param type:\n:type type: ``int``\n"
229    )
230          .def("getDataShape",&escript::AbstractContinuousDomain::getDataShape, args("functionSpaceCode"),
231    ":return: a pair (dps, ns) where dps=the number of data points per sample, and ns=the number of samples\n:rtype: ``tuple``")
232          .def("print_mesh_info",&escript::AbstractContinuousDomain::Print_Mesh_Info,(arg("full")=false),
233    ":param full:\n:type full: ``bool``")
234          .def("getDescription",&escript::AbstractContinuousDomain::getDescription,
235    ":return: a description for this domain\n:rtype: ``string``")
236          .def("setX",&escript::AbstractContinuousDomain::setNewX,
237    args("arg"), "assigns new location to the domain\n\n:param arg:\n:type arg: `Data`")
238          .def("getNumDataPointsGlobal",&escript::AbstractContinuousDomain::getNumDataPointsGlobal,
239    ":return: the number of data points summed across all MPI processes\n"
240    ":rtype: ``int``");
241    
242    
243    
244    
245    //    //
# Line 500  args("solver", "preconditioner", "packag Line 570  args("solver", "preconditioner", "packag
570    //    //
571    // Interface for AbstractSystemMatrix    // Interface for AbstractSystemMatrix
572    //    //
573    class_<escript::AbstractSystemMatrix>("Operator","",init<>())    // Doco goes in the empty string param    class_<escript::AbstractSystemMatrix,escript::ASM_ptr>("Operator","",init<>())    // Doco goes in the empty string param
574       .def("isEmpty",&escript::AbstractSystemMatrix::isEmpty,":rtype: ``bool``\n"       .def("isEmpty",&escript::AbstractSystemMatrix::isEmpty,":rtype: ``bool``\n"
575  ":return: True if matrix is empty")  ":return: True if matrix is empty")
576       .def("solve",&escript::AbstractSystemMatrix::solve, args("in","options"),       .def("solve",&escript::AbstractSystemMatrix::solve, args("in","options"),
# Line 516  args("solver", "preconditioner", "packag Line 586  args("solver", "preconditioner", "packag
586    //    //
587    // Interface for AbstractTransportProblem    // Interface for AbstractTransportProblem
588    //    //
589    class_<escript::AbstractTransportProblem>("TransportProblem","",init<>())    // Doco goes in the empty string param    class_<escript::AbstractTransportProblem, escript::ATP_ptr>("TransportProblem","",init<>())    // Doco goes in the empty string param
590       .def("isEmpty",&escript::AbstractTransportProblem::isEmpty,":rtype: ``int``")       .def("isEmpty",&escript::AbstractTransportProblem::isEmpty,":rtype: ``int``")
591       .def("solve",&escript::AbstractTransportProblem::solve, args("u0","source","dt", "options"),       .def("solve",&escript::AbstractTransportProblem::solve, args("u0","source","dt", "options"),
592  "returns the solution *u* for a time step *dt>0* with initial value u0\n\n:rtype: `Data`\n"  "returns the solution *u* for a time step *dt>0* with initial value u0\n\n:rtype: `Data`\n"

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26