--- trunk/finley/src/CPPAdapter/MeshAdapter.cpp 2010/01/18 04:14:37 2856 +++ trunk/finley/src/CPPAdapter/MeshAdapter.cpp 2010/03/18 01:45:55 2989 @@ -1,7 +1,7 @@ /******************************************************* * -* Copyright (c) 2003-2009 by University of Queensland +* Copyright (c) 2003-2010 by University of Queensland * Earth Systems Science Computational Center (ESSCC) * http://www.uq.edu.au/esscc * @@ -811,9 +811,11 @@ Finley_Mesh* mesh=m_finleyMesh.get(); Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->Elements,&_mat, &_D); + checkFinleyError(); + Finley_Assemble_LumpedSystem(mesh->Nodes,mesh->FaceElements,&_mat, &_d); - checkFinleyError(); + } @@ -865,7 +867,7 @@ escriptDataC _y_contact=y_contact.getDataC(); Finley_Mesh* mesh=m_finleyMesh.get(); - Paso_FCTransportProblem* _tp = tp.getPaso_FCTransportProblem(); + Paso_TransportProblem* _tp = tp.getPaso_TransportProblem(); Finley_Assemble_PDE(mesh->Nodes,mesh->Elements,_tp->mass_matrix, &_source, 0, 0, 0, &_M, 0, 0 ); checkFinleyError(); @@ -1638,7 +1640,7 @@ // creates a TransportProblemAdapter // TransportProblemAdapter MeshAdapter::newTransportProblem( - const double theta, + const bool useBackwardEuler, const int blocksize, const escript::FunctionSpace& functionspace, const int type) const @@ -1660,11 +1662,11 @@ Paso_SystemMatrixPattern* fsystemMatrixPattern=Finley_getPattern(getFinley_Mesh(),reduceOrder,reduceOrder); checkFinleyError(); - Paso_FCTransportProblem* transportProblem; - transportProblem=Paso_FCTransportProblem_alloc(theta,fsystemMatrixPattern,blocksize); + Paso_TransportProblem* transportProblem; + transportProblem=Paso_TransportProblem_alloc(useBackwardEuler,fsystemMatrixPattern,blocksize); checkPasoError(); Paso_SystemMatrixPattern_free(fsystemMatrixPattern); - return TransportProblemAdapter(transportProblem,theta,blocksize,functionspace); + return TransportProblemAdapter(transportProblem,useBackwardEuler,blocksize,functionspace); } // @@ -1727,7 +1729,7 @@ For classes with multiple members (eg class 2) we have vars to record if there is at least one instance. eg hasnodes is true if we have at least one instance of Nodes. */ - if (fs.size()==0) + if (fs.empty()) { return false; } @@ -2030,7 +2032,7 @@ int MeshAdapter::getTransportTypeId(const int solver, const int preconditioner, const int package, const bool symmetry) const { Finley_Mesh* mesh=m_finleyMesh.get(); - 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); checkPasoError(); return out; } @@ -2395,4 +2397,14 @@ return order; } +ReferenceElementSetWrapper::ReferenceElementSetWrapper(ElementTypeId id, index_t order, index_t reducedOrder) +{ + m_refSet = Finley_ReferenceElementSet_alloc(id, order, reducedOrder); +} + +ReferenceElementSetWrapper::~ReferenceElementSetWrapper() +{ + Finley_ReferenceElementSet_dealloc(m_refSet); +} + } // end of namespace