/[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 950 by gross, Tue Feb 6 07:01:11 2007 UTC revision 1137 by gross, Thu May 10 08:11:31 2007 UTC
# Line 77  BOOST_PYTHON_MODULE(escriptcpp) Line 77  BOOST_PYTHON_MODULE(escriptcpp)
77    // Interface for AbstractDomain    // Interface for AbstractDomain
78    //    //
79    class_<escript::AbstractDomain>("Domain",no_init)    class_<escript::AbstractDomain>("Domain",no_init)
80         .def("__str__",&escript::AbstractDomain::str)
81         .def("setTagMap",&escript::AbstractDomain::setTagMap)
82         .def("getTag",&escript::AbstractDomain::getTag)
83         .def("isValidTagName",&escript::AbstractDomain::isValidTagName)
84         .def("showTagNames",&escript::AbstractDomain::showTagNames)
85       .def("getX",&escript::AbstractDomain::getX)       .def("getX",&escript::AbstractDomain::getX)
86       .def("getNormal",&escript::AbstractDomain::getNormal)       .def("getNormal",&escript::AbstractDomain::getNormal)
87       .def("getSize",&escript::AbstractDomain::getSize)       .def("getSize",&escript::AbstractDomain::getSize)
# Line 102  BOOST_PYTHON_MODULE(escriptcpp) Line 107  BOOST_PYTHON_MODULE(escriptcpp)
107       .def("getSize",&escript::FunctionSpace::getSize)       .def("getSize",&escript::FunctionSpace::getSize)
108       .def("setTags",&escript::FunctionSpace::setTags)       .def("setTags",&escript::FunctionSpace::setTags)
109       .def("getTagFromDataPointNo",&escript::FunctionSpace::getTagFromDataPointNo)       .def("getTagFromDataPointNo",&escript::FunctionSpace::getTagFromDataPointNo)
110       .def("__str__",&escript::FunctionSpace::toString)       .def("__str__",&escript::FunctionSpace::str)
111       .def(self == self)       .def(self == self)
112       .def(self != self);       .def(self != self);
113    //    //
# Line 117  BOOST_PYTHON_MODULE(escriptcpp) Line 122  BOOST_PYTHON_MODULE(escriptcpp)
122      .def(init<const escript::Data&>())      .def(init<const escript::Data&>())
123      // Note for Lutz, Need to specify the call policy in order to return a      // Note for Lutz, Need to specify the call policy in order to return a
124      // reference. In this case return_internal_reference.      // reference. In this case return_internal_reference.
125      .def("__str__",&escript::Data::toString)      .def("__str__",&escript::Data::str)
126      .def("getDomain",&escript::Data::getDomain,return_internal_reference<>())      .def("getDomain",&escript::Data::getDomain,return_internal_reference<>())
127      .def("getFunctionSpace",&escript::Data::getFunctionSpace,return_internal_reference<>())      .def("getFunctionSpace",&escript::Data::getFunctionSpace,return_internal_reference<>())
128      .def("isEmpty",&escript::Data::isEmpty)      .def("isEmpty",&escript::Data::isEmpty)
# Line 128  BOOST_PYTHON_MODULE(escriptcpp) Line 133  BOOST_PYTHON_MODULE(escriptcpp)
133      .def("dump",&escript::Data::dump)      .def("dump",&escript::Data::dump)
134      .def("copyWithMask",&escript::Data::copyWithMask)      .def("copyWithMask",&escript::Data::copyWithMask)
135      .def("setTaggedValue",&escript::Data::setTaggedValue)      .def("setTaggedValue",&escript::Data::setTaggedValue)
136      .def("setValueByReferenceNumber",&escript::Data::setValueByReferenceNumber)      .def("setTaggedValue",&escript::Data::setTaggedValueByName)
     .def("getValueByReferenceNumber",&escript::Data::getValueByReferenceNumber)  
137      .def("getNumberOfDataPoints",&escript::Data::getNumDataPoints)      .def("getNumberOfDataPoints",&escript::Data::getNumDataPoints)
138      .def("expand",&escript::Data::expand)      .def("expand",&escript::Data::expand)
139      .def("tag",&escript::Data::tag)      .def("tag",&escript::Data::tag)
140      .def("copy",&escript::Data::copy)      .def("copy",&escript::Data::copy)
141      .def("convertToNumArray",&escript::Data::convertToNumArray)      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToPyObject)
     .def("fillFromNumArray",&escript::Data::fillFromNumArray)  
     .def("setValueOfDataPoint",&escript::Data::setValueOfDataPoint)  
142      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToArray)      .def("setValueOfDataPoint",&escript::Data::setValueOfDataPointToArray)
143        .def("setValueOfDataPoint",&escript::Data::setValueOfDataPoint)
144      .def("getValueOfDataPoint",&escript::Data::getValueOfDataPoint)      .def("getValueOfDataPoint",&escript::Data::getValueOfDataPoint)
145      .def("getValueOfGlobalDataPoint",&escript::Data::getValueOfGlobalDataPoint)      .def("getValueOfGlobalDataPoint",&escript::Data::getValueOfGlobalDataPoint)
146        .def("setToZero",&escript::Data::setToZero)
147      .def("interpolate",&escript::Data::interpolate)      .def("interpolate",&escript::Data::interpolate)
148      .def("minGlobalDataPoint",&escript::Data::minGlobalDataPoint)      .def("minGlobalDataPoint",&escript::Data::minGlobalDataPoint)
149      .def("saveDX",&escript::Data::saveDX)      .def("saveDX",&escript::Data::saveDX)
# Line 239  BOOST_PYTHON_MODULE(escriptcpp) Line 243  BOOST_PYTHON_MODULE(escriptcpp)
243    // Factory methods for function space    // Factory methods for function space
244    //    //
245    def("ContinuousFunction",escript::continuousFunction);    def("ContinuousFunction",escript::continuousFunction);
246      def("ReducedContinuousFunction",escript::reducedContinuousFunction);
247    def("Function",escript::function);    def("Function",escript::function);
248      def("ReducedFunction",escript::reducedFunction);
249    def("FunctionOnBoundary",escript::functionOnBoundary);    def("FunctionOnBoundary",escript::functionOnBoundary);
250      def("ReducedFunctionOnBoundary",escript::reducedFunctionOnBoundary);
251    def("FunctionOnContactZero",escript::functionOnContactZero);    def("FunctionOnContactZero",escript::functionOnContactZero);
252      def("ReducedFunctionOnContactZero",escript::reducedFunctionOnContactZero);
253    def("FunctionOnContactOne",escript::functionOnContactOne);    def("FunctionOnContactOne",escript::functionOnContactOne);
254      def("ReducedFunctionOnContactOne",escript::reducedFunctionOnContactOne);
255    def("Solution",escript::solution);    def("Solution",escript::solution);
256    def("ReducedSolution",escript::reducedSolution);    def("ReducedSolution",escript::reducedSolution);
257    def("DiracDeltaFunction",escript::diracDeltaFunction);    def("DiracDeltaFunction",escript::diracDeltaFunction);
# Line 251  BOOST_PYTHON_MODULE(escriptcpp) Line 260  BOOST_PYTHON_MODULE(escriptcpp)
260    // Factory methods for Data    // Factory methods for Data
261    //    //
262    def("load",escript::load);    def("load",escript::load);
263      def("loadIsConfigured",escript::loadConfigured);
264    def("Scalar",escript::Scalar,    def("Scalar",escript::Scalar,
265        (arg("value")=0.0,        (arg("value")=0.0,
266         arg("what")=escript::FunctionSpace(),         arg("what")=escript::FunctionSpace(),

Legend:
Removed from v.950  
changed lines
  Added in v.1137

  ViewVC Help
Powered by ViewVC 1.1.26