From d5e00c3c51bd21f724d3620f3c6d4869561e10f2 Mon Sep 17 00:00:00 2001
From: Gauthier Becker <gauthierbecker@gmail.com>
Date: Sun, 20 Feb 2011 16:17:41 +0000
Subject: [PATCH] Create a cohesive law (linear elastic law with fracture is
 removed so benchmarks has to update) Add function on fullMatrix to assemble
 matrix by perturbations

---
 Numeric/fullMatrix.cpp | 2 +-
 Numeric/fullMatrix.h   | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Numeric/fullMatrix.cpp b/Numeric/fullMatrix.cpp
index 459efeddb7..b47830f41f 100644
--- a/Numeric/fullMatrix.cpp
+++ b/Numeric/fullMatrix.cpp
@@ -158,7 +158,7 @@ void fullMatrix<std::complex<double> >::multAddy(const fullVector<std::complex<d
 
 
 template<>
-void fullMatrix<double>::multOnBlock(const fullMatrix<double> &b, const int ncol, const int fcol, const int alpha_, const int beta_, fullVector<double> &c,const int row) const
+void fullMatrix<double>::multOnBlock(const fullMatrix<double> &b, const int ncol, const int fcol, const int alpha_, const int beta_, fullVector<double> &c) const
 {
   int M = 1, N = ncol, K = b.size1() ;
   int LDA = _r, LDB = b.size1(), LDC = 1;
diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h
index 04169163c3..cc5fa06173 100644
--- a/Numeric/fullMatrix.h
+++ b/Numeric/fullMatrix.h
@@ -526,7 +526,7 @@ class fullMatrix
       for(int k = 0; k < _c ; k++)
           c._data[j] += alpha*(*this)(row, k) * b(k, j);
   }
-  void multOnBlock(const fullMatrix<scalar> &b, const int ncol, const int fcol, const int alpha, const int beta, fullVector<scalar> &c,const int row=0) const
+  void multOnBlock(const fullMatrix<scalar> &b, const int ncol, const int fcol, const int alpha, const int beta, fullVector<scalar> &c) const
 #if !defined(HAVE_BLAS)
   {
     mult_naiveBlock(b,ncol,fcol,alpha,beta,c);
@@ -545,6 +545,12 @@ class fullMatrix
 #endif
   ;
 
+  void copyOneColumn(const fullVector<scalar> &x, const int ind) const
+  {
+    int cind = _c*ind;
+    for(int i = 0; i < _r; i++)
+     _data[cind+i] = x(i);
+  }
 
   static void registerBindings(binding *b);
 };
-- 
GitLab