src/IntRank2/IntRank2A.cc
/* These functions return spatial tensor components in string format.  This is
   done to facilitate printing, in particular printing of spatial tensors from
   within rank 2 interactions.

           Input                IR2A    : Rank 2 spatial tensor (this)
                                CSF     : Float print format (e.g. "%6.3f")
           Output               CSS     : Pointer to array of strings


     SphA2Strings               A    = xx.xxx
       Output                    2,0
                                A    = xx.xxx
                                 2,1
                                A    = xx.xxx
                                 2,-1
                                A    = xx.xxx
                                 2,2
                                A    = xx.xxx
                                 2,-2                                        */
These functions return spatial tensor components in string format.  This is
done to facilitate printing, in particular printing of spatial tensors from
within rank 2 interactions.

Input                IR2A    : Rank 2 spatial tensor (this)
CSF     : Float print format
Output               CSS     : Pointer to array of strings


These functions return spatial tensor components in string format . This is done to facilitate printing in particular printing of spatial tensors from within rank 2 interactions . Input IR2A : Rank 2 spatial tensor ( this ) CSF : Float print format Output CSS : Pointer to array of strings
vector<string> IntRank2A::SphA2Strings() const
  {
  vector<string> Sphstrings(10);
  string Aeq("A    = ");
  string Mcm(" 2,");
  string Top;
  string Bottom;
  string mlabs[5]={"0 ","1 ","-1","2 ","-2"};	
  int    mvals[5]={0,1,-1,2,-2};		
  for(int m=0; m<5; m++)			
    {
    Top    = Aeq;
    Bottom = Mcm + mlabs[m];
    if(fabs(Im(Acomp(mvals[m]))) > 1.e-6) 	
      Top += string("(") 
          += string(Gform("%6.3f", Re(Acomp(mvals[m]))))
          += string(" ")
          += string(Gform("%6.3f", Im(Acomp(mvals[m]))))
          += string(")");
    else
      Top += Gform("%6.3f", Re(Acomp(mvals[m])))
          +  string(9, ' ');
    Bottom += string(Top.length()-Bottom.length(), ' ');
    Sphstrings[2*m]   = Top;
    Sphstrings[2*m+1] = Bottom;
    }
  return Sphstrings;
  }
vector < string > IntRank2A :: SphA2Strings ( ) const { vector < string > Sphstrings ( 10 ) ; string Aeq ( " " ) ; string Mcm ( " " ) ; string Top ; string Bottom ; string mlabs [ 5 ] = { " " , " " , " " , " " , " " } ; int mvals [ 5 ] = { 0 , 1 , -1 , 2 , -2 } ; for ( int m = 0 ; m < 5 ; m ++ ) { Top = Aeq ; Bottom = Mcm + mlabs [ m ] ; if ( fabs ( Im ( Acomp ( mvals [ m ] ) ) ) > 1.e-6 ) Top += string ( " " ) += string ( Gform ( " " , Re ( Acomp ( mvals [ m ] ) ) ) ) += string ( " " ) += string ( Gform ( " " , Im ( Acomp ( mvals [ m ] ) ) ) ) += string ( " " ) ; else Top += Gform ( " " , Re ( Acomp ( mvals [ m ] ) ) ) + string ( 9 , ' ' ) ; Bottom += string ( Top . length ( ) - Bottom . length ( ) , ' ' ) ; Sphstrings [ 2 * m ] = Top ; Sphstrings [ 2 * m + 1 ] = Bottom ; } return Sphstrings ; }
These functions return spatial tensor components in string format.
These functions return spatial tensor components in string format .
// Labels for m // Values for m // Loop 5 m components // This for a complex value // This for a real value