@@ -2778,10 +2778,13 @@ template<typename R> AnyType BlockMatrix<R>::operator()(Stack s) const
2778
2778
2779
2779
cnjij = false ;
2780
2780
KN<long > Oi (N+1 ), Oj (M+1 );
2781
+ KN<bool > Zi (N,false ), Zj (M,false );
2782
+
2781
2783
if (verbosity>9 ) { cout << " Build Block Matrix : " << N << " x " << M << endl;}
2782
2784
Bij = (L) 0 ;
2783
2785
Oi = (long ) 0 ;
2784
2786
Oj = (long )0 ;
2787
+
2785
2788
for (int i=0 ;i<N;++i)
2786
2789
for (int j=0 ;j<M;++j)
2787
2790
{
@@ -2818,7 +2821,8 @@ template<typename R> AnyType BlockMatrix<R>::operator()(Stack s) const
2818
2821
nm = get_NM ( *Bij (i,j));
2819
2822
else if (Fij (i,j))
2820
2823
nm = make_pair<long ,long >(Fij (i,j)->N (), Fij (i,j)->M ());
2821
-
2824
+ else
2825
+ Zi (i)=Zj (j)=true ;
2822
2826
if (( nm.first || nm.second ) && verbosity>3 )
2823
2827
cout << " Block [ " << i << " ," << j << " ] = " << nm.first << " x " << nm.second << " cnj = " << cnjij (i,j) << endl;
2824
2828
if (nm.first )
@@ -2845,22 +2849,20 @@ template<typename R> AnyType BlockMatrix<R>::operator()(Stack s) const
2845
2849
2846
2850
if (err) ExecError (" Error Block Matrix, size sub matrix" );
2847
2851
// gestion of zero block ????
2848
- /* remove for block of size 0 june 13 2025 PHT and FH
2852
+ /* remove for block of size 0 june 13 2025 PHT and FH */
2849
2853
for (int j=0 ;j<M;++j)
2850
2854
{ if (verbosity>99 ) cout << j << " column size" << Oj (j+1 ) << endl;
2851
- if ( Oj(j+1) ==0) {
2855
+ if ( Oj (j+1 ) ==0 && Zj (j))
2852
2856
Oj (j+1 )=1 ;
2853
- if( Oj(j+1) !=1) err++;}
2857
+
2854
2858
}
2855
2859
for (int i=0 ;i<N;++i)
2856
2860
{
2857
2861
if (verbosity>99 ) cout << i << " row size" << Oi (i+1 ) << endl;
2858
- if ( Oi(i+1) ==0) {
2862
+ if ( Oi (i+1 ) ==0 && Zi (i))
2859
2863
Oi (i+1 )=1 ;
2860
- if( Oi(i+1) !=1) err++;}
2861
2864
}
2862
- if (err) ExecError("Error Block Matrix with 0 line or 0 colomn..");
2863
- */
2865
+
2864
2866
for (int i=0 ;i<N;++i)
2865
2867
Oi (i+1 ) += Oi (i);
2866
2868
for (int j=0 ;j<M;++j) // correct 10/01/2007 FH
0 commit comments