diff --git a/src/TNL/Containers/Algorithms/VectorOperations.h b/src/TNL/Containers/Algorithms/VectorOperations.h index 3a71dc720e65410aababfac25dedecaf45f5b436..948751842335dd003ffbb80e1213241e122cb09e 100644 --- a/src/TNL/Containers/Algorithms/VectorOperations.h +++ b/src/TNL/Containers/Algorithms/VectorOperations.h @@ -26,17 +26,6 @@ template<> class VectorOperations< Devices::Host > { public: - template< typename Vector > - static void addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value ); - - template< typename Vector, typename Scalar > - static void addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value, - const Scalar thisElementMultiplicator ); - template< typename Vector, typename ResultType = typename Vector::RealType > static ResultType getVectorSum( const Vector& v ); @@ -57,17 +46,6 @@ template<> class VectorOperations< Devices::Cuda > { public: - template< typename Vector > - static void addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value ); - - template< typename Vector, typename Scalar > - static void addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value, - const Scalar thisElementMultiplicator ); - template< typename Vector, typename ResultType = typename Vector::RealType > static ResultType getVectorSum( const Vector& v ); diff --git a/src/TNL/Containers/Algorithms/VectorOperationsCuda_impl.h b/src/TNL/Containers/Algorithms/VectorOperationsCuda_impl.h index b4c1b61a253157d190500d6e5ca567a2a5bbd644..0deea8196f78f7a1660c9143e5c78abbfa27cd73 100644 --- a/src/TNL/Containers/Algorithms/VectorOperationsCuda_impl.h +++ b/src/TNL/Containers/Algorithms/VectorOperationsCuda_impl.h @@ -18,27 +18,6 @@ namespace TNL { namespace Containers { namespace Algorithms { -template< typename Vector > -void -VectorOperations< Devices::Cuda >:: -addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value ) -{ - v[ i ] += value; -} - -template< typename Vector, typename Scalar > -void -VectorOperations< Devices::Cuda >:: -addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value, - const Scalar thisElementMultiplicator ) -{ - v[ i ] = thisElementMultiplicator * v[ i ] + value; -} - template< typename Vector, typename ResultType > ResultType VectorOperations< Devices::Cuda >:: diff --git a/src/TNL/Containers/Algorithms/VectorOperationsHost_impl.h b/src/TNL/Containers/Algorithms/VectorOperationsHost_impl.h index 81c978f32d59f31cab0cc6e084aafabb3433d843..286e4f7b75006f2e817dcbf37bd841b59f98c959 100644 --- a/src/TNL/Containers/Algorithms/VectorOperationsHost_impl.h +++ b/src/TNL/Containers/Algorithms/VectorOperationsHost_impl.h @@ -17,27 +17,6 @@ namespace TNL { namespace Containers { namespace Algorithms { -template< typename Vector > -void -VectorOperations< Devices::Host >:: -addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value ) -{ - v[ i ] += value; -} - -template< typename Vector, typename Scalar > -void -VectorOperations< Devices::Host >:: -addElement( Vector& v, - const typename Vector::IndexType i, - const typename Vector::RealType& value, - const Scalar thisElementMultiplicator ) -{ - v[ i ] = thisElementMultiplicator * v[ i ] + value; -} - template< typename Vector, typename ResultType > ResultType VectorOperations< Devices::Host >:: diff --git a/src/TNL/Containers/DistributedVector.h b/src/TNL/Containers/DistributedVector.h index 9a9f107a275751b196a598fd024697a4c68d7fc7..7ac6733d7fac928d1dd94d9054387d210153a47f 100644 --- a/src/TNL/Containers/DistributedVector.h +++ b/src/TNL/Containers/DistributedVector.h @@ -77,14 +77,6 @@ public: /* * Usual Vector methods follow below. */ - void addElement( IndexType i, - RealType value ); - - template< typename Scalar > - void addElement( IndexType i, - RealType value, - Scalar thisElementMultiplicator ); - template< typename Scalar, typename..., typename = std::enable_if_t< ! HasSubscriptOperator<Scalar>::value > > diff --git a/src/TNL/Containers/DistributedVector.hpp b/src/TNL/Containers/DistributedVector.hpp index 45a6faef7dfa90e0b47e5a683839c957241a04f6..f09a5a2f1e672151eca45b113b5d351d1e770af9 100644 --- a/src/TNL/Containers/DistributedVector.hpp +++ b/src/TNL/Containers/DistributedVector.hpp @@ -116,40 +116,6 @@ getTypeVirtual() const * Usual Vector methods follow below. */ -template< typename Real, - typename Device, - typename Index, - typename Communicator > -void -DistributedVector< Real, Device, Index, Communicator >:: -addElement( IndexType i, - RealType value ) -{ - if( this->getCommunicationGroup() != CommunicatorType::NullGroup ) { - const IndexType li = this->getLocalRange().getLocalIndex( i ); - LocalViewType view = getLocalView(); - view.addElement( li, value ); - } -} - -template< typename Real, - typename Device, - typename Index, - typename Communicator > - template< typename Scalar > -void -DistributedVector< Real, Device, Index, Communicator >:: -addElement( IndexType i, - RealType value, - Scalar thisElementMultiplicator ) -{ - if( this->getCommunicationGroup() != CommunicatorType::NullGroup ) { - const IndexType li = this->getLocalRange().getLocalIndex( i ); - LocalViewType view = getLocalView(); - view.addElement( li, value, thisElementMultiplicator ); - } -} - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Containers/DistributedVectorView.h b/src/TNL/Containers/DistributedVectorView.h index f696a3e5601093fcd6f6abc50bcb4a526b8ea075..649d0fa57ed12603a562c061f7ceac8a2f3404f5 100644 --- a/src/TNL/Containers/DistributedVectorView.h +++ b/src/TNL/Containers/DistributedVectorView.h @@ -77,14 +77,6 @@ public: /* * Usual Vector methods follow below. */ - void addElement( IndexType i, - RealType value ); - - template< typename Scalar > - void addElement( IndexType i, - RealType value, - Scalar thisElementMultiplicator ); - template< typename Scalar, typename..., typename = std::enable_if_t< ! HasSubscriptOperator<Scalar>::value > > diff --git a/src/TNL/Containers/DistributedVectorView.hpp b/src/TNL/Containers/DistributedVectorView.hpp index 7afaee27619c0af4f75d9ac6c16643a88a6d7c55..6da3389c8461e684c8645f8a99a09922478bc7ef 100644 --- a/src/TNL/Containers/DistributedVectorView.hpp +++ b/src/TNL/Containers/DistributedVectorView.hpp @@ -86,40 +86,6 @@ getType() * Usual Vector methods follow below. */ -template< typename Real, - typename Device, - typename Index, - typename Communicator > -void -DistributedVectorView< Real, Device, Index, Communicator >:: -addElement( IndexType i, - RealType value ) -{ - if( this->getCommunicationGroup() != CommunicatorType::NullGroup ) { - const IndexType li = this->getLocalRange().getLocalIndex( i ); - LocalViewType view = getLocalView(); - view.addElement( li, value ); - } -} - -template< typename Real, - typename Device, - typename Index, - typename Communicator > - template< typename Scalar > -void -DistributedVectorView< Real, Device, Index, Communicator >:: -addElement( IndexType i, - RealType value, - Scalar thisElementMultiplicator ) -{ - if( this->getCommunicationGroup() != CommunicatorType::NullGroup ) { - const IndexType li = this->getLocalRange().getLocalIndex( i ); - LocalViewType view = getLocalView(); - view.addElement( li, value, thisElementMultiplicator ); - } -} - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Containers/Vector.h b/src/TNL/Containers/Vector.h index e02c9adb5bed28487479ccf679cfe19e884145b8..e75730a48fd93527088f2b2831178b1c7545df41 100644 --- a/src/TNL/Containers/Vector.h +++ b/src/TNL/Containers/Vector.h @@ -112,27 +112,6 @@ public: */ operator ConstViewType() const; - /** - * \brief Adds another element to this vector. - * - * New element has index type \e i and reference to its real type \e value. - */ - [[deprecated("useless method - use getElement and setElement")]] - void addElement( const IndexType i, - const RealType& value ); - - /** - * \brief Adds another element with multiplicator to this vector. - * - * New element has index type \e i and reference to its real type \e value - * multiplied by \e thisElementMultiplicator. - */ - template< typename Scalar > - [[deprecated("useless method - use getElement and setElement")]] - void addElement( const IndexType i, - const RealType& value, - const Scalar thisElementMultiplicator ); - /** * \brief Assigns a vector expression to this vector. */ diff --git a/src/TNL/Containers/Vector.hpp b/src/TNL/Containers/Vector.hpp index dcaf8f2d599c737a57553840178105e0e9179ad4..1c58209fbf633d45c83d5d15425ab1a4076b0baf 100644 --- a/src/TNL/Containers/Vector.hpp +++ b/src/TNL/Containers/Vector.hpp @@ -98,32 +98,6 @@ operator ConstViewType() const return getConstView(); } -template< typename Real, - typename Device, - typename Index, - typename Allocator > -void -Vector< Real, Device, Index, Allocator >:: -addElement( const IndexType i, - const RealType& value ) -{ - Algorithms::VectorOperations< Device >::addElement( *this, i, value ); -} - -template< typename Real, - typename Device, - typename Index, - typename Allocator > - template< typename Scalar > -void -Vector< Real, Device, Index, Allocator >:: -addElement( const IndexType i, - const RealType& value, - const Scalar thisElementMultiplicator ) -{ - Algorithms::VectorOperations< Device >::addElement( *this, i, value, thisElementMultiplicator ); -} - template< typename Real, typename Device, typename Index, diff --git a/src/TNL/Containers/VectorView.h b/src/TNL/Containers/VectorView.h index 8819c59eb5f617d914093cbc1257d36762bc592c..9ccbb7a02e11fb56383fc7a08cba407e2f05b484 100644 --- a/src/TNL/Containers/VectorView.h +++ b/src/TNL/Containers/VectorView.h @@ -84,16 +84,6 @@ public: static String getType(); - // All other Vector methods follow... - [[deprecated("useless method - use getElement and setElement")]] - void addElement( IndexType i, RealType value ); - - template< typename Scalar > - [[deprecated("useless method - use getElement and setElement")]] - void addElement( IndexType i, - RealType value, - Scalar thisElementMultiplicator ); - template< typename VectorExpression, typename..., typename = std::enable_if_t< Expressions::IsExpressionTemplate< VectorExpression >::value > > diff --git a/src/TNL/Containers/VectorView.hpp b/src/TNL/Containers/VectorView.hpp index 49580d5c94c377a96ad244e911f7508fc40cbc10..2d72e74f4e9e2aad5b448387f5570201ae8ed1da 100644 --- a/src/TNL/Containers/VectorView.hpp +++ b/src/TNL/Containers/VectorView.hpp @@ -58,27 +58,6 @@ getType() TNL::getType< Index >() + " >"; } -template< typename Real, - typename Device, - typename Index > -void -VectorView< Real, Device, Index >:: -addElement( IndexType i, RealType value ) -{ - Algorithms::VectorOperations< Device >::addElement( *this, i, value ); -} - -template< typename Real, - typename Device, - typename Index > - template< typename Scalar > -void -VectorView< Real, Device, Index >:: -addElement( IndexType i, RealType value, Scalar thisElementMultiplicator ) -{ - Algorithms::VectorOperations< Device >::addElement( *this, i, value, thisElementMultiplicator ); -} - template< typename Real, typename Device, typename Index >