diff --git a/src/TNL/Config/ConfigEntryBase.h b/src/TNL/Config/ConfigEntryBase.h index 8f405213ff997b25d44501fbe8cf352ff1becff3..f69729ef5aaaa0d8120307eecfc8608d12742dfc 100644 --- a/src/TNL/Config/ConfigEntryBase.h +++ b/src/TNL/Config/ConfigEntryBase.h @@ -41,7 +41,9 @@ struct ConfigEntryBase virtual bool hasEnumValues() const { return false; }; - virtual void printEnumValues() const{}; + virtual void printEnumValues() const {}; + + virtual ~ConfigEntryBase() {}; }; } // namespace Config diff --git a/src/TNL/Containers/ArrayOperationsCuda_impl.h b/src/TNL/Containers/ArrayOperationsCuda_impl.h index 64948f4893f2aee4d9268eed905e4ae67adab893..61839e55d2c753cbd91cf9f8c916cea16dd9cf6e 100644 --- a/src/TNL/Containers/ArrayOperationsCuda_impl.h +++ b/src/TNL/Containers/ArrayOperationsCuda_impl.h @@ -230,7 +230,10 @@ bool ArrayOperations< Devices::Host, Devices::Cuda >::copyMemory( DestinationEle } Index j( 0 ); while( j < Devices::Cuda::getGPUTransferBufferSize() && i + j < size ) - destination[ i + j ] = buffer[ j++ ]; + { + destination[ i + j ] = buffer[ j ]; + j++; + } i += j; } delete[] buffer; @@ -332,7 +335,10 @@ bool ArrayOperations< Devices::Cuda, Devices::Host >::copyMemory( DestinationEle { Index j( 0 ); while( j < Devices::Cuda::getGPUTransferBufferSize() && i + j < size ) - buffer[ j ] = source[ i + j++ ]; + { + buffer[ j ] = source[ i + j ]; + j++; + } if( cudaMemcpy( &destination[ i ], buffer, j * sizeof( DestinationElement ), diff --git a/src/TNL/Images/JPEGImage_impl.h b/src/TNL/Images/JPEGImage_impl.h index c20258c825d771e3accdb3fa297e4caac1881cd8..ae0b8012e8043465b922228298a5d9f09ee4e77b 100644 --- a/src/TNL/Images/JPEGImage_impl.h +++ b/src/TNL/Images/JPEGImage_impl.h @@ -69,6 +69,7 @@ readHeader() this->components = this->decinfo.num_components; //this->color_space = this->cinfo.jpeg_color_space; //cout << this->height << " x " << this->width << " : " << this->components << " " << this->color_space << std::endl; + return true; #else std::cerr << "TNL was not compiled with support of JPEG. You may still use PGM format." << std::endl; return false; @@ -192,6 +193,7 @@ writeHeader( const Meshes::Grid< 2, Real, Device, Index >& grid ) this->cinfo.in_color_space = JCS_GRAYSCALE; jpeg_set_defaults( &this->cinfo ); jpeg_start_compress( &this->cinfo, true ); + return true; #else //cerr << "TNL was not compiled with support of JPEG. You may still use PGM format." << std::endl; return false; diff --git a/src/TNL/Images/PNGImage_impl.h b/src/TNL/Images/PNGImage_impl.h index 2835aff0e63c4dd3e8a545dfcb6cd138bd2bf3f4..1e0a2df60fe7a70f69c6669518270fd97bc79bf1 100644 --- a/src/TNL/Images/PNGImage_impl.h +++ b/src/TNL/Images/PNGImage_impl.h @@ -265,7 +265,7 @@ writeHeader( const Meshes::Grid< 2, Real, Device, Index >& grid ) PNG_FILTER_TYPE_DEFAULT ); png_init_io( this->png_ptr, this->file ); png_write_info( png_ptr, info_ptr ); - + return true; #else std::cerr << "TNL was not compiled with support of PNG. You may still use PGM format." << std::endl; return false; diff --git a/src/TNL/Matrices/CSR_impl.h b/src/TNL/Matrices/CSR_impl.h index 587b0999f7acd1ad0cbdee7b90878cc46969e446..3c9d239bda047b98799c804ea1a31f5e85f9c07d 100644 --- a/src/TNL/Matrices/CSR_impl.h +++ b/src/TNL/Matrices/CSR_impl.h @@ -222,7 +222,7 @@ bool CSR< Real, Device, Index >::addElement( const IndexType row, IndexType elementPtr = this->rowPointers.getElement( row ); const IndexType rowEnd = this->rowPointers.getElement( row + 1 ); - IndexType col; + IndexType col = 0; while( elementPtr < rowEnd && ( col = this->columnIndexes.getElement( elementPtr ) ) < column && col != this->getPaddingIndex() ) elementPtr++; diff --git a/src/TNL/Matrices/ChunkedEllpack_impl.h b/src/TNL/Matrices/ChunkedEllpack_impl.h index fd4e67a5a7e6daef5e6fb31fbe560918d0612390..b8b9374e1c973c43fd6cb736ee825ba59a28fe65 100644 --- a/src/TNL/Matrices/ChunkedEllpack_impl.h +++ b/src/TNL/Matrices/ChunkedEllpack_impl.h @@ -435,7 +435,7 @@ bool ChunkedEllpack< Real, Device, Index >::addElementToChunkFast( const IndexTy elementPtr, chunkEnd, step ); - IndexType col; + IndexType col = 0; while( elementPtr < chunkEnd && ( col = this->columnIndexes[ elementPtr ] ) < column && col != this->getPaddingIndex() ) @@ -532,7 +532,7 @@ bool ChunkedEllpack< Real, Device, Index >::addElementToChunk( const IndexType s elementPtr, chunkEnd, step ); - IndexType col; + IndexType col = 0; while( elementPtr < chunkEnd && ( col = this->columnIndexes.getElement( elementPtr ) ) < column && col != this->getPaddingIndex() ) @@ -1044,7 +1044,7 @@ typename Vector::RealType ChunkedEllpack< Real, Device, Index >::chunkVectorProd elementPtr, chunkEnd, step ); - IndexType i( 0 ), col; + IndexType i( 0 ), col( 0 ); typename Vector::RealType result( 0.0 ); while( i < chunkSize && ( col = this->columnIndexes[ elementPtr ] ) != this->getPaddingIndex() ) { diff --git a/src/TNL/Matrices/Multidiagonal_impl.h b/src/TNL/Matrices/Multidiagonal_impl.h index e4d60504d8ba66f6f3fab1a818614d1432fe74b8..9bc03c1042702a1e95c8921d230c27b03b091f8d 100644 --- a/src/TNL/Matrices/Multidiagonal_impl.h +++ b/src/TNL/Matrices/Multidiagonal_impl.h @@ -158,7 +158,7 @@ template< typename Real, typename Index > Index Multidiagonal< Real, Device, Index > :: getNumberOfNonzeroMatrixElements() const { - IndexType nonzeroElements; + IndexType nonzeroElements = 0; for( IndexType i = 0; i < this->values.getSize(); i++ ) if( this->values.getElement( i ) != 0 ) nonzeroElements++; diff --git a/src/TNL/Matrices/SlicedEllpack_impl.h b/src/TNL/Matrices/SlicedEllpack_impl.h index d2c0554e93b07b7a86d79dcd5b7da9eecf73646d..67d14b89cb94625f9ad2c5ace3573ba6226a6d86 100644 --- a/src/TNL/Matrices/SlicedEllpack_impl.h +++ b/src/TNL/Matrices/SlicedEllpack_impl.h @@ -193,7 +193,7 @@ bool SlicedEllpack< Real, Device, Index, SliceSize >::addElementFast( const Inde Index elementPtr, rowEnd, step; DeviceDependentCode::initRowTraverseFast( *this, row, elementPtr, rowEnd, step ); - IndexType col; + IndexType col = 0; while( elementPtr < rowEnd && ( col = this->columnIndexes[ elementPtr ] ) < column && col != this->getPaddingIndex() ) elementPtr += step; @@ -241,7 +241,7 @@ bool SlicedEllpack< Real, Device, Index, SliceSize >::addElement( const IndexTyp Index elementPtr, rowEnd, step; DeviceDependentCode::initRowTraverse( *this, row, elementPtr, rowEnd, step ); - IndexType col; + IndexType col = 0; while( elementPtr < rowEnd && ( col = this->columnIndexes.getElement( elementPtr ) ) < column && col != this->getPaddingIndex() ) elementPtr += step; @@ -379,7 +379,7 @@ Real SlicedEllpack< Real, Device, Index, SliceSize >::getElementFast( const Inde Index elementPtr, rowEnd, step; DeviceDependentCode::initRowTraverseFast( *this, row, elementPtr, rowEnd, step ); - IndexType col; + IndexType col = 0; while( elementPtr < rowEnd && ( col = this->columnIndexes[ elementPtr ] ) < column && col != this->getPaddingIndex() ) @@ -400,7 +400,7 @@ Real SlicedEllpack< Real, Device, Index, SliceSize >::getElement( const IndexTyp Index elementPtr, rowEnd, step; DeviceDependentCode::initRowTraverse( *this, row, elementPtr, rowEnd, step ); - IndexType col; + IndexType col = 0; while( elementPtr < rowEnd && ( col = this->columnIndexes.getElement( elementPtr ) ) < column && col != this->getPaddingIndex() ) diff --git a/src/TNL/Matrices/Tridiagonal_impl.h b/src/TNL/Matrices/Tridiagonal_impl.h index e766d78b15e19e393f39949ed9cae37411896693..afd72d1cd658b69faa57049aa6f656bbacd95852 100644 --- a/src/TNL/Matrices/Tridiagonal_impl.h +++ b/src/TNL/Matrices/Tridiagonal_impl.h @@ -129,7 +129,7 @@ template< typename Real, typename Index > Index Tridiagonal< Real, Device, Index > :: getNumberOfNonzeroMatrixElements() const { - IndexType nonzeroElements; + IndexType nonzeroElements = 0; for( IndexType i = 0; i < this->values.getSize(); i++ ) if( this->values.getElement( i ) != 0 ) nonzeroElements++; @@ -631,13 +631,13 @@ class TridiagonalDeviceDependentCode< Devices::Host > if( row == 0 ) return vector[ 0 ] * values[ 0 ] + vector[ 1 ] * values[ 1 ]; - Index i = 3 * row - 1; + Index i = 3 * row; if( row == rows - 1 ) - return vector[ row - 1 ] * values[ i++ ] + + return vector[ row - 1 ] * values[ i - 1 ] + vector[ row ] * values[ i ]; - return vector[ row - 1 ] * values[ i++ ] + - vector[ row ] * values[ i++ ] + - vector[ row + 1 ] * values[ i ]; + return vector[ row - 1 ] * values[ i - 1 ] + + vector[ row ] * values[ i ] + + vector[ row + 1 ] * values[ i + 1 ]; } template< typename Real, diff --git a/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h b/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h index 3fdfc69a4c3e66e424f1a44998dcbcff564a598e..0bf847c3e83c3d36e741f1b974eb4da4d3c36b6a 100644 --- a/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h +++ b/src/TNL/Meshes/GridDetails/GridEntityMeasureGetter.h @@ -34,7 +34,7 @@ class GridEntityMeasureGetter< Meshes::Grid< Dimensions, Real, Device, Index >, template< typename EntityType > __cuda_callable__ inline - static const Real& getMeasure( const GridType& grid, + static const Real getMeasure( const GridType& grid, const EntityType& entity ) { return 0.0; diff --git a/src/TNL/Meshes/MeshBuilder.h b/src/TNL/Meshes/MeshBuilder.h index b576ffe62a3b67df623c336af3cdb82a76e35e10..d9782c4c28ae53610c4760839ee6e7273964cba9 100644 --- a/src/TNL/Meshes/MeshBuilder.h +++ b/src/TNL/Meshes/MeshBuilder.h @@ -105,7 +105,7 @@ class MeshBuilder for( GlobalIndexType i = 0; i < this->points.getSize(); i++ ) if (! this->pointsSet[ i ] ) return false; - return true; + return true; } PointArrayType points; diff --git a/src/TNL/Meshes/MeshDetails/MeshEntityReferenceOrientation.h b/src/TNL/Meshes/MeshDetails/MeshEntityReferenceOrientation.h index 1b1e1e61496e5ca12abfd7089321f770adf9501f..73fb5e80dcb67444423287347f75c0b2d6a44180 100644 --- a/src/TNL/Meshes/MeshDetails/MeshEntityReferenceOrientation.h +++ b/src/TNL/Meshes/MeshDetails/MeshEntityReferenceOrientation.h @@ -35,7 +35,7 @@ class MeshEntityReferenceOrientation } } - static String getType(){}; + static String getType(){ return "MeshEntityReferenceOrientation"; }; EntityOrientation createOrientation( const SeedType& seed ) const { diff --git a/src/TNL/Meshes/MeshDetails/MeshWriterVTKLegacy.h b/src/TNL/Meshes/MeshDetails/MeshWriterVTKLegacy.h index 5acbb754aed9dd07ae8437f5891fff45db528e2a..ff4673a790ebfd08ecf33c93916be5b3990a5f7d 100644 --- a/src/TNL/Meshes/MeshDetails/MeshWriterVTKLegacy.h +++ b/src/TNL/Meshes/MeshDetails/MeshWriterVTKLegacy.h @@ -72,8 +72,7 @@ class MeshWriterVTKLegacy outputFile << std::setprecision( 6 ); outputFile << std::fixed; - if( ! writeMesh( outputFile, mesh, verbose ) ) - return false; + return writeMesh( outputFile, mesh, verbose ); } template< typename MeshType > diff --git a/src/TNL/Meshes/MeshDetails/initializer/MeshEntityInitializer.h b/src/TNL/Meshes/MeshDetails/initializer/MeshEntityInitializer.h index 12d6b4ffa1ea89ee8e54690437f7a532dede67d1..37e0988199855dce3208b97fb6cbb1f22ec027fe 100644 --- a/src/TNL/Meshes/MeshDetails/initializer/MeshEntityInitializer.h +++ b/src/TNL/Meshes/MeshDetails/initializer/MeshEntityInitializer.h @@ -74,7 +74,7 @@ class MeshEntityInitializer //using SuperentityBaseType::setNumberOfSuperentities; - static String getType() {}; + static String getType() { return "MeshEntityInitializer"; }; MeshEntityInitializer() : entity(0), entityIndex( -1 ) {} @@ -111,7 +111,7 @@ class MeshEntityInitializer< MeshConfig, MeshVertexTopology > typedef typename MeshTraits< MeshConfig >::PointType PointType; typedef MeshInitializer< MeshConfig > InitializerType; - static String getType() {}; + static String getType() { return "MeshEntityInitializer"; }; static void setVertexPoint( VertexType& vertex, const PointType& point, diff --git a/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h b/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h index c80844f758d5a7d9366bb244457badadfb223784..22e88efda6d845112e217c93eb53045790330d38 100644 --- a/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h +++ b/src/TNL/Meshes/MeshDetails/initializer/MeshInitializer.h @@ -337,6 +337,7 @@ class MeshInitializerLayer< MeshConfig, using BaseType::findEntitySeedIndex; GlobalIndexType findEntitySeedIndex( const SeedType& seed ) const { + // FIXME: index may be uninitialized (when seedsIndexedSet.find returns false) GlobalIndexType index; this->seedsIndexedSet.find( seed, index ); return index; diff --git a/src/TNL/Solvers/ODE/ExplicitSolver_impl.h b/src/TNL/Solvers/ODE/ExplicitSolver_impl.h index b9b4341721379c18c01556fecb3ea2506778ca74..bfe133d779358828c932ff885dacd2171f879fe8 100644 --- a/src/TNL/Solvers/ODE/ExplicitSolver_impl.h +++ b/src/TNL/Solvers/ODE/ExplicitSolver_impl.h @@ -18,9 +18,9 @@ template< typename Problem > ExplicitSolver< Problem >:: ExplicitSolver() : time( 0.0 ), + stopTime( 0.0 ), tau( 0.0 ), maxTau( DBL_MAX ), - stopTime( 0.0 ), solver_comm( MPI_COMM_WORLD ), verbosity( 0 ), timer( &defaultTimer ), diff --git a/src/TNL/Solvers/PDE/ExplicitUpdater.h b/src/TNL/Solvers/PDE/ExplicitUpdater.h index 78e2825f66a8f55c68793214eaa828b109899cd4..45b33efa2c50ed82a5511ea5b852640980dea276 100644 --- a/src/TNL/Solvers/PDE/ExplicitUpdater.h +++ b/src/TNL/Solvers/PDE/ExplicitUpdater.h @@ -27,6 +27,8 @@ class ExplicitUpdaterTraverserUserData { public: + const Real time; + const DifferentialOperator* differentialOperator; const BoundaryConditions* boundaryConditions; @@ -35,8 +37,6 @@ class ExplicitUpdaterTraverserUserData MeshFunction *u, *fu; - const Real time; - ExplicitUpdaterTraverserUserData( const Real& time, const DifferentialOperator* differentialOperator, const BoundaryConditions* boundaryConditions, diff --git a/src/TNL/Timer.cpp b/src/TNL/Timer.cpp index e5434b8049506ab303b571af31b6923386849def..06a50358017c631b9710d5e88b1fd093e43fc4a3 100644 --- a/src/TNL/Timer.cpp +++ b/src/TNL/Timer.cpp @@ -142,7 +142,7 @@ bool Timer::writeLog( Logger& logger, int logLevel ) logger.writeParameter< double >( "Real time:", this->getRealTime(), logLevel ); logger.writeParameter< double >( "CPU time:", this->getCPUTime(), logLevel ); logger.writeParameter< unsigned long long int >( "CPU Cycles:", this->getCPUCycles(), logLevel ); - + return true; } } // namespace TNL diff --git a/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h b/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h index 9a6cf7b95e05c2888487802c3bb0f80c03d74e4b..19750dc2141488f643447f0da6f48b4775d5199f 100644 --- a/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h +++ b/tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation.h @@ -210,7 +210,7 @@ __global__ void updateKernel( Real* u, template< typename Real, typename Index > bool writeFunction( - char* fileName, + const char* fileName, const Real* data, const Index xSize, const Index ySize, @@ -232,6 +232,7 @@ bool writeFunction( file << i * hx - originX << " " << j * hy - originY << " " << data[ j * xSize + i ] << endl; file << endl; } + return true; } template< typename Real, typename Index > diff --git a/tests/benchmarks/spmv.h b/tests/benchmarks/spmv.h index c7c9a2fc7d6e823da17a5c72f0865f803c7fa6f8..a197a15a73a0df9d2096dd6fc866b0a2b51e7036 100644 --- a/tests/benchmarks/spmv.h +++ b/tests/benchmarks/spmv.h @@ -173,11 +173,13 @@ benchmarkSpmvSynthetic( Benchmark & benchmark, const int & size, const int & elementsPerRow ) { + bool result = true; // TODO: benchmark all formats from tnl-benchmark-spmv (different parameters of the base formats) - benchmarkSpMV< Real, Matrices::CSR >( benchmark, loops, size, elementsPerRow ); - benchmarkSpMV< Real, Matrices::Ellpack >( benchmark, loops, size, elementsPerRow ); - benchmarkSpMV< Real, SlicedEllpack >( benchmark, loops, size, elementsPerRow ); - benchmarkSpMV< Real, Matrices::ChunkedEllpack >( benchmark, loops, size, elementsPerRow ); + result |= benchmarkSpMV< Real, Matrices::CSR >( benchmark, loops, size, elementsPerRow ); + result |= benchmarkSpMV< Real, Matrices::Ellpack >( benchmark, loops, size, elementsPerRow ); + result |= benchmarkSpMV< Real, SlicedEllpack >( benchmark, loops, size, elementsPerRow ); + result |= benchmarkSpMV< Real, Matrices::ChunkedEllpack >( benchmark, loops, size, elementsPerRow ); + return result; } } // namespace benchmarks diff --git a/tools/src/tnl-diff.h b/tools/src/tnl-diff.h index 232df3d58e16c6065bef5b31eb6e6ff40578fd07..756fc6d1805361018b1a9169350bf4a0998c6a47 100644 --- a/tools/src/tnl-diff.h +++ b/tools/src/tnl-diff.h @@ -300,6 +300,7 @@ bool computeDifference( const MeshPointer& meshPointer, const String& objectType if( objectType == "Containers::Vector" || objectType == "tnlVector" || objectType == "tnlSharedVector" ) // TODO: remove deprecated type name return computeDifferenceOfVectors< MeshPointer, Element, Real, Index >( meshPointer, parameters ); + return false; } @@ -379,6 +380,7 @@ bool setTupleType( const MeshPointer& meshPointer, return setIndexType< MeshPointer, Containers::StaticVector< 3, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } + return false; } template< typename MeshPointer > @@ -444,21 +446,22 @@ bool processFiles( const Config::ParameterContainer& parameters ) } String objectType; - if( ! getObjectType( inputFiles[ 0 ], objectType ) ) + if( ! getObjectType( inputFiles[ 0 ], objectType ) ) { std::cerr << "unknown object ... SKIPPING!" << std::endl; - else - { - if( verbose ) - std::cout << objectType << " detected ... "; + return false; + } - List< String > parsedObjectType; - if( ! parseObjectType( objectType, parsedObjectType ) ) - { - std::cerr << "Unable to parse object type " << objectType << "." << std::endl; - return false; - } - setElementType< MeshPointer >( meshPointer, inputFiles[ 0 ], parsedObjectType, parameters ); + if( verbose ) + std::cout << objectType << " detected ... "; + + List< String > parsedObjectType; + if( ! parseObjectType( objectType, parsedObjectType ) ) + { + std::cerr << "Unable to parse object type " << objectType << "." << std::endl; + return false; } + setElementType< MeshPointer >( meshPointer, inputFiles[ 0 ], parsedObjectType, parameters ); + return true; } #endif /* TNL_DIFF_H_ */ diff --git a/tools/src/tnl-image-converter.cpp b/tools/src/tnl-image-converter.cpp index 8effaace27aa841f12b0c2d88455af41c5a57f46..ebe9e6bef199bb7da956dce0011f05c5a2774d93 100644 --- a/tools/src/tnl-image-converter.cpp +++ b/tools/src/tnl-image-converter.cpp @@ -128,6 +128,7 @@ bool processImages( const Config::ParameterContainer& parameters ) continue; } } + return true; } bool processTNLFiles( const Config::ParameterContainer& parameters ) @@ -189,6 +190,7 @@ bool processTNLFiles( const Config::ParameterContainer& parameters ) } } + return true; } int main( int argc, char* argv[] ) diff --git a/tools/src/tnl-init.h b/tools/src/tnl-init.h index 0788afaa236cd51fce1aac1f160fa705d785260a..41a2ce7774698d00e589ec4442d580e88930d204 100644 --- a/tools/src/tnl-init.h +++ b/tools/src/tnl-init.h @@ -198,6 +198,7 @@ bool resolveRealType( const Config::ParameterContainer& parameters ) return resolveDerivatives< MeshType, double >( parameters ); if( realType == "long-double" ) return resolveDerivatives< MeshType, long double >( parameters ); + return false; } @@ -226,6 +227,8 @@ bool resolveIndexType( const List< String >& parsedMeshType, if( parsedMeshType[ 4 ] == "long int" ) return resolveMesh< Dimensions, RealType, long int >( parsedMeshType, parameters ); + + return false; } template< int Dimensions > @@ -241,6 +244,8 @@ bool resolveRealType( const List< String >& parsedMeshType, if( parsedMeshType[ 2 ] == "long-double" ) return resolveIndexType< Dimensions, long double >( parsedMeshType, parameters ); + + return false; } bool resolveMeshType( const List< String >& parsedMeshType, @@ -259,5 +264,6 @@ bool resolveMeshType( const List< String >& parsedMeshType, if( dimensions == 3 ) return resolveRealType< 3 >( parsedMeshType, parameters ); + return false; } #endif /* TNL_INIT_H_ */ diff --git a/tools/src/tnl-mesh-convert.h b/tools/src/tnl-mesh-convert.h index f65233e09fe0e42876b875bc43d1e530a7d55d23..7e0bbac01044cf8171632cec22a0a5f354d23b3a 100644 --- a/tools/src/tnl-mesh-convert.h +++ b/tools/src/tnl-mesh-convert.h @@ -51,6 +51,7 @@ bool convertMesh( const Config::ParameterContainer& parameters ) std::cerr << "I am not able to write the mesh into the file " << outputFileName << "." << std::endl; return false; } + return true; } if( outputFileExt == "vtk" ) { @@ -61,6 +62,7 @@ bool convertMesh( const Config::ParameterContainer& parameters ) } return true; } + return false; } bool readNetgenMesh( const Config::ParameterContainer& parameters ) @@ -114,6 +116,7 @@ bool convertMesh( const Config::ParameterContainer& parameters ) const String fileExt = getFileExtension( inputFileName ); if( fileExt == "ng" ) return readNetgenMesh( parameters ); + return false; } diff --git a/tools/src/tnl-view.h b/tools/src/tnl-view.h index 1924324144ca82a16f5541833029347bb32d7896..cb34f429a6f52467d721432391fa9d652d465ac9 100644 --- a/tools/src/tnl-view.h +++ b/tools/src/tnl-view.h @@ -340,6 +340,7 @@ bool setTupleType( const MeshPointer& meshPointer, return setIndexType< MeshPointer, Containers::StaticVector< 3, long double >, long double >( meshPointer, inputFileName, parsedObjectType, parameters ); break; } + return false; } template< typename MeshPointer >