]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make n_nonzero_elements inlined, since it is now heavily used in time-critical functi...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Nov 1999 08:56:52 +0000 (08:56 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Nov 1999 08:56:52 +0000 (08:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@1866 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_matrix.h
deal.II/lac/source/sparse_matrix.cc

index e2b0f35155f871e3a6963e0a81a3e1a561a0ea0f..561f76765444759d1d01cc5adc7670161a3b5e42 100644 (file)
@@ -1302,6 +1302,16 @@ SparseMatrixStruct::column_number (const unsigned int row,
 
   return colnums[rowstart[row]+index];
 }
+
+
+inline
+unsigned int
+SparseMatrixStruct::n_nonzero_elements () const
+{
+  Assert ((rowstart!=0) && (colnums!=0), ExcEmptyObject());  
+  Assert (compressed, ExcNotCompressed());
+  return rowstart[rows]-rowstart[0];
+};
  
 
 template <typename number>
index d0e3554cb3ad7d594c599c4f1d151759a9c92256..5c3264d0d5f938df1d50e6115f35ff5238d53648 100644 (file)
@@ -553,11 +553,4 @@ SparseMatrixStruct::bandwidth () const
 
 
 
-unsigned int
-SparseMatrixStruct::n_nonzero_elements () const {
-  Assert ((rowstart!=0) && (colnums!=0), ExcEmptyObject());  
-  Assert (compressed, ExcNotCompressed());
-  return rowstart[rows]-rowstart[0];
-};
-
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.