Loading src/TNL/Containers/StaticVector.h +4 −8 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ class StaticVector : public StaticArray< Size, Real > { public: typedef Real RealType; typedef StaticVector< Size, Real > ThisType; enum { size = Size }; /** Loading Loading @@ -210,7 +209,7 @@ class StaticVector : public StaticArray< Size, Real > * \brief Returns static vector with all elements in absolute value. */ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** * \brief Returns the length of this vector in p-dimensional vector space. Loading Loading @@ -246,7 +245,6 @@ class StaticVector< 1, Real > : public StaticArray< 1, Real > { public: typedef Real RealType; typedef StaticVector< 1, Real > ThisType; enum { size = 1 }; /** \brief See StaticVector::StaticVector().*/ Loading Loading @@ -328,7 +326,7 @@ class StaticVector< 1, Real > : public StaticArray< 1, Real > /** \brief See StaticVector::abs() const.*/ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** \brief See StaticVector::lpNorm( const Real& p ) const.*/ __cuda_callable__ Loading Loading @@ -360,7 +358,6 @@ class StaticVector< 2, Real > : public StaticArray< 2, Real > { public: typedef Real RealType; typedef StaticVector< 2, Real > ThisType; enum { size = 2 }; /** \brief See StaticVector::StaticVector().*/ Loading Loading @@ -451,7 +448,7 @@ class StaticVector< 2, Real > : public StaticArray< 2, Real > /** \brief See StaticVector::abs() const.*/ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** \brief See StaticVector::lpNorm( const Real& p ) const.*/ __cuda_callable__ Loading Loading @@ -483,7 +480,6 @@ class StaticVector< 3, Real > : public StaticArray< 3, Real > { public: typedef Real RealType; typedef StaticVector< 3, Real > ThisType; enum { size = 3 }; /** \brief See StaticVector::StaticVector().*/ Loading Loading @@ -575,7 +571,7 @@ class StaticVector< 3, Real > : public StaticArray< 3, Real > /** \brief See StaticVector::abs() const.*/ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** \brief See StaticVector::lpNorm( const Real& p ) const.*/ __cuda_callable__ Loading src/TNL/Functions/BoundaryMeshFunction.h +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ class BoundaryMeshFunction : public: using BaseType = MeshFunction< Mesh, MeshEntityDimension, Real >; using ThisType = BoundaryMeshFunction< Mesh, MeshEntityDimension, Real >; using typename BaseType::MeshType; using typename BaseType::DeviceType; using typename BaseType::IndexType; Loading src/TNL/Functions/MeshFunction.h +6 −7 Original line number Diff line number Diff line Loading @@ -39,9 +39,8 @@ class MeshFunction : using MeshPointer = Pointers::SharedPointer< MeshType >; using RealType = Real; using VectorType = Containers::Vector< RealType, DeviceType, IndexType >; using ThisType = Functions::MeshFunction< MeshType, MeshEntityDimension, RealType >; using DistributedMeshType = Meshes::DistributedMeshes::DistributedMesh<MeshType>; using DistributedMeshSynchronizerType = Meshes::DistributedMeshes::DistributedMeshSynchronizer<ThisType>; using DistributedMeshSynchronizerType = Meshes::DistributedMeshes::DistributedMeshSynchronizer<MeshFunction>; static constexpr int getEntitiesDimension() { return MeshEntityDimension; } Loading @@ -51,7 +50,7 @@ class MeshFunction : MeshFunction( const MeshPointer& meshPointer ); MeshFunction( const ThisType& meshFunction ); MeshFunction( const MeshFunction& meshFunction ); template< typename Vector > MeshFunction( const MeshPointer& meshPointer, Loading @@ -78,7 +77,7 @@ class MeshFunction : const Config::ParameterContainer& parameters, const String& prefix = "" ); void bind( ThisType& meshFunction ); void bind( MeshFunction& meshFunction ); template< typename Vector > void bind( const Vector& data, Loading Loading @@ -135,13 +134,13 @@ class MeshFunction : const RealType& operator[]( const IndexType& meshEntityIndex ) const; template< typename Function > ThisType& operator = ( const Function& f ); MeshFunction& operator = ( const Function& f ); template< typename Function > ThisType& operator -= ( const Function& f ); MeshFunction& operator -= ( const Function& f ); template< typename Function > ThisType& operator += ( const Function& f ); MeshFunction& operator += ( const Function& f ); RealType getLpNorm( const RealType& p ) const; Loading src/TNL/Functions/MeshFunction_impl.h +11 −11 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ template< typename Mesh, int MeshEntityDimension, typename Real > MeshFunction< Mesh, MeshEntityDimension, Real >:: MeshFunction( const ThisType& meshFunction ) MeshFunction( const MeshFunction& meshFunction ) { setupSynchronizer(meshFunction.meshPointer->getDistributedMesh()); Loading Loading @@ -181,7 +181,7 @@ template< typename Mesh, typename Real > void MeshFunction< Mesh, MeshEntityDimension, Real >:: bind( ThisType& meshFunction ) bind( MeshFunction& meshFunction ) { setupSynchronizer(meshFunction.meshPointer->getDistributedMesh()); Loading Loading @@ -411,9 +411,9 @@ MeshFunction< Mesh, MeshEntityDimension, Real >& MeshFunction< Mesh, MeshEntityDimension, Real >:: operator = ( const Function& f ) { Pointers::DevicePointer< ThisType > thisDevicePtr( *this ); Pointers::DevicePointer< MeshFunction > thisDevicePtr( *this ); Pointers::DevicePointer< typename std::add_const< Function >::type > fDevicePtr( f ); MeshFunctionEvaluator< ThisType, Function >::evaluate( thisDevicePtr, fDevicePtr ); MeshFunctionEvaluator< MeshFunction, Function >::evaluate( thisDevicePtr, fDevicePtr ); return *this; } Loading @@ -425,9 +425,9 @@ MeshFunction< Mesh, MeshEntityDimension, Real >& MeshFunction< Mesh, MeshEntityDimension, Real >:: operator += ( const Function& f ) { Pointers::DevicePointer< ThisType > thisDevicePtr( *this ); Pointers::DevicePointer< MeshFunction > thisDevicePtr( *this ); Pointers::DevicePointer< typename std::add_const< Function >::type > fDevicePtr( f ); MeshFunctionEvaluator< ThisType, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) 1.0 ); MeshFunctionEvaluator< MeshFunction, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) 1.0 ); return *this; } Loading @@ -439,9 +439,9 @@ MeshFunction< Mesh, MeshEntityDimension, Real >& MeshFunction< Mesh, MeshEntityDimension, Real >:: operator -= ( const Function& f ) { Pointers::DevicePointer< ThisType > thisDevicePtr( *this ); Pointers::DevicePointer< MeshFunction > thisDevicePtr( *this ); Pointers::DevicePointer< typename std::add_const< Function >::type > fDevicePtr( f ); MeshFunctionEvaluator< ThisType, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) -1.0 ); MeshFunctionEvaluator< MeshFunction, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) -1.0 ); return *this; } Loading @@ -452,7 +452,7 @@ Real MeshFunction< Mesh, MeshEntityDimension, Real >:: getLpNorm( const RealType& p ) const { return MeshFunctionNormGetter< ThisType >::getNorm( *this, p ); return MeshFunctionNormGetter< MeshFunction >::getNorm( *this, p ); } template< typename Mesh, Loading Loading @@ -520,9 +520,9 @@ write( const String& fileName, return false; } if( format == "vtk" ) return MeshFunctionVTKWriter< ThisType >::write( *this, file, scale ); return MeshFunctionVTKWriter< MeshFunction >::write( *this, file, scale ); else if( format == "gnuplot" ) return MeshFunctionGnuplotWriter< ThisType >::write( *this, file, scale ); return MeshFunctionGnuplotWriter< MeshFunction >::write( *this, file, scale ); else { std::cerr << "Unknown output format: " << format << std::endl; return false; Loading src/TNL/Functions/VectorField.h +3 −4 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, Real > > typedef Pointers::SharedPointer< FunctionType > FunctionPointer; typedef typename MeshType::DeviceType DeviceType; typedef typename MeshType::GlobalIndexType IndexType; typedef VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, RealType > > ThisType; typedef Containers::StaticVector< Size, RealType > VectorType; static constexpr int getEntitiesDimension() { return FunctionType::getEntitiesDimension(); } Loading Loading @@ -177,7 +176,7 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, Real > > return Size * FunctionType::getDofs( meshPointer ); } void bind( ThisType& vectorField ) void bind( VectorField& vectorField ) { for( int i = 0; i < Size; i ++ ) { Loading Loading @@ -303,9 +302,9 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, Real > > return false; } if( format == "vtk" ) return VectorFieldVTKWriter< ThisType >::write( *this, file, scale ); return VectorFieldVTKWriter< VectorField >::write( *this, file, scale ); else if( format == "gnuplot" ) return VectorFieldGnuplotWriter< ThisType >::write( *this, file, scale ); return VectorFieldGnuplotWriter< VectorField >::write( *this, file, scale ); else { std::cerr << "Unknown output format: " << format << std::endl; return false; Loading Loading
src/TNL/Containers/StaticVector.h +4 −8 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ class StaticVector : public StaticArray< Size, Real > { public: typedef Real RealType; typedef StaticVector< Size, Real > ThisType; enum { size = Size }; /** Loading Loading @@ -210,7 +209,7 @@ class StaticVector : public StaticArray< Size, Real > * \brief Returns static vector with all elements in absolute value. */ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** * \brief Returns the length of this vector in p-dimensional vector space. Loading Loading @@ -246,7 +245,6 @@ class StaticVector< 1, Real > : public StaticArray< 1, Real > { public: typedef Real RealType; typedef StaticVector< 1, Real > ThisType; enum { size = 1 }; /** \brief See StaticVector::StaticVector().*/ Loading Loading @@ -328,7 +326,7 @@ class StaticVector< 1, Real > : public StaticArray< 1, Real > /** \brief See StaticVector::abs() const.*/ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** \brief See StaticVector::lpNorm( const Real& p ) const.*/ __cuda_callable__ Loading Loading @@ -360,7 +358,6 @@ class StaticVector< 2, Real > : public StaticArray< 2, Real > { public: typedef Real RealType; typedef StaticVector< 2, Real > ThisType; enum { size = 2 }; /** \brief See StaticVector::StaticVector().*/ Loading Loading @@ -451,7 +448,7 @@ class StaticVector< 2, Real > : public StaticArray< 2, Real > /** \brief See StaticVector::abs() const.*/ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** \brief See StaticVector::lpNorm( const Real& p ) const.*/ __cuda_callable__ Loading Loading @@ -483,7 +480,6 @@ class StaticVector< 3, Real > : public StaticArray< 3, Real > { public: typedef Real RealType; typedef StaticVector< 3, Real > ThisType; enum { size = 3 }; /** \brief See StaticVector::StaticVector().*/ Loading Loading @@ -575,7 +571,7 @@ class StaticVector< 3, Real > : public StaticArray< 3, Real > /** \brief See StaticVector::abs() const.*/ __cuda_callable__ ThisType abs() const; StaticVector abs() const; /** \brief See StaticVector::lpNorm( const Real& p ) const.*/ __cuda_callable__ Loading
src/TNL/Functions/BoundaryMeshFunction.h +0 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ class BoundaryMeshFunction : public: using BaseType = MeshFunction< Mesh, MeshEntityDimension, Real >; using ThisType = BoundaryMeshFunction< Mesh, MeshEntityDimension, Real >; using typename BaseType::MeshType; using typename BaseType::DeviceType; using typename BaseType::IndexType; Loading
src/TNL/Functions/MeshFunction.h +6 −7 Original line number Diff line number Diff line Loading @@ -39,9 +39,8 @@ class MeshFunction : using MeshPointer = Pointers::SharedPointer< MeshType >; using RealType = Real; using VectorType = Containers::Vector< RealType, DeviceType, IndexType >; using ThisType = Functions::MeshFunction< MeshType, MeshEntityDimension, RealType >; using DistributedMeshType = Meshes::DistributedMeshes::DistributedMesh<MeshType>; using DistributedMeshSynchronizerType = Meshes::DistributedMeshes::DistributedMeshSynchronizer<ThisType>; using DistributedMeshSynchronizerType = Meshes::DistributedMeshes::DistributedMeshSynchronizer<MeshFunction>; static constexpr int getEntitiesDimension() { return MeshEntityDimension; } Loading @@ -51,7 +50,7 @@ class MeshFunction : MeshFunction( const MeshPointer& meshPointer ); MeshFunction( const ThisType& meshFunction ); MeshFunction( const MeshFunction& meshFunction ); template< typename Vector > MeshFunction( const MeshPointer& meshPointer, Loading @@ -78,7 +77,7 @@ class MeshFunction : const Config::ParameterContainer& parameters, const String& prefix = "" ); void bind( ThisType& meshFunction ); void bind( MeshFunction& meshFunction ); template< typename Vector > void bind( const Vector& data, Loading Loading @@ -135,13 +134,13 @@ class MeshFunction : const RealType& operator[]( const IndexType& meshEntityIndex ) const; template< typename Function > ThisType& operator = ( const Function& f ); MeshFunction& operator = ( const Function& f ); template< typename Function > ThisType& operator -= ( const Function& f ); MeshFunction& operator -= ( const Function& f ); template< typename Function > ThisType& operator += ( const Function& f ); MeshFunction& operator += ( const Function& f ); RealType getLpNorm( const RealType& p ) const; Loading
src/TNL/Functions/MeshFunction_impl.h +11 −11 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ template< typename Mesh, int MeshEntityDimension, typename Real > MeshFunction< Mesh, MeshEntityDimension, Real >:: MeshFunction( const ThisType& meshFunction ) MeshFunction( const MeshFunction& meshFunction ) { setupSynchronizer(meshFunction.meshPointer->getDistributedMesh()); Loading Loading @@ -181,7 +181,7 @@ template< typename Mesh, typename Real > void MeshFunction< Mesh, MeshEntityDimension, Real >:: bind( ThisType& meshFunction ) bind( MeshFunction& meshFunction ) { setupSynchronizer(meshFunction.meshPointer->getDistributedMesh()); Loading Loading @@ -411,9 +411,9 @@ MeshFunction< Mesh, MeshEntityDimension, Real >& MeshFunction< Mesh, MeshEntityDimension, Real >:: operator = ( const Function& f ) { Pointers::DevicePointer< ThisType > thisDevicePtr( *this ); Pointers::DevicePointer< MeshFunction > thisDevicePtr( *this ); Pointers::DevicePointer< typename std::add_const< Function >::type > fDevicePtr( f ); MeshFunctionEvaluator< ThisType, Function >::evaluate( thisDevicePtr, fDevicePtr ); MeshFunctionEvaluator< MeshFunction, Function >::evaluate( thisDevicePtr, fDevicePtr ); return *this; } Loading @@ -425,9 +425,9 @@ MeshFunction< Mesh, MeshEntityDimension, Real >& MeshFunction< Mesh, MeshEntityDimension, Real >:: operator += ( const Function& f ) { Pointers::DevicePointer< ThisType > thisDevicePtr( *this ); Pointers::DevicePointer< MeshFunction > thisDevicePtr( *this ); Pointers::DevicePointer< typename std::add_const< Function >::type > fDevicePtr( f ); MeshFunctionEvaluator< ThisType, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) 1.0 ); MeshFunctionEvaluator< MeshFunction, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) 1.0 ); return *this; } Loading @@ -439,9 +439,9 @@ MeshFunction< Mesh, MeshEntityDimension, Real >& MeshFunction< Mesh, MeshEntityDimension, Real >:: operator -= ( const Function& f ) { Pointers::DevicePointer< ThisType > thisDevicePtr( *this ); Pointers::DevicePointer< MeshFunction > thisDevicePtr( *this ); Pointers::DevicePointer< typename std::add_const< Function >::type > fDevicePtr( f ); MeshFunctionEvaluator< ThisType, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) -1.0 ); MeshFunctionEvaluator< MeshFunction, Function >::evaluate( thisDevicePtr, fDevicePtr, ( RealType ) 1.0, ( RealType ) -1.0 ); return *this; } Loading @@ -452,7 +452,7 @@ Real MeshFunction< Mesh, MeshEntityDimension, Real >:: getLpNorm( const RealType& p ) const { return MeshFunctionNormGetter< ThisType >::getNorm( *this, p ); return MeshFunctionNormGetter< MeshFunction >::getNorm( *this, p ); } template< typename Mesh, Loading Loading @@ -520,9 +520,9 @@ write( const String& fileName, return false; } if( format == "vtk" ) return MeshFunctionVTKWriter< ThisType >::write( *this, file, scale ); return MeshFunctionVTKWriter< MeshFunction >::write( *this, file, scale ); else if( format == "gnuplot" ) return MeshFunctionGnuplotWriter< ThisType >::write( *this, file, scale ); return MeshFunctionGnuplotWriter< MeshFunction >::write( *this, file, scale ); else { std::cerr << "Unknown output format: " << format << std::endl; return false; Loading
src/TNL/Functions/VectorField.h +3 −4 Original line number Diff line number Diff line Loading @@ -89,7 +89,6 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, Real > > typedef Pointers::SharedPointer< FunctionType > FunctionPointer; typedef typename MeshType::DeviceType DeviceType; typedef typename MeshType::GlobalIndexType IndexType; typedef VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, RealType > > ThisType; typedef Containers::StaticVector< Size, RealType > VectorType; static constexpr int getEntitiesDimension() { return FunctionType::getEntitiesDimension(); } Loading Loading @@ -177,7 +176,7 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, Real > > return Size * FunctionType::getDofs( meshPointer ); } void bind( ThisType& vectorField ) void bind( VectorField& vectorField ) { for( int i = 0; i < Size; i ++ ) { Loading Loading @@ -303,9 +302,9 @@ class VectorField< Size, MeshFunction< Mesh, MeshEntityDimension, Real > > return false; } if( format == "vtk" ) return VectorFieldVTKWriter< ThisType >::write( *this, file, scale ); return VectorFieldVTKWriter< VectorField >::write( *this, file, scale ); else if( format == "gnuplot" ) return VectorFieldGnuplotWriter< ThisType >::write( *this, file, scale ); return VectorFieldGnuplotWriter< VectorField >::write( *this, file, scale ); else { std::cerr << "Unknown output format: " << format << std::endl; return false; Loading