Loading src/implementation/core/tnlSharedVector_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ template< typename Real, typename Index > tnlString tnlSharedVector< Real, Device, Index > :: getType() const { return tnlString( "tnlSharedVector< " ) + ", " + return tnlString( "tnlSharedVector< " ) + getParameterType< Real >() + ", " + Device :: getDeviceType() + ", " + getParameterType< Index >() + " >"; Loading src/implementation/mesh/tnlGrid2D_impl.h +0 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ template< typename Real, typename Index > tnlString tnlGrid< 2, Real, Device, Index> :: getType() const { cerr << "################" << endl; return this -> getTypeStatic(); } Loading tools/src/tnl-view.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -47,5 +47,11 @@ int main( int argc, char* argv[] ) return EXIT_FAILURE; } cout << meshType << " detected in " << meshFile << " file." << endl; if( meshType == "tnlGrid< 2, double, tnlHost, int >" ) { if( ! processMesh< tnlGrid< 2, double, tnlHost, int > >( parameters ) ) return EXIT_FAILURE; return EXIT_SUCCESS; } return EXIT_FAILURE; } tools/src/tnl-view.h +35 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,42 @@ #ifndef TNL_VIEW_H_ #define TNL_VIEW_H_ #include <config/tnlParameterContainer.h> #include <mesh/tnlGrid.h> template< typename Mesh > bool processMesh( const tnlParameterContainer& parameters ) { int verbose = parameters. GetParameter< int >( "verbose"); tnlString meshFile = parameters. GetParameter< tnlString >( "mesh" ); Mesh mesh; if( ! mesh. load( meshFile ) ) { cerr << "I am not able to load mesh from the file " << meshFile << "." << endl; return false; } tnlList< tnlString > inputFiles = parameters. GetParameter< tnlList< tnlString > >( "input-files" ); for( int i = 0; i < inputFiles. getSize(); i ++ ) { if( verbose ) cout << "Processing file " << inputFiles[ i ] << " ... " << flush; tnlString objectType; if( ! getObjectType( inputFiles[ i ], objectType ) ) cerr << "unknown object ... SKIPPING!" << endl; else { if( verbose ) cout << objectType << " detected ... "; } if( verbose ) cout << endl; } } #endif /* TNL_VIEW_H_ */ Loading
src/implementation/core/tnlSharedVector_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ template< typename Real, typename Index > tnlString tnlSharedVector< Real, Device, Index > :: getType() const { return tnlString( "tnlSharedVector< " ) + ", " + return tnlString( "tnlSharedVector< " ) + getParameterType< Real >() + ", " + Device :: getDeviceType() + ", " + getParameterType< Index >() + " >"; Loading
src/implementation/mesh/tnlGrid2D_impl.h +0 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,6 @@ template< typename Real, typename Index > tnlString tnlGrid< 2, Real, Device, Index> :: getType() const { cerr << "################" << endl; return this -> getTypeStatic(); } Loading
tools/src/tnl-view.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -47,5 +47,11 @@ int main( int argc, char* argv[] ) return EXIT_FAILURE; } cout << meshType << " detected in " << meshFile << " file." << endl; if( meshType == "tnlGrid< 2, double, tnlHost, int >" ) { if( ! processMesh< tnlGrid< 2, double, tnlHost, int > >( parameters ) ) return EXIT_FAILURE; return EXIT_SUCCESS; } return EXIT_FAILURE; }
tools/src/tnl-view.h +35 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,42 @@ #ifndef TNL_VIEW_H_ #define TNL_VIEW_H_ #include <config/tnlParameterContainer.h> #include <mesh/tnlGrid.h> template< typename Mesh > bool processMesh( const tnlParameterContainer& parameters ) { int verbose = parameters. GetParameter< int >( "verbose"); tnlString meshFile = parameters. GetParameter< tnlString >( "mesh" ); Mesh mesh; if( ! mesh. load( meshFile ) ) { cerr << "I am not able to load mesh from the file " << meshFile << "." << endl; return false; } tnlList< tnlString > inputFiles = parameters. GetParameter< tnlList< tnlString > >( "input-files" ); for( int i = 0; i < inputFiles. getSize(); i ++ ) { if( verbose ) cout << "Processing file " << inputFiles[ i ] << " ... " << flush; tnlString objectType; if( ! getObjectType( inputFiles[ i ], objectType ) ) cerr << "unknown object ... SKIPPING!" << endl; else { if( verbose ) cout << objectType << " detected ... "; } if( verbose ) cout << endl; } } #endif /* TNL_VIEW_H_ */