Index: trunk/SophyaLib/TArray/basarr.h
===================================================================
--- trunk/SophyaLib/TArray/basarr.h	(revision 804)
+++ trunk/SophyaLib/TArray/basarr.h	(revision 813)
@@ -22,12 +22,23 @@
 public:
   //  To define Array / Matrix memory mapping
-  enum { AutoMemoryMapping = -1, SameMemoryMapping = 0, 
+  enum MemoryMapping { AutoMemoryMapping = -1, SameMemoryMapping = 0, 
 	 CMemoryMapping = 1, FortranMemoryMapping = 2 };
+  //  Vector type
+  enum VectorType {AutoVectorType = -1, SameVectorType = 0, 
+		   ColumnVector = 1, RowVector = 2};
 
-  //    Max Nb of printed elements
-  static void    SetMaxPrint(uint_4 nprt=50);   
-  //   Memory organisation (for matrices)
+  //    Size threshold for parallel routine call
+  static void	 SetOpenMPSizeThreshold(uint_8 thr=200000);
+  static inline uint_8 GetOpenMPSizeThreshold() { return openmp_size_threshold; }
+  //    Max Nb of printed elements and print level
+  static void    SetMaxPrint(uint_4 nprt=50, uint_4 lev=0);   
+  static inline uint_4 GetMaxPrint() { return max_nprt_; }
+  static inline uint_4 GetPrintLevel() { return prt_lev_; }
+
+  //   Memory organisation (for matrices) and vector type
   static short   SetDefaultMemoryMapping(short mm=CMemoryMapping);
   static inline short GetDefaultMemoryMapping() { return default_memory_mapping; }
+  static short   SetDefaultVectorType(short vt=ColumnVector);
+  static inline short GetDefaultVectorType() { return default_vector_type; }
   
   // Creation / destruction 
@@ -53,12 +64,19 @@
   uint_4 MaxSizeKA() const ;
 
-  // memory organisation - packing information
+  // memory organisation 
   inline short  GetMemoryMapping() const 
-                {return ( (marowi_ == 1) ? CMemoryMapping : FortranMemoryMapping) ; }
+                { return ( (marowi_ == 1) ? CMemoryMapping : FortranMemoryMapping) ; }
 
-  inline uint_4 RowsKA() const {return marowi_; }    // Dimension correspondant aux lignes
-  inline uint_4 ColsKA() const {return macoli_; }    // Dimension correspondant aux colonnes
-  inline uint_4 VectKA() const {return veceli_; }    // Dimension corr. aux elts d'un vecteur
+  inline uint_4 RowsKA() const {return marowi_; }    // Dimension des index de lignes
+  inline uint_4 ColsKA() const {return macoli_; }    // Dimension des index de colonnes
+  inline uint_4 VectKA() const {return veceli_; }    // Dimension des index des elts d'un vecteur
+  void          SetMemoryMapping(short mm=AutoMemoryMapping);
 
+  // Vector type   Line or Column vector
+  inline short  GetVectorType() const 
+                { return((marowi_ == veceli_) ? ColumnVector : RowVector); }
+  void          SetVectorType(short vt=AutoVectorType);
+
+  // memory organisation  - packing information
   inline bool   IsPacked() const { return(moystep_ == 1); }
   inline bool   IsPackedX() const { return(step_[0] == 1); }
@@ -76,5 +94,8 @@
   uint_4 MinStepKA() const ;
 
+  // Offset of element ip
   uint_8 Offset(uint_8 ip=0) const ;
+  // Offset of the i'th vector along axe ka 
+  uint_8  Offset(uint_4 ka, uint_8 i) const ;
   inline uint_8  Offset(uint_4 ix, uint_4 iy, uint_4 iz, uint_4 it=0, uint_4 iu=0) const;  
 
@@ -85,5 +106,5 @@
   void           Show(ostream& os, bool si=false) const;
   inline void    Show() const { Show(cout); }
-  virtual string DataType() const = 0;
+  virtual string InfoString() const;
 
 //  Objet DVList info 
@@ -102,5 +123,6 @@
   //  Organisation memoire
   static short SelectMemoryMapping(short mm);
-  void UpdateMemoryMapping(short mm, uint_4 & nx, uint_4 & ny);
+  static short SelectVectorType(short vt);
+  void UpdateMemoryMapping(short mm);
   void UpdateMemoryMapping(BaseArray const & a, short mm);
 
@@ -113,14 +135,17 @@
   uint_4 step_[BASEARRAY_MAXNDIMS];     // two consecutive elements distance in a given dimension 
   uint_4 minstep_;                   // minimal step (in any axes)
-  uint_4 moystep_;                   // mean step 0 non regular steps
+  uint_4 moystep_;                   // mean step if == 0 --> non regular steps
   uint_8 offset_;              // global offset -> position of elem[0] in DataBlock
   uint_4 marowi_, macoli_;     // For matrices, Row index and column index in dimensions
   uint_4 veceli_;              // For vectors,  dimension index = marowi_/macoli_ (Row/Col vectors)
-
+  bool ck_memo_vt_;            // if true, check MemoryOrg./VectorType for CompareSize
   DVList* mInfo;               // Infos (variables) attachees au tableau
 
   static char * ck_op_msg_[6];  // Operation messages for CheckDI() CheckBound()
   static uint_4 max_nprt_;      // Nb maxi d'elements imprimes
+  static uint_4 prt_lev_;        // Niveau de print 0 ou 1
   static short default_memory_mapping;  // Default memory mapping
+  static short default_vector_type;     // Default vector type Row/Column
+  static uint_8 openmp_size_threshold;  // Size limit for parallel routine calls
 };
 
@@ -132,5 +157,5 @@
   if ( (ka < 0) || (ka >= ndim_) ) {
     string txt = "BaseArray::CheckDimensionIndex/Error ";   txt += ck_op_msg_[msg];
-    throw(ParmError(txt));
+    throw(RangeCheckError(txt));
   }
   return(ka);
@@ -142,8 +167,9 @@
        (it >= size_[3]) || (iu >= size_[4]) ) {
     string txt = "BaseArray::CheckArrayBound/Error ";   txt += ck_op_msg_[msg];
-    throw(ParmError(txt));
+    throw(RangeCheckError(txt));
   }
   return;
 }
+
 
 
