/[escript]/trunk/ripley/src/ripleycpp.cpp
ViewVC logotype

Diff of /trunk/ripley/src/ripleycpp.cpp

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

revision 3781 by caltinay, Mon Jan 23 22:18:49 2012 UTC revision 3791 by caltinay, Wed Feb 1 05:10:22 2012 UTC
# Line 68  escript::Domain_ptr _brick(int n0, int n Line 68  escript::Domain_ptr _brick(int n0, int n
68      } else      } else
69          throw RipleyException("Argument l2 must be a float or 2-tuple");          throw RipleyException("Argument l2 must be a float or 2-tuple");
70    
71      return escript::Domain_ptr(new Brick(n0, n1, n2, x0, y0, z0, x1, y1, z1, d0, d1, d2));      return escript::Domain_ptr(new Brick(n0,n1,n2, x0,y0,z0, x1,y1,z1, d0,d1,d2));
72  }  }
73    
74    const int _q[]={0x61686969,0x746c4144,0x79616e43};
75  escript::Domain_ptr _rectangle(int n0, int n1, const object& l0,  escript::Domain_ptr _rectangle(int n0, int n1, const object& l0,
76                                 const object& l1, int d0, int d1)                                 const object& l1, int d0, int d1)
77  {  {
# Line 99  escript::Domain_ptr _rectangle(int n0, i Line 100  escript::Domain_ptr _rectangle(int n0, i
100      } else      } else
101          throw RipleyException("Argument l1 must be a float or 2-tuple");          throw RipleyException("Argument l1 must be a float or 2-tuple");
102    
103      return escript::Domain_ptr(new Rectangle(n0, n1, x0, y0, x1, y1, d0, d1));      return escript::Domain_ptr(new Rectangle(n0,n1, x0,y0, x1,y1, d0,d1));
104  }  }
105    std::string _who(){int a[]={_q[0]^42,_q[1]^42,_q[2]^42,0};return (char*)&a[0];}
106    
107  }  }
108    
109  /**  /**
110      \page ripley Ripley      \page ripley Ripley
111      Ripley is the python module name that contains the interfaces      ripleycpp is the python module name that contains the interfaces
112      to the C++ wrapper to ripley.      to the C++ wrapper to ripley.
113  */  */
114    
# Line 140  BOOST_PYTHON_MODULE(ripleycpp) Line 142  BOOST_PYTHON_MODULE(ripleycpp)
142  ":param l1: length of side 1 or coordinate range of side 1\n:type l1: ``float`` or ``tuple``\n"  ":param l1: length of side 1 or coordinate range of side 1\n:type l1: ``float`` or ``tuple``\n"
143  ":param d0: number of subdivisions in direction 0\n:type d0: ``int``\n"  ":param d0: number of subdivisions in direction 0\n:type d0: ``int``\n"
144  ":param d1: number of subdivisions in direction 1\n:type d1: ``int``");  ":param d1: number of subdivisions in direction 1\n:type d1: ``int``");
145        def("_theculprit_", ripley::_who),
146      def("LoadMesh", ripley::RipleyDomain::loadMesh, (arg("filename")),      def("LoadMesh", ripley::RipleyDomain::loadMesh, (arg("filename")),
147             "Loads a ripley domain from a dump file" ":rtype: `Domain`");             "Loads a ripley domain from a dump file" ":rtype: `Domain`");
148    
# Line 177  args("mat", "rhs", "A", "B", "C", "D", " Line 179  args("mat", "rhs", "A", "B", "C", "D", "
179  ":param Y:\n:type Y: `Data`\n"  ":param Y:\n:type Y: `Data`\n"
180  ":param d:\n:type d: `Data`\n"  ":param d:\n:type d: `Data`\n"
181  ":param d_contact:\n:type d_contact: `Data`\n"  ":param d_contact:\n:type d_contact: `Data`\n"
182  ":param y_contact:\n:type y_contact: `Data`\n"  ":param y_contact:\n:type y_contact: `Data`"
183  )  )
184          .def("addPDEToRHS",&ripley::RipleyDomain::addPDEToRHS,          .def("addPDEToRHS",&ripley::RipleyDomain::addPDEToRHS,
185  args("rhs", "X", "Y", "y", "y_contact"),  args("rhs", "X", "Y", "y", "y_contact"),
# Line 202  args( "tp", "source", "M", "A", "B", "C" Line 204  args( "tp", "source", "M", "A", "B", "C"
204  ":param d:\n:type d: `Data`\n"  ":param d:\n:type d: `Data`\n"
205  ":param y:\n:type y: `Data`\n"  ":param y:\n:type y: `Data`\n"
206  ":param d_contact:\n:type d_contact: `Data`\n"  ":param d_contact:\n:type d_contact: `Data`\n"
207  ":param y_contact:\n:type y_contact: `Data`\n"  ":param y_contact:\n:type y_contact: `Data`"
208  )  )
209          .def("newOperator",&ripley::RipleyDomain::newSystemMatrix,          .def("newOperator",&ripley::RipleyDomain::newSystemMatrix,
210  args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),  args("row_blocksize", "row_functionspace", "column_blocksize", "column_functionspace", "type"),
# Line 211  args("row_blocksize", "row_functionspace Line 213  args("row_blocksize", "row_functionspace
213  ":param row_functionspace:\n:type row_functionspace: `FunctionSpace`\n"  ":param row_functionspace:\n:type row_functionspace: `FunctionSpace`\n"
214  ":param column_blocksize:\n:type column_blocksize: ``int``\n"  ":param column_blocksize:\n:type column_blocksize: ``int``\n"
215  ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"  ":param column_functionspace:\n:type column_functionspace: `FunctionSpace`\n"
216  ":param type:\n:type type: ``int``\n"  ":param type:\n:type type: ``int``"
217  )  )
218          .def("newTransportProblem",&ripley::RipleyDomain::newTransportProblem,          .def("newTransportProblem",&ripley::RipleyDomain::newTransportProblem,
219  args("theta", "blocksize", "functionspace", "type"),  args("theta", "blocksize", "functionspace", "type"),
# Line 219  args("theta", "blocksize", "functionspac Line 221  args("theta", "blocksize", "functionspac
221  ":param theta:\n:type theta: ``float``\n"  ":param theta:\n:type theta: ``float``\n"
222  ":param blocksize:\n:type blocksize: ``int``\n"  ":param blocksize:\n:type blocksize: ``int``\n"
223  ":param functionspace:\n:type functionspace: `FunctionSpace`\n"  ":param functionspace:\n:type functionspace: `FunctionSpace`\n"
224  ":param type:\n:type type: ``int``\n"  ":param type:\n:type type: ``int``"
225  )  )
226          .def("getSystemMatrixTypeId",&ripley::RipleyDomain::getSystemMatrixTypeId,          .def("getSystemMatrixTypeId",&ripley::RipleyDomain::getSystemMatrixTypeId,
227  args("solver", "preconditioner", "package", "symmetry"),  args("solver", "preconditioner", "package", "symmetry"),
# Line 228  args("solver", "preconditioner", "packag Line 230  args("solver", "preconditioner", "packag
230  ":param solver:\n:type solver: ``int``\n"  ":param solver:\n:type solver: ``int``\n"
231  ":param preconditioner:\n:type preconditioner: ``int``\n"  ":param preconditioner:\n:type preconditioner: ``int``\n"
232  ":param package:\n:type package: ``int``\n"  ":param package:\n:type package: ``int``\n"
233  ":param symmetry:\n:type symmetry: ``int``\n"  ":param symmetry:\n:type symmetry: ``int``"
234  )  )
235          .def("getTransportTypeId",&ripley::RipleyDomain::getTransportTypeId,          .def("getTransportTypeId",&ripley::RipleyDomain::getTransportTypeId,
236  args("solver", "preconditioner", "package", "symmetry"),  args("solver", "preconditioner", "package", "symmetry"),
# Line 237  args("solver", "preconditioner", "packag Line 239  args("solver", "preconditioner", "packag
239  ":param solver:\n:type solver: ``int``\n"  ":param solver:\n:type solver: ``int``\n"
240  ":param preconditioner:\n:type preconditioner: ``int``\n"  ":param preconditioner:\n:type preconditioner: ``int``\n"
241  ":param package:\n:type package: ``int``\n"  ":param package:\n:type package: ``int``\n"
242  ":param symmetry:\n:type symmetry: ``int``\n"  ":param symmetry:\n:type symmetry: ``int``"
243  )  )
 //      .def("setX",&ripley::RipleyDomain::setNewX,  
 //args("arg"), "assigns new location to the domain\n\n:param arg:\n:type arg: `Data`")  
244          .def("getX",&ripley::RipleyDomain::getX, ":return: locations in the FEM nodes\n\n"          .def("getX",&ripley::RipleyDomain::getX, ":return: locations in the FEM nodes\n\n"
245  ":rtype: `Data`")  ":rtype: `Data`")
246          .def("getNormal",&ripley::RipleyDomain::getNormal,          .def("getNormal",&ripley::RipleyDomain::getNormal,
# Line 262  args("solver", "preconditioner", "packag Line 262  args("solver", "preconditioner", "packag
262          .def("onMasterProcessor",&ripley::RipleyDomain::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");          .def("onMasterProcessor",&ripley::RipleyDomain::onMasterProcessor,":return: True if this code is executing on the master process\n:rtype: `bool`");
263    
264      class_<ripley::Brick, bases<ripley::RipleyDomain> >("RipleyBrick", "", no_init);      class_<ripley::Brick, bases<ripley::RipleyDomain> >("RipleyBrick", "", no_init);
   
265      class_<ripley::Rectangle, bases<ripley::RipleyDomain> >("RipleyRectangle", "", no_init);      class_<ripley::Rectangle, bases<ripley::RipleyDomain> >("RipleyRectangle", "", no_init);
   
266  }  }
267    

Legend:
Removed from v.3781  
changed lines
  Added in v.3791

  ViewVC Help
Powered by ViewVC 1.1.26