diff --git a/FunctionSpace/CMakeLists.txt b/FunctionSpace/CMakeLists.txt index 8f229bd95c544217899121d68ee3d6613d5b957e..7ac05285d61c7aad02fcf915611313fe04d0d6e1 100644 --- a/FunctionSpace/CMakeLists.txt +++ b/FunctionSpace/CMakeLists.txt @@ -4,7 +4,6 @@ # bugs and problems to <gmsh@geuz.org>. set(SRC - VectorDouble.cpp VectorPolynomial.cpp Polynomial.cpp Legendre.cpp @@ -22,5 +21,5 @@ set(SRC file(GLOB HDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h) append_gmsh_src(FunctionSpace "${SRC};${HDR}") -## Compatibility wicth SmallFEM (TO BE REMOVED !!!) -add_sources_in_gmsh(FunctionSpace "${SRC}") \ No newline at end of file +## Compatibility with SmallFEM (TO BE REMOVED !!!) +add_sources_in_gmsh(FunctionSpace "${SRC}") diff --git a/FunctionSpace/Vector.h b/FunctionSpace/Vector.h index b808b73a74967b883ae78bf174f4a715d6ed8b43..361a16c263fa2a975f4896be3c3862c39058f8fb 100644 --- a/FunctionSpace/Vector.h +++ b/FunctionSpace/Vector.h @@ -7,6 +7,7 @@ extern "C"{ #include <cblas.h> } +#include "fullMatrix.h" #include "Exception.h" /** @@ -49,7 +50,7 @@ class Vector{ T get(const int i) const; void set(const int i, const T a); - Vector<double> at(const double x, const double y, const double z) const; + fullVector<double> at(const double x, const double y, const double z) const; Vector<T> operator+(const Vector<T>& other); Vector<T> operator-(const Vector<T>& other); @@ -223,13 +224,4 @@ inline void Vector<T>::set(const int i, const T a){ v[i] = a; } -////////////////////////////////////////////////////////////////////// -// Inline Vector<double> Implementations // -////////////////////////////////////////////////////////////////////// - -template<> -inline double Vector<double>::dot(const Vector<double>& v) const{ - return cblas_ddot(N, (*this).v, 1, v.v, 1); -} - #endif diff --git a/FunctionSpace/VectorDouble.cpp b/FunctionSpace/VectorDouble.cpp deleted file mode 100644 index a0c1dcbe98d975cb5a352d609b4ad3af0e47dfcd..0000000000000000000000000000000000000000 --- a/FunctionSpace/VectorDouble.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include <sstream> -#include "Vector.h" - -using namespace std; - -template<> -void Vector<double>::allToZero(void){ - for(int i = 0; i < N; i++) - v[i] = 0.0; -} - -template<> -void Vector<double>::add(const Vector<double>& b){ - if(this->N != b.N) - throw Exception("Vectors must be with of the same size"); - - for(int i = 0; i < N; i++) - v[i] += b.v[i]; -} - -template<> -void Vector<double>::sub(const Vector<double>& b){ - if(this->N != b.N) - throw Exception("Vectors must be with of the same size"); - - for(int i = 0; i < N; i++) - v[i] -= b.v[i]; -} - -template<> -void Vector<double>::mul(const double& alpha){ - for(int i = 0; i < N; i++) - v[i] *= alpha; -} - -template<> -string Vector<double>::toString(void) const{ - stringstream s; - - for(int i = 0; i < N; i++) - s << scientific << showpos << v[i] << endl; - - return s.str(); -} diff --git a/FunctionSpace/VectorPolynomial.cpp b/FunctionSpace/VectorPolynomial.cpp index 7cd83e08dc5e1b678737e20406763ba1715e3683..9aa3d249c50900e502fe3b03d1a391b286f1a601 100644 --- a/FunctionSpace/VectorPolynomial.cpp +++ b/FunctionSpace/VectorPolynomial.cpp @@ -5,10 +5,10 @@ using namespace std; template<> -Vector<double> Vector<Polynomial>::at(const double x, - const double y, - const double z) const{ - Vector<double> val(N); +fullVector<double> Vector<Polynomial>::at(const double x, + const double y, + const double z) const{ + fullVector<double> val(N); for(int i = 0; i < N; i++) val(i) = v[i].at(x, y, z);