Loading src/TNL/Meshes/GridDetails/Grid1D.h +0 −10 Original line number Diff line number Diff line Loading @@ -181,16 +181,6 @@ class Grid< 1, Real, Device, Index > : public Object __cuda_callable__ inline RealType getSmallestSpaceStep() const; template< typename GridFunction > typename GridFunction::RealType getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const; void setDistMesh(DistributedMeshType * distMesh); DistributedMeshType * getDistributedMesh() const; Loading src/TNL/Meshes/GridDetails/Grid1D_impl.h +0 −45 Original line number Diff line number Diff line Loading @@ -290,51 +290,6 @@ getSmallestSpaceStep() const return this->spaceSteps.x(); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 1, Real, Device, Index >::getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const { typename GridFunction::RealType maxDiff( -1.0 ); Cell cell( *this ); for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); maxDiff = max( maxDiff, abs( f1[ c ] - f2[ c ] ) ); } return maxDiff; } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 1, Real, Device, Index >::getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const { typedef typename GridFunction::RealType FunctionRealType; FunctionRealType lpNorm( 0.0 ), cellVolume( this->getSpaceSteps().x() ); Cell cell( *this ); for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); lpNorm += ::pow( abs( f1[ c ] - f2[ c ] ), p ); } lpNorm *= cellVolume; return ::pow( lpNorm, 1.0 / p ); } template< typename Real, typename Device, typename Index > Loading src/TNL/Meshes/GridDetails/Grid2D.h +0 −16 Original line number Diff line number Diff line Loading @@ -174,22 +174,6 @@ class Grid< 2, Real, Device, Index > : public Object inline RealType getSmallestSpaceStep() const; template< typename GridFunction > typename GridFunction::RealType getAbsMax( const GridFunction& f ) const; template< typename GridFunction > typename GridFunction::RealType getLpNorm( const GridFunction& f, const typename GridFunction::RealType& p ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const; void setDistMesh(DistributedMeshType * distGrid); DistributedMeshType * getDistributedMesh() const; Loading src/TNL/Meshes/GridDetails/Grid2D_impl.h +0 −70 Original line number Diff line number Diff line Loading @@ -348,76 +348,6 @@ Real Grid< 2, Real, Device, Index > :: getSmallestSpaceStep() const return min( this->spaceSteps.x(), this->spaceSteps.y() ); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getAbsMax( const GridFunction& f ) const { return f.absMax(); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getLpNorm( const GridFunction& f1, const typename GridFunction::RealType& p ) const { typename GridFunction::RealType lpNorm( 0.0 ); Cell cell( *this ); for( cell.getCoordinates().y() = 0; cell.getCoordinates().y() < getDimensions().y(); cell.getCoordinates().y()++ ) for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); lpNorm += ::pow( abs( f1[ c ] ), p ); } lpNorm *= this->getSpaceSteps().x() * this->getSpaceSteps().y(); return ::pow( lpNorm, 1.0/p ); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const { return TNL::max( TNL::abs( f1.getData() - f2.getData() ) ); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const { typename GridFunction::RealType lpNorm( 0.0 ); Cell cell( *this ); for( cell.getCoordinates().y() = 0; cell.getCoordinates().y() < getDimensions().y(); cell.getCoordinates().y()++ ) for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); lpNorm += ::pow( abs( f1[ c ] - f2[ c ] ), p ); } lpNorm *= this->getSpaceSteps().x() * this->getSpaceSteps().y(); return ::pow( lpNorm, 1.0 / p ); } template< typename Real, typename Device, typename Index > Loading src/TNL/Meshes/GridDetails/Grid3D.h +0 −16 Original line number Diff line number Diff line Loading @@ -179,22 +179,6 @@ class Grid< 3, Real, Device, Index > : public Object __cuda_callable__ RealType getSmallestSpaceStep() const; template< typename GridFunction > typename GridFunction::RealType getAbsMax( const GridFunction& f ) const; template< typename GridFunction > typename GridFunction::RealType getLpNorm( const GridFunction& f, const typename GridFunction::RealType& p ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const; /** * \brief See Grid1D::save( File& file ) const. */ Loading Loading
src/TNL/Meshes/GridDetails/Grid1D.h +0 −10 Original line number Diff line number Diff line Loading @@ -181,16 +181,6 @@ class Grid< 1, Real, Device, Index > : public Object __cuda_callable__ inline RealType getSmallestSpaceStep() const; template< typename GridFunction > typename GridFunction::RealType getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const; void setDistMesh(DistributedMeshType * distMesh); DistributedMeshType * getDistributedMesh() const; Loading
src/TNL/Meshes/GridDetails/Grid1D_impl.h +0 −45 Original line number Diff line number Diff line Loading @@ -290,51 +290,6 @@ getSmallestSpaceStep() const return this->spaceSteps.x(); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 1, Real, Device, Index >::getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const { typename GridFunction::RealType maxDiff( -1.0 ); Cell cell( *this ); for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); maxDiff = max( maxDiff, abs( f1[ c ] - f2[ c ] ) ); } return maxDiff; } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 1, Real, Device, Index >::getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const { typedef typename GridFunction::RealType FunctionRealType; FunctionRealType lpNorm( 0.0 ), cellVolume( this->getSpaceSteps().x() ); Cell cell( *this ); for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); lpNorm += ::pow( abs( f1[ c ] - f2[ c ] ), p ); } lpNorm *= cellVolume; return ::pow( lpNorm, 1.0 / p ); } template< typename Real, typename Device, typename Index > Loading
src/TNL/Meshes/GridDetails/Grid2D.h +0 −16 Original line number Diff line number Diff line Loading @@ -174,22 +174,6 @@ class Grid< 2, Real, Device, Index > : public Object inline RealType getSmallestSpaceStep() const; template< typename GridFunction > typename GridFunction::RealType getAbsMax( const GridFunction& f ) const; template< typename GridFunction > typename GridFunction::RealType getLpNorm( const GridFunction& f, const typename GridFunction::RealType& p ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const; void setDistMesh(DistributedMeshType * distGrid); DistributedMeshType * getDistributedMesh() const; Loading
src/TNL/Meshes/GridDetails/Grid2D_impl.h +0 −70 Original line number Diff line number Diff line Loading @@ -348,76 +348,6 @@ Real Grid< 2, Real, Device, Index > :: getSmallestSpaceStep() const return min( this->spaceSteps.x(), this->spaceSteps.y() ); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getAbsMax( const GridFunction& f ) const { return f.absMax(); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getLpNorm( const GridFunction& f1, const typename GridFunction::RealType& p ) const { typename GridFunction::RealType lpNorm( 0.0 ); Cell cell( *this ); for( cell.getCoordinates().y() = 0; cell.getCoordinates().y() < getDimensions().y(); cell.getCoordinates().y()++ ) for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); lpNorm += ::pow( abs( f1[ c ] ), p ); } lpNorm *= this->getSpaceSteps().x() * this->getSpaceSteps().y(); return ::pow( lpNorm, 1.0/p ); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const { return TNL::max( TNL::abs( f1.getData() - f2.getData() ) ); } template< typename Real, typename Device, typename Index > template< typename GridFunction > typename GridFunction::RealType Grid< 2, Real, Device, Index >::getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const { typename GridFunction::RealType lpNorm( 0.0 ); Cell cell( *this ); for( cell.getCoordinates().y() = 0; cell.getCoordinates().y() < getDimensions().y(); cell.getCoordinates().y()++ ) for( cell.getCoordinates().x() = 0; cell.getCoordinates().x() < getDimensions().x(); cell.getCoordinates().x()++ ) { IndexType c = this->getEntityIndex( cell ); lpNorm += ::pow( abs( f1[ c ] - f2[ c ] ), p ); } lpNorm *= this->getSpaceSteps().x() * this->getSpaceSteps().y(); return ::pow( lpNorm, 1.0 / p ); } template< typename Real, typename Device, typename Index > Loading
src/TNL/Meshes/GridDetails/Grid3D.h +0 −16 Original line number Diff line number Diff line Loading @@ -179,22 +179,6 @@ class Grid< 3, Real, Device, Index > : public Object __cuda_callable__ RealType getSmallestSpaceStep() const; template< typename GridFunction > typename GridFunction::RealType getAbsMax( const GridFunction& f ) const; template< typename GridFunction > typename GridFunction::RealType getLpNorm( const GridFunction& f, const typename GridFunction::RealType& p ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceAbsMax( const GridFunction& f1, const GridFunction& f2 ) const; template< typename GridFunction > typename GridFunction::RealType getDifferenceLpNorm( const GridFunction& f1, const GridFunction& f2, const typename GridFunction::RealType& p ) const; /** * \brief See Grid1D::save( File& file ) const. */ Loading