/[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 2842 by caltinay, Thu Jan 14 05:42:02 2010 UTC revision 2898 by caltinay, Mon Feb 1 01:23:46 2010 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2009 by University of Queensland  * Copyright (c) 2003-2010 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 220  void MeshAdapter::dump(const string& fil Line 220  void MeshAdapter::dump(const string& fil
220        throw DataException(msgPrefix+"add_att(Name)");        throw DataException(msgPrefix+"add_att(Name)");
221     if (!dataFile.add_att("numDim",numDim) )     if (!dataFile.add_att("numDim",numDim) )
222        throw DataException(msgPrefix+"add_att(order)");        throw DataException(msgPrefix+"add_att(order)");
223     if (!dataFile.add_att("order",mesh->order) )     if (!dataFile.add_att("order",mesh->integrationOrder) )
224        throw DataException(msgPrefix+"add_att(order)");        throw DataException(msgPrefix+"add_att(order)");
225     if (!dataFile.add_att("reduced_order",mesh->reduced_order) )     if (!dataFile.add_att("reduced_order",mesh->reducedIntegrationOrder) )
226        throw DataException(msgPrefix+"add_att(reduced_order)");        throw DataException(msgPrefix+"add_att(reduced_order)");
227     if (!dataFile.add_att("numNodes",numNodes) )     if (!dataFile.add_att("numNodes",numNodes) )
228        throw DataException(msgPrefix+"add_att(numNodes)");        throw DataException(msgPrefix+"add_att(numNodes)");
# Line 2360  AbstractDomain::StatusType MeshAdapter:: Line 2360  AbstractDomain::StatusType MeshAdapter::
2360    return Finley_Mesh_getStatus(mesh);    return Finley_Mesh_getStatus(mesh);
2361  }  }
2362    
2363    int MeshAdapter::getApproximationOrder(const int functionSpaceCode) const
2364    {
2365      
2366      Finley_Mesh* mesh=m_finleyMesh.get();
2367      int order =-1;
2368      switch(functionSpaceCode) {
2369       case(Nodes):
2370       case(DegreesOfFreedom):
2371              order=mesh->approximationOrder;
2372              break;
2373       case(ReducedNodes):
2374       case(ReducedDegreesOfFreedom):
2375              order=mesh->reducedApproximationOrder;
2376              break;
2377       case(Elements):
2378       case(FaceElements):
2379       case(Points):
2380       case(ContactElementsZero):
2381       case(ContactElementsOne):
2382              order=mesh->integrationOrder;
2383              break;
2384       case(ReducedElements):
2385       case(ReducedFaceElements):
2386       case(ReducedContactElementsZero):
2387       case(ReducedContactElementsOne):
2388              order=mesh->reducedIntegrationOrder;
2389              break;
2390       default:
2391          stringstream temp;
2392          temp << "Error - Finley does not know anything about function space type " << functionSpaceCode;
2393          throw FinleyAdapterException(temp.str());
2394      }
2395      return order;
2396    }
2397    
2398    ReferenceElementSetWrapper::ReferenceElementSetWrapper(ElementTypeId id, index_t order, index_t reducedOrder)
2399    {
2400      m_refSet = Finley_ReferenceElementSet_alloc(id, order, reducedOrder);
2401    }
2402    
2403    ReferenceElementSetWrapper::~ReferenceElementSetWrapper()
2404    {
2405      Finley_ReferenceElementSet_dealloc(m_refSet);
2406    }
2407    
2408  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.2842  
changed lines
  Added in v.2898

  ViewVC Help
Powered by ViewVC 1.1.26