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

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

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

revision 1384 by ksteube, Thu Dec 13 05:05:00 2007 UTC revision 1385 by trankine, Fri Jan 11 07:33:30 2008 UTC
# Line 21  Line 21 
21  #endif  #endif
22  #include "MeshAdapterFactory.h"  #include "MeshAdapterFactory.h"
23  #include "FinleyError.h"  #include "FinleyError.h"
 extern "C" {  
 #include "escript/blocktimer.h"  
 }  
24    
25  #include <boost/python/extract.hpp>  #include <boost/python/extract.hpp>
26    
# Line 59  namespace finley { Line 56  namespace finley {
56      char error_msg[LenErrorMsg_MAX];      char error_msg[LenErrorMsg_MAX];
57      char *fName = Paso_MPI_appendRankToFileName(strdup(fileName.c_str()), mpi_info->size, mpi_info->rank);      char *fName = Paso_MPI_appendRankToFileName(strdup(fileName.c_str()), mpi_info->size, mpi_info->rank);
58    
     double blocktimer_start = blocktimer_time();  
59      Finley_resetError();      Finley_resetError();
60    
61      // Open NetCDF file for reading      // Open NetCDF file for reading
# Line 454  namespace finley { Line 450  namespace finley {
450      /* win32 refactor */      /* win32 refactor */
451      TMPMEMFREE(fName);      TMPMEMFREE(fName);
452    
     blocktimer_increment("LoadMesh()", blocktimer_start);  
453      return temp;      return temp;
454  #else  #else
455      throw DataException("Error - loadMesh: is not compiled with NetCFD. Please contact your installation manager.");      throw DataException("Error - loadMesh: is not compiled with NetCFD. Please contact your installation manager.");
# Line 473  namespace finley { Line 468  namespace finley {
468      // Win32 refactor      // Win32 refactor
469      char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;      char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;
470      strcpy(fName,fileName.c_str());      strcpy(fName,fileName.c_str());
     double blocktimer_start = blocktimer_time();  
471    
472      fMesh=Finley_Mesh_read(fName,integrationOrder, reducedIntegrationOrder, (optimize ? TRUE : FALSE));      fMesh=Finley_Mesh_read(fName,integrationOrder, reducedIntegrationOrder, (optimize ? TRUE : FALSE));
473      checkFinleyError();      checkFinleyError();
# Line 482  namespace finley { Line 476  namespace finley {
476      /* win32 refactor */      /* win32 refactor */
477      TMPMEMFREE(fName);      TMPMEMFREE(fName);
478            
     blocktimer_increment("ReadMesh()", blocktimer_start);  
479      return temp;      return temp;
480    }    }
481    
# Line 498  namespace finley { Line 491  namespace finley {
491      // Win32 refactor      // Win32 refactor
492      char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;      char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;
493      strcpy(fName,fileName.c_str());      strcpy(fName,fileName.c_str());
494      double blocktimer_start = blocktimer_time();      //double blocktimer_start = blocktimer_time();
495    
496      fMesh=Finley_Mesh_read_MPI(fName,integrationOrder, reducedIntegrationOrder, (optimize ? TRUE : FALSE));      fMesh=Finley_Mesh_read_MPI(fName,integrationOrder, reducedIntegrationOrder, (optimize ? TRUE : FALSE));
497      checkFinleyError();      checkFinleyError();
# Line 507  namespace finley { Line 500  namespace finley {
500      /* win32 refactor */      /* win32 refactor */
501      TMPMEMFREE(fName);      TMPMEMFREE(fName);
502            
503      blocktimer_increment("ReadMesh()", blocktimer_start);      //blocktimer_increment("ReadMesh()", blocktimer_start);
504      return temp;      return temp;
505    }    }
506    
# Line 524  namespace finley { Line 517  namespace finley {
517      // Win32 refactor      // Win32 refactor
518      char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;      char *fName = ((fileName.size()+1)>0) ? TMPMEMALLOC((fileName.size()+1),char) : (char*)NULL;
519      strcpy(fName,fileName.c_str());      strcpy(fName,fileName.c_str());
     double blocktimer_start = blocktimer_time();  
520    
521      fMesh=Finley_Mesh_readGmsh(fName, numDim, integrationOrder, reducedIntegrationOrder, (optimize ? TRUE : FALSE));      fMesh=Finley_Mesh_readGmsh(fName, numDim, integrationOrder, reducedIntegrationOrder, (optimize ? TRUE : FALSE));
522      checkFinleyError();      checkFinleyError();
# Line 533  namespace finley { Line 525  namespace finley {
525      /* win32 refactor */      /* win32 refactor */
526      TMPMEMFREE(fName);      TMPMEMFREE(fName);
527            
     blocktimer_increment("ReadGmsh()", blocktimer_start);  
528      return temp;      return temp;
529    }    }
530    

Legend:
Removed from v.1384  
changed lines
  Added in v.1385

  ViewVC Help
Powered by ViewVC 1.1.26