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

revision 1754 by ksteube, Sun Sep 7 22:07:26 2008 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  #ifdef PASO_MPI  #ifdef PASO_MPI
16  #include <mpi.h>  #include <mpi.h>
17    #include "paso/Paso_MPI.h"
18  #endif  #endif
19  extern "C" {  extern "C" {
20  #include "../Finley.h"  #include "../Finley.h"
# Line 86  BOOST_PYTHON_MODULE(finleycpp) Line 86  BOOST_PYTHON_MODULE(finleycpp)
86    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));    register_exception_translator<finley::FinleyAdapterException>(&(esysUtils::esysExceptionTranslator));
87    
88    def("LoadMesh",finley::loadMesh,    def("LoadMesh",finley::loadMesh,
89        (arg("fileName")="file.nc"),        (arg("fileName")="file.nc")
90        return_value_policy<manage_new_object>());  /*      ,return_value_policy<manage_new_object>());*/
91          );
92    
93    def("ReadMesh",finley::readMesh,    def("ReadMesh",finley::readMesh,
94        (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)
95        return_value_policy<manage_new_object>());  /*      ,return_value_policy<manage_new_object>());*/
96    def("ReadMeshMPI",finley::readMeshMPI,      );
       (arg("fileName")="file.fly",arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,  arg("optimize")=true),  
       return_value_policy<manage_new_object>());  
97    
98    def("ReadGmsh",finley::readGmsh,    def("ReadGmsh",finley::readGmsh,
99        (arg("fileName")="file.msh",arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimize")=true),        (arg("fileName")="file.msh",arg("numDim"), arg("integrationOrder")=-1, arg("reducedIntegrationOrder")=-1, arg("optimize")=true)
100        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
101        );
102    
103    def ("Brick",finley::brick,    def ("Brick",finley::brick,
104        (arg("n0")=1,arg("n1")=1,arg("n2")=1,        (arg("n0")=1,arg("n1")=1,arg("n2")=1,
# Line 107  BOOST_PYTHON_MODULE(finleycpp) Line 108  BOOST_PYTHON_MODULE(finleycpp)
108        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,
109        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
110        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
111        arg("optimize")=false),        arg("optimize")=false)
112        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
113        );
114    
115    def ("Rectangle",finley::rectangle,    def ("Rectangle",finley::rectangle,
116        (arg("n0")=1,arg("n1")=1,arg("order")=1,        (arg("n0")=1,arg("n1")=1,arg("order")=1,
# Line 117  BOOST_PYTHON_MODULE(finleycpp) Line 119  BOOST_PYTHON_MODULE(finleycpp)
119        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,        arg("integrationOrder")=-1,  arg("reducedIntegrationOrder")=-1,
120        arg("useElementsOnFace")=false,        arg("useElementsOnFace")=false,
121        arg("useFullElementOrder")=false,        arg("useFullElementOrder")=false,
122        arg("optimize")=false),        arg("optimize")=false)
123        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
124        );
125    def("Merge",finley::meshMerge,  
126        return_value_policy<manage_new_object>());    def("Merge",finley::meshMerge
127    //       ,return_value_policy<manage_new_object>());
128      );
129    
130    def("GlueFaces",finley::glueFaces,    def("GlueFaces",finley::glueFaces,
131        (arg("safetyFactor")=0.2,        (arg("safetyFactor")=0.2,
132        arg("tolerance")=1.e-8,        arg("tolerance")=1.e-8,
133        arg("optimize")=true),        arg("optimize")=true)
134        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
135        );
136    
137    def("JoinFaces",finley::joinFaces,    def("JoinFaces",finley::joinFaces,
138        (arg("safetyFactor")=0.2,        (arg("safetyFactor")=0.2,
139        arg("tolerance")=1.e-8,        arg("tolerance")=1.e-8,
140        arg("optimize")=true),        arg("optimize")=true)
141        return_value_policy<manage_new_object>());  //       ,return_value_policy<manage_new_object>());
142        );
143    
144    
145    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >    class_<finley::MeshAdapter, bases<escript::AbstractContinuousDomain> >
# Line 154  BOOST_PYTHON_MODULE(finleycpp) Line 159  BOOST_PYTHON_MODULE(finleycpp)
159        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)        .def("newOperator",&finley::MeshAdapter::newSystemMatrix)
160        .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem)        .def("newTransportProblem",&finley::MeshAdapter::newTransportProblem)
161        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)        .def("getSystemMatrixTypeId",&finley::MeshAdapter::getSystemMatrixTypeId)
162          .def("getTransportTypeId",&finley::MeshAdapter::getTransportTypeId)
163        .def("setX",&finley::MeshAdapter::setNewX)        .def("setX",&finley::MeshAdapter::setNewX)
164        .def("getX",&finley::MeshAdapter::getX)        .def("getX",&finley::MeshAdapter::getX)
165        .def("getNormal",&finley::MeshAdapter::getNormal)        .def("getNormal",&finley::MeshAdapter::getNormal)
# Line 178  BOOST_PYTHON_MODULE(finleycpp) Line 184  BOOST_PYTHON_MODULE(finleycpp)
184    class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >    class_<finley::TransportProblemAdapter, bases<escript::AbstractTransportProblem> >
185        ("TransportProblemAdapter",no_init)        ("TransportProblemAdapter",no_init)
186        .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)        .def("getSafeTimeStepSize",&finley::TransportProblemAdapter::getSafeTimeStepSize)
187          .def("getUnlimitedTimeStepSize",&finley::TransportProblemAdapter::getUnlimitedTimeStepSize)
188        .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);        .def("resetTransport",&finley::TransportProblemAdapter::resetTransport);
189  }  }

Legend:
Removed from v.1754  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26