diff --git a/src/Benchmarks/BLAS/array-operations.h b/src/Benchmarks/BLAS/array-operations.h index 99b934c7b63f25aeade83d59edcb10b355ffd31b..a0c339722ad54b741e66b5e272c4c97c559f60cd 100644 --- a/src/Benchmarks/BLAS/array-operations.h +++ b/src/Benchmarks/BLAS/array-operations.h @@ -23,8 +23,10 @@ benchmarkArrayOperations( Benchmark<> & benchmark, double datasetSize = (double) size * sizeof( Real ) / oneGB; - HostArray hostArray, hostArray2; - CudaArray deviceArray, deviceArray2; + HostArray hostArray; + HostArray hostArray2; + CudaArray deviceArray; + CudaArray deviceArray2; hostArray.setSize( size ); hostArray2.setSize( size ); #ifdef HAVE_CUDA diff --git a/src/Benchmarks/BLAS/gemv.h b/src/Benchmarks/BLAS/gemv.h index e5fb88cbe4fa2fda77dd0f3a97d3bcd725e107f4..4080ef566c490f6c48d3fdd9cfb002f4215251fa 100644 --- a/src/Benchmarks/BLAS/gemv.h +++ b/src/Benchmarks/BLAS/gemv.h @@ -32,8 +32,11 @@ benchmarkGemv( Benchmark<> & benchmark, int rows, int columns ) HostMatrix hostMatrix; RowMajorCudaMatrix rowMajorCudaMatrix; ColumnMajorCudaMatrix columnMajorCudaMatrix; - HostVector inHostVector, outHostVector; - CudaVector inCudaVector, outCudaVector1, outCudaVector2; + HostVector inHostVector; + HostVector outHostVector; + CudaVector inCudaVector; + CudaVector outCudaVector1; + CudaVector outCudaVector2; hostMatrix.setDimensions( rows, columns ); inHostVector.setSize( columns ); diff --git a/src/Benchmarks/BLAS/triad.h b/src/Benchmarks/BLAS/triad.h index f5fc2609cdeb53fbcb1f19cad85cddd90c791c50..4e0de12adfb9daca3c3ac86d1299a83d0b70c79f 100644 --- a/src/Benchmarks/BLAS/triad.h +++ b/src/Benchmarks/BLAS/triad.h @@ -32,8 +32,12 @@ benchmarkTriad( Benchmark<> & benchmark, using HostArray = Containers::Array< Real, Devices::Host, Index, HostAllocator >; using CudaArray = Containers::Array< Real, Devices::Cuda, Index, CudaAllocator >; - HostArray a_h, b_h, c_h; - CudaArray a_d, b_d, c_d; + HostArray a_h; + HostArray b_h; + HostArray c_h; + CudaArray a_d; + CudaArray b_d; + CudaArray c_d; a_h.setSize( size ); b_h.setSize( size ); c_h.setSize( size ); @@ -76,8 +80,12 @@ benchmarkTriad( Benchmark<> & benchmark, using HostArray = Containers::Array< Real, Devices::Host, Index, CudaHostAllocator >; using CudaArray = Containers::Array< Real, Devices::Cuda, Index, CudaAllocator >; - HostArray a_h, b_h, c_h; - CudaArray a_d, b_d, c_d; + HostArray a_h; + HostArray b_h; + HostArray c_h; + CudaArray a_d; + CudaArray b_d; + CudaArray c_d; a_h.setSize( size ); b_h.setSize( size ); c_h.setSize( size ); @@ -119,7 +127,9 @@ benchmarkTriad( Benchmark<> & benchmark, { using HostArray = Containers::Array< Real, Devices::Host, Index, CudaHostAllocator >; - HostArray a_h, b_h, c_h; + HostArray a_h; + HostArray b_h; + HostArray c_h; a_h.setSize( size ); b_h.setSize( size ); c_h.setSize( size ); @@ -150,7 +160,9 @@ benchmarkTriad( Benchmark<> & benchmark, { using Array = Containers::Array< Real, Devices::Host, Index, CudaManagedAllocator >; - Array a, b, c; + Array a; + Array b; + Array c; a.setSize( size ); b.setSize( size ); c.setSize( size ); diff --git a/src/Benchmarks/BLAS/vector-operations.h b/src/Benchmarks/BLAS/vector-operations.h index 2186cd482225f4d1513b10c0831e9b8261d4365d..df242012f480142d7fc2ec6a9555e70105fe3d0e 100644 --- a/src/Benchmarks/BLAS/vector-operations.h +++ b/src/Benchmarks/BLAS/vector-operations.h @@ -39,8 +39,14 @@ benchmarkVectorOperations( Benchmark<> & benchmark, double datasetSize = (double) size * sizeof( Real ) / oneGB; - HostVector hostVector( size ), hostVector2( size ), hostVector3( size ), hostVector4( size ); - CudaVector deviceVector, deviceVector2, deviceVector3, deviceVector4; + HostVector hostVector( size ); + HostVector hostVector2( size ); + HostVector hostVector3( size ); + HostVector hostVector4( size ); + CudaVector deviceVector; + CudaVector deviceVector2; + CudaVector deviceVector3; + CudaVector deviceVector4; #ifdef HAVE_CUDA deviceVector.setSize( size ); deviceVector2.setSize( size ); @@ -48,12 +54,16 @@ benchmarkVectorOperations( Benchmark<> & benchmark, deviceVector4.setSize( size ); #endif - HostView hostView( hostVector ), hostView2( hostVector2 ), hostView3( hostVector3 ), hostView4( hostVector4 ); + HostView hostView( hostVector ); + HostView hostView2( hostVector2 ); + HostView hostView3( hostVector3 ); + HostView hostView4( hostVector4 ); #ifdef HAVE_CUDA CudaView deviceView( deviceVector ), deviceView2( deviceVector2 ), deviceView3( deviceVector3 ), deviceView4( deviceVector4 ); #endif - Real resultHost, resultDevice; + Real resultHost; + Real resultDevice; #ifdef HAVE_CUDA cublasHandle_t cublasHandle; diff --git a/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h b/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h index 0d366b40735fdd5cb28f471c638a296f97ac68ce..cf83a45ca10a418c6f1882ab620c1dca6e1361f1 100644 --- a/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h +++ b/src/Benchmarks/HeatEquation/tnl-benchmark-simple-heat-equation.h @@ -579,7 +579,9 @@ int main( int argc, char* argv[] ) if( ! parseCommandLine( argc, argv, config, parameters ) ) return EXIT_FAILURE; - Timer timer, computationTimer, updateTimer; + Timer timer; + Timer computationTimer; + Timer updateTimer; String device = parameters.getParameter< String >( "device" ); if( device == "host" && diff --git a/src/TNL/Algorithms/Segments/Kernels/CSRAdaptiveKernel.hpp b/src/TNL/Algorithms/Segments/Kernels/CSRAdaptiveKernel.hpp index 5ef388ab4471ccd3149cc9878f6e51278e49d589..72835856835b8b3d5b8adda9e10d28d9a338fe8f 100644 --- a/src/TNL/Algorithms/Segments/Kernels/CSRAdaptiveKernel.hpp +++ b/src/TNL/Algorithms/Segments/Kernels/CSRAdaptiveKernel.hpp @@ -129,7 +129,8 @@ CSRAdaptiveKernel< Index, Device >::initValueSize( const Offsets& offsets ) TNL::Containers::Vector< typename Offsets::IndexType, TNL::Devices::Host, typename Offsets::IndexType >; HostOffsetsType hostOffsets( offsets ); const Index rows = offsets.getSize(); - Index start( 0 ), nextStart( 0 ); + Index start( 0 ); + Index nextStart( 0 ); size_t sum; // Fill blocks diff --git a/src/TNL/Algorithms/Segments/SlicedEllpack.hpp b/src/TNL/Algorithms/Segments/SlicedEllpack.hpp index 13ae01a44b39545e4bfc95ddec8e3dbeafa1707d..caef47f6414ee30fef7783c22a7920ce734b0d69 100644 --- a/src/TNL/Algorithms/Segments/SlicedEllpack.hpp +++ b/src/TNL/Algorithms/Segments/SlicedEllpack.hpp @@ -163,7 +163,8 @@ SlicedEllpack< Device, Index, IndexAllocator, Organization, SliceSize >::getGlob { const IndexType sliceIdx = segmentIdx / SliceSize; const IndexType segmentInSliceIdx = segmentIdx % SliceSize; - IndexType sliceOffset, segmentSize; + IndexType sliceOffset; + IndexType segmentSize; if( std::is_same< DeviceType, Devices::Host >::value ) { sliceOffset = this->sliceOffsets[ sliceIdx ]; segmentSize = this->sliceSegmentSizes[ sliceIdx ]; diff --git a/src/TNL/Algorithms/Segments/SlicedEllpackView.hpp b/src/TNL/Algorithms/Segments/SlicedEllpackView.hpp index abb3f5690379e58c324eb177bea6f8686796fe96..85834e1799821dc2d27f8b38f1e848a2ccc1feb5 100644 --- a/src/TNL/Algorithms/Segments/SlicedEllpackView.hpp +++ b/src/TNL/Algorithms/Segments/SlicedEllpackView.hpp @@ -110,7 +110,8 @@ SlicedEllpackView< Device, Index, Organization, SliceSize >::getGlobalIndex( con { const IndexType sliceIdx = segmentIdx / SliceSize; const IndexType segmentInSliceIdx = segmentIdx % SliceSize; - IndexType sliceOffset, segmentSize; + IndexType sliceOffset; + IndexType segmentSize; if( std::is_same< DeviceType, Devices::Host >::value ) { sliceOffset = this->sliceOffsets[ sliceIdx ]; segmentSize = this->sliceSegmentSizes[ sliceIdx ]; diff --git a/src/TNL/Containers/StaticVector.h b/src/TNL/Containers/StaticVector.h index 750ac1de3cc7983448f213eb06b984f2256a83f2..6549de274a713cae0ba1febc0330715007c0bf57 100644 --- a/src/TNL/Containers/StaticVector.h +++ b/src/TNL/Containers/StaticVector.h @@ -209,7 +209,8 @@ __cuda_callable__ Real TriangleArea( const StaticVector< 2, Real >& a, const StaticVector< 2, Real >& b, const StaticVector< 2, Real >& c ) { - StaticVector< 3, Real > u1, u2; + StaticVector< 3, Real > u1; + StaticVector< 3, Real > u2; u1.x() = b.x() - a.x(); u1.y() = b.y() - a.y(); u1.z() = 0.0; @@ -226,7 +227,8 @@ __cuda_callable__ Real TriangleArea( const StaticVector< 3, Real >& a, const StaticVector< 3, Real >& b, const StaticVector< 3, Real >& c ) { - StaticVector< 3, Real > u1, u2; + StaticVector< 3, Real > u1; + StaticVector< 3, Real > u2; u1.x() = b.x() - a.x(); u1.y() = b.y() - a.y(); u1.z() = b.z() - a.z(); diff --git a/src/TNL/Matrices/SparseMatrix.hpp b/src/TNL/Matrices/SparseMatrix.hpp index 313639c13bd0e34b17e539962338cc528de1809a..f53e8c3cbe11e850f43365afcd1d5d5c11868757 100644 --- a/src/TNL/Matrices/SparseMatrix.hpp +++ b/src/TNL/Matrices/SparseMatrix.hpp @@ -1031,7 +1031,8 @@ SparseMatrix< Real, Device, Index, MatrixType, Segments, ComputeReal, RealAlloca [ = ] __cuda_callable__( IndexType rowIdx, IndexType localIdx, IndexType & columnIndex, RealType & value ) mutable { RealType inValue( 0.0 ); - IndexType bufferIdx, column( rowLocalIndexes_view[ rowIdx ] ); + IndexType bufferIdx; + IndexType column( rowLocalIndexes_view[ rowIdx ] ); while( inValue == 0.0 && column < matrix_columns ) { bufferIdx = ( rowIdx - baseRow ) * maxRowLength + column++; inValue = thisValuesBuffer_view[ bufferIdx ]; diff --git a/src/TNL/Meshes/DistributedMeshes/DistributedGrid.hpp b/src/TNL/Meshes/DistributedMeshes/DistributedGrid.hpp index 25d8713963ccf13bd3530ab0d6d4e5bf784ee516..c8591885491b08f053d6e93ebbddc607e3963995 100644 --- a/src/TNL/Meshes/DistributedMeshes/DistributedGrid.hpp +++ b/src/TNL/Meshes/DistributedMeshes/DistributedGrid.hpp @@ -133,7 +133,8 @@ template< int Dimension, typename Real, typename Device, typename Index > void DistributedMesh< Grid< Dimension, Real, Device, Index > >::setGhostLevels( int levels ) { - SubdomainOverlapsType lowerOverlap, upperOverlap; + SubdomainOverlapsType lowerOverlap; + SubdomainOverlapsType upperOverlap; SubdomainOverlapsGetter< GridType >::getOverlaps( this, lowerOverlap, upperOverlap, levels ); setOverlaps( lowerOverlap, upperOverlap ); } @@ -347,7 +348,8 @@ DistributedMesh< Grid< Dimension, Real, Device, Index > >::SetupByCut( typename GridType::CoordinatesType outDimensions; // set local grid typename GridType::PointType localOrigin; - typename GridType::CoordinatesType localBegin, localGridSize; + typename GridType::CoordinatesType localBegin; + typename GridType::CoordinatesType localGridSize; for( int i = 0; i < Dimension; i++ ) { outOrigin[ i ] = fromGlobalMesh.getOrigin()[ savedDimensions[ i ] ]; diff --git a/src/TNL/Meshes/GridDetails/Grid2D_impl.h b/src/TNL/Meshes/GridDetails/Grid2D_impl.h index bd9e6256d2bbfedb16f2bad79ca9b1e8fec49ac3..91b45bec83dee72f2f519b63af3fb243930e28f6 100644 --- a/src/TNL/Meshes/GridDetails/Grid2D_impl.h +++ b/src/TNL/Meshes/GridDetails/Grid2D_impl.h @@ -43,7 +43,8 @@ Grid< 2, Real, Device, Index >::computeSpaceStepPowers() const RealType& hx = this->spaceSteps.x(); const RealType& hy = this->spaceSteps.y(); - Real auxX, auxY; + Real auxX; + Real auxY; for( int i = 0; i < 5; i++ ) { switch( i ) { case 0: diff --git a/src/TNL/Meshes/GridDetails/Grid3D_impl.h b/src/TNL/Meshes/GridDetails/Grid3D_impl.h index baaa43f339baef15f423db1c6c6c6d5b8ef05058..671afcf4e80c2e11a6abfbc7ba1903bbd14151cc 100644 --- a/src/TNL/Meshes/GridDetails/Grid3D_impl.h +++ b/src/TNL/Meshes/GridDetails/Grid3D_impl.h @@ -44,7 +44,9 @@ Grid< 3, Real, Device, Index >::computeSpaceStepPowers() const RealType& hy = this->spaceSteps.y(); const RealType& hz = this->spaceSteps.z(); - Real auxX, auxY, auxZ; + Real auxX; + Real auxY; + Real auxZ; for( int i = 0; i < 5; i++ ) { switch( i ) { case 0: diff --git a/src/TNL/Meshes/MeshDetails/layers/EntityTags/Layer.h b/src/TNL/Meshes/MeshDetails/layers/EntityTags/Layer.h index 759e27b454fbff1380fb699b4ecc5f128dd35774..bca7dde795347840ea039899d29efcb45d567786 100644 --- a/src/TNL/Meshes/MeshDetails/layers/EntityTags/Layer.h +++ b/src/TNL/Meshes/MeshDetails/layers/EntityTags/Layer.h @@ -138,7 +138,8 @@ public: ghostsOffset = tags.getSize() - ghostEntities; if( ! std::is_same< Device, Devices::Cuda >::value ) { - GlobalIndexType i = 0, b = 0; + GlobalIndexType i = 0; + GlobalIndexType b = 0; for( GlobalIndexType e = 0; e < tags.getSize(); e++ ) { if( tags[ e ] & EntityTags::BoundaryEntity ) boundaryIndices[ b++ ] = e; @@ -156,7 +157,8 @@ public: using OrderingHostArray = typename OrderingArray::template Self< typename OrderingArray::ValueType, Devices::Host >; EntityTagsHostArray hostTags; - OrderingHostArray hostBoundaryIndices, hostInteriorIndices; + OrderingHostArray hostBoundaryIndices; + OrderingHostArray hostInteriorIndices; hostTags.setLike( tags ); hostInteriorIndices.setLike( interiorIndices ); @@ -164,7 +166,8 @@ public: hostTags = tags; - GlobalIndexType i = 0, b = 0; + GlobalIndexType i = 0; + GlobalIndexType b = 0; for( GlobalIndexType e = 0; e < tags.getSize(); e++ ) { if( hostTags[ e ] & EntityTags::BoundaryEntity ) hostBoundaryIndices[ b++ ] = e; diff --git a/src/TNL/Meshes/Readers/MeshReader.h b/src/TNL/Meshes/Readers/MeshReader.h index 7b929c1b0882f2c8fbf8cd8a3be59481dc44eea4..b07168c216864963b9fe065f8adb813de5359614 100644 --- a/src/TNL/Meshes/Readers/MeshReader.h +++ b/src/TNL/Meshes/Readers/MeshReader.h @@ -118,7 +118,8 @@ public: "gridSpacing has invalid size: " + std::to_string( gridSpacing.size() ) + " (should be 3)" ); // split the extent into begin and end - typename MeshType::CoordinatesType begin, end; + typename MeshType::CoordinatesType begin; + typename MeshType::CoordinatesType end; for( int i = 0; i < begin.getSize(); i++ ) { begin[ i ] = gridExtent[ 2 * i ]; end[ i ] = gridExtent[ 2 * i + 1 ]; @@ -126,7 +127,8 @@ public: mesh.setDimensions( end - begin ); // transform the origin and calculate proportions - typename MeshType::PointType origin, proportions; + typename MeshType::PointType origin; + typename MeshType::PointType proportions; for( int i = 0; i < origin.getSize(); i++ ) { origin[ i ] = gridOrigin[ i ] + begin[ i ] * gridSpacing[ i ]; proportions[ i ] = ( end[ i ] - begin[ i ] ) * gridSpacing[ i ]; diff --git a/src/TNL/Meshes/Readers/NetgenReader.h b/src/TNL/Meshes/Readers/NetgenReader.h index 3a221d5cce499599f65734e91b96abf58160cc5b..c11f3d5eb9e662acb993fc4acce6ac979a7d8b37 100644 --- a/src/TNL/Meshes/Readers/NetgenReader.h +++ b/src/TNL/Meshes/Readers/NetgenReader.h @@ -60,7 +60,8 @@ public: // arrays holding the data from the file std::vector< double > pointsArray; - std::vector< std::int32_t > connectivityArray, offsetsArray; + std::vector< std::int32_t > connectivityArray; + std::vector< std::int32_t > offsetsArray; std::vector< std::uint8_t > typesArray; // read points diff --git a/src/TNL/Meshes/Readers/VTKReader.h b/src/TNL/Meshes/Readers/VTKReader.h index 67f95964ada67795a2df983459b9fa007eb15cc5..9c7e39619dc91836c9a039896d35fe55bf2f9aff 100644 --- a/src/TNL/Meshes/Readers/VTKReader.h +++ b/src/TNL/Meshes/Readers/VTKReader.h @@ -45,7 +45,8 @@ public: // parse the file, find the starting positions of all relevant sections findSections( inputFile ); - std::string line, aux; + std::string line; + std::string aux; std::istringstream iss; // parse points section @@ -66,7 +67,8 @@ public: // arrays holding the data from the VTK file std::vector< double > pointsArray; - std::vector< std::int64_t > cellConnectivityArray, cellOffsetsArray; + std::vector< std::int64_t > cellConnectivityArray; + std::vector< std::int64_t > cellOffsetsArray; std::vector< std::uint8_t > typesArray; // read points @@ -269,7 +271,8 @@ public: iss >> aux >> datatype; // arrays for polyhedral mesh - std::vector< std::int64_t > faceConnectivityArray, faceOffsetsArray; + std::vector< std::int64_t > faceConnectivityArray; + std::vector< std::int64_t > faceOffsetsArray; std::int64_t faceIndex = 0; // read connectivity @@ -657,7 +660,8 @@ protected: int values_per_element = 1; // additional metadata - std::string array_name, datatype; + std::string array_name; + std::string datatype; if( type == "SCALARS" ) { // parse the rest of the line: SCALARS <array_name> <datatype> @@ -760,7 +764,8 @@ protected: // type: SCALARS, VECTORS, etc. // datatype: int, float, double - std::string type, datatype; + std::string type; + std::string datatype; // parse the metadata line std::string line; diff --git a/src/TNL/Meshes/Writers/PVTIWriter.hpp b/src/TNL/Meshes/Writers/PVTIWriter.hpp index 211d337c937ec7306673af33ddaadcd06beb0285..6a24705cb12c07a36ab6be40ba749c078c92ed55 100644 --- a/src/TNL/Meshes/Writers/PVTIWriter.hpp +++ b/src/TNL/Meshes/Writers/PVTIWriter.hpp @@ -60,7 +60,9 @@ PVTIWriter< Grid >::writeImageData( const Grid& globalGrid, const unsigned Ghost if( pImageDataOpen ) throw std::logic_error( "The <PImageData> tag is already open." ); - std::stringstream extent, origin, spacing; + std::stringstream extent; + std::stringstream origin; + std::stringstream spacing; auto dims = globalGrid.getDimensions(); for( int j = 0; j < dims.getSize(); j++ ) diff --git a/src/TNL/Meshes/Writers/VTIWriter.hpp b/src/TNL/Meshes/Writers/VTIWriter.hpp index 4433f4e3b67ef82c3fee39b63a3c4b3278ca3b82..362e7b24336c77ea51e70d28885f161ed2f60a91 100644 --- a/src/TNL/Meshes/Writers/VTIWriter.hpp +++ b/src/TNL/Meshes/Writers/VTIWriter.hpp @@ -62,7 +62,9 @@ VTIWriter< Mesh >::writeImageData( const typename Mesh::PointType& gridOrigin, if( imageDataOpen ) throw std::logic_error( "The <ImageData> tag is already open." ); - std::stringstream extent, origin, spacing; + std::stringstream extent; + std::stringstream origin; + std::stringstream spacing; for( int j = 0; j < Mesh::getMeshDimension(); j++ ) extent << begin[ j ] << " " << end[ j ] << " "; diff --git a/src/TNL/Meshes/Writers/VTUWriter.hpp b/src/TNL/Meshes/Writers/VTUWriter.hpp index 0ce2910aa1d42e1b996e583ecdee3c629d263222..6a945dc337254f7709312aef1facb9ded115625d 100644 --- a/src/TNL/Meshes/Writers/VTUWriter.hpp +++ b/src/TNL/Meshes/Writers/VTUWriter.hpp @@ -67,7 +67,8 @@ VTUWriter< Mesh >::writeEntities( const Mesh& mesh ) // collect all data before writing using IndexType = typename Mesh::GlobalIndexType; - std::vector< IndexType > connectivity, offsets; + std::vector< IndexType > connectivity; + std::vector< IndexType > offsets; std::vector< std::uint8_t > types; detail::MeshEntitiesVTUCollector< Mesh, EntityDimension >::exec( mesh, connectivity, offsets, types ); diff --git a/src/TNL/Timer.hpp b/src/TNL/Timer.hpp index 14fc3202c0b0bcef23826b882409649920628b85..6f62f6eae51941134e5b60589dc3aaf75f64ebaf 100644 --- a/src/TNL/Timer.hpp +++ b/src/TNL/Timer.hpp @@ -121,7 +121,8 @@ Timer::durationToDouble( const Duration& duration ) const inline unsigned long long Timer::rdtsc() const { - unsigned hi, lo; + unsigned hi; + unsigned lo; __asm__ __volatile__( "rdtsc" : "=a"( lo ), "=d"( hi ) ); return ( (unsigned long long) lo ) | ( ( (unsigned long long) hi ) << 32 ); } diff --git a/src/Tools/tnl-decompose-mesh.cpp b/src/Tools/tnl-decompose-mesh.cpp index 7ab9982ddf338519f15d24b90bb64f3218a717f7..4aad8fc7b67e6e42fd22fac989436993d6c2e88d 100644 --- a/src/Tools/tnl-decompose-mesh.cpp +++ b/src/Tools/tnl-decompose-mesh.cpp @@ -321,7 +321,8 @@ decompose_and_save( const Mesh& mesh, IndexArray seed_to_cell_index( cellsCount ); for( unsigned p = 0; p < nparts; p++ ) { Index assigned = 0; - std::set< Index > boundary, ghost_neighbors; + std::set< Index > boundary; + std::set< Index > ghost_neighbors; for( Index local_idx = 0; local_idx < cells_counts[ p ]; local_idx++ ) { const Index global_idx = cells_local_to_global[ cells_offsets[ p ] + local_idx ]; const auto& cell = mesh.template getEntity< typename Mesh::Cell >( global_idx ); @@ -519,7 +520,8 @@ decompose_and_save( const Mesh& mesh, seeds_global_indices.shrink_to_fit(); // create "vtkGhostType" CellData and PointData arrays - see https://blog.kitware.com/ghost-and-blanking-visibility-changes/ - Containers::Array< std::uint8_t, Devices::Sequential, Index > cellGhosts( seeds.size() ), pointGhosts( points.getSize() ); + Containers::Array< std::uint8_t, Devices::Sequential, Index > cellGhosts( seeds.size() ); + Containers::Array< std::uint8_t, Devices::Sequential, Index > pointGhosts( points.getSize() ); for( Index i = 0; i < cells_counts[ p ]; i++ ) cellGhosts[ i ] = 0; for( Index i = cells_counts[ p ]; i < (Index) seeds.size(); i++ ) @@ -619,7 +621,8 @@ void run( const Mesh& mesh, const Config::ParameterContainer& parameters ) // get the mesh connectivity information in a format suitable for METIS. Actually, the same // format is used by the XML-based VTK formats - the only difference is that METIS requires // `offsets` to start with 0. - std::vector< idx_t > connectivity, offsets; + std::vector< idx_t > connectivity; + std::vector< idx_t > offsets; offsets.push_back(0); const Index cellsCount = mesh.template getEntitiesCount< typename Mesh::Cell >(); for( Index i = 0; i < cellsCount; i++ ) {