/[escript]/trunk/finley/src/CPPAdapter/MeshAdapter.cpp
ViewVC logotype

Diff of /trunk/finley/src/CPPAdapter/MeshAdapter.cpp

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

revision 2881 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 2989 by gross, Thu Mar 18 01:45:55 2010 UTC
# Line 811  void  MeshAdapter::addPDEToLumpedSystem( Line 811  void  MeshAdapter::addPDEToLumpedSystem(
811     Finley_Mesh* mesh=m_finleyMesh.get();     Finley_Mesh* mesh=m_finleyMesh.get();
812    
813     Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->Elements,&_mat, &_D);     Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->Elements,&_mat, &_D);
814       checkFinleyError();
815      
816     Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->FaceElements,&_mat, &_d);     Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->FaceElements,&_mat, &_d);
   
817     checkFinleyError();     checkFinleyError();
818    
819  }  }
820    
821    
# Line 865  void MeshAdapter::addPDEToTransportProbl Line 867  void MeshAdapter::addPDEToTransportProbl
867     escriptDataC _y_contact=y_contact.getDataC();     escriptDataC _y_contact=y_contact.getDataC();
868    
869     Finley_Mesh* mesh=m_finleyMesh.get();     Finley_Mesh* mesh=m_finleyMesh.get();
870     Paso_FCTransportProblem* _tp = tp.getPaso_FCTransportProblem();     Paso_TransportProblem* _tp = tp.getPaso_TransportProblem();
871    
872     Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,_tp->mass_matrix, &_source, 0, 0, 0, &_M, 0, 0 );     Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,_tp->mass_matrix, &_source, 0, 0, 0, &_M, 0, 0 );
873     checkFinleyError();     checkFinleyError();
# Line 1638  SystemMatrixAdapter MeshAdapter::newSyst Line 1640  SystemMatrixAdapter MeshAdapter::newSyst
1640  // creates a TransportProblemAdapter  // creates a TransportProblemAdapter
1641  //  //
1642  TransportProblemAdapter MeshAdapter::newTransportProblem(  TransportProblemAdapter MeshAdapter::newTransportProblem(
1643                                                           const double theta,                                                           const bool useBackwardEuler,
1644                                                           const int blocksize,                                                           const int blocksize,
1645                                                           const escript::FunctionSpace& functionspace,                                                           const escript::FunctionSpace& functionspace,
1646                                                           const int type) const                                                           const int type) const
# Line 1660  TransportProblemAdapter MeshAdapter::new Line 1662  TransportProblemAdapter MeshAdapter::new
1662    
1663     Paso_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceOrder,reduceOrder);     Paso_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceOrder,reduceOrder);
1664     checkFinleyError();     checkFinleyError();
1665     Paso_FCTransportProblem* transportProblem;     Paso_TransportProblem* transportProblem;
1666     transportProblem=Paso_FCTransportProblem_alloc(theta,fsystemMatrixPattern,blocksize);     transportProblem=Paso_TransportProblem_alloc(useBackwardEuler,fsystemMatrixPattern,blocksize);
1667     checkPasoError();     checkPasoError();
1668     Paso_SystemMatrixPattern_free(fsystemMatrixPattern);     Paso_SystemMatrixPattern_free(fsystemMatrixPattern);
1669     return TransportProblemAdapter(transportProblem,theta,blocksize,functionspace);     return TransportProblemAdapter(transportProblem,useBackwardEuler,blocksize,functionspace);
1670  }  }
1671    
1672  //  //
# Line 1727  MeshAdapter::commonFunctionSpace(const v Line 1729  MeshAdapter::commonFunctionSpace(const v
1729     For classes with multiple members (eg class 2) we have vars to record if there is at least one instance.     For classes with multiple members (eg class 2) we have vars to record if there is at least one instance.
1730     eg hasnodes is true if we have at least one instance of Nodes.     eg hasnodes is true if we have at least one instance of Nodes.
1731     */     */
1732      if (fs.size()==0)      if (fs.empty())
1733      {      {
1734          return false;          return false;
1735      }      }
# Line 2030  int MeshAdapter::getSystemMatrixTypeId(c Line 2032  int MeshAdapter::getSystemMatrixTypeId(c
2032  int MeshAdapter::getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const  int MeshAdapter::getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const
2033  {  {
2034     Finley_Mesh* mesh=m_finleyMesh.get();     Finley_Mesh* mesh=m_finleyMesh.get();
2035     int out=Paso_FCTransportProblem_getTypeId(SystemMatrixAdapter::mapOptionToPaso(solver),SystemMatrixAdapter::mapOptionToPaso(preconditioner), SystemMatrixAdapter::mapOptionToPaso(package),symmetry?1:0, mesh->MPIInfo);     int out=Paso_TransportProblem_getTypeId(SystemMatrixAdapter::mapOptionToPaso(solver),SystemMatrixAdapter::mapOptionToPaso(preconditioner), SystemMatrixAdapter::mapOptionToPaso(package),symmetry?1:0, mesh->MPIInfo);
2036     checkPasoError();     checkPasoError();
2037     return out;     return out;
2038  }  }
# Line 2395  int MeshAdapter::getApproximationOrder(c Line 2397  int MeshAdapter::getApproximationOrder(c
2397    return order;    return order;
2398  }  }
2399    
2400    ReferenceElementSetWrapper::ReferenceElementSetWrapper(ElementTypeId id, index_t order, index_t reducedOrder)
2401    {
2402      m_refSet = Finley_ReferenceElementSet_alloc(id, order, reducedOrder);
2403    }
2404    
2405    ReferenceElementSetWrapper::~ReferenceElementSetWrapper()
2406    {
2407      Finley_ReferenceElementSet_dealloc(m_refSet);
2408    }
2409    
2410  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.2881  
changed lines
  Added in v.2989

  ViewVC Help
Powered by ViewVC 1.1.26