src/IntRank2/IntDipVec.cc
/* These next two read functions attempt to read in a series of dipolar 
   interactions whose parameter names are indexed with the prefix [#]. The
   interactions MUST be sequentially labeled, the first one not defined will
   be signal an end of the search. The individual interactions may be indexed
   using two spin indices, suffix (#1, #,2), or interaction indices, suffix 
   (#).

	   Input		IDV	: Dipole interaction vector (this)
	   			filename: Input filename
                                pset    : Parameter set
                                idx     : Parameter index value used for
	  				  prefix [#] in output names
                                warn    : Warning output label
                                           0 = no warnings
                                           1 = warnings
                                          >1 = fatal warnings
	   Output		none	: Dipole interaction vector filled
	  				  with parameters read from file
	  				  or with parameters read from pset
                                          Return true if interaction read   */
These next two read functions attempt to read in a series of dipolar
interactions whose parameter names are indexed with the prefix [#]. The
interactions MUST be sequentially labeled, the first one not defined will
be signal an end of the search. The individual interactions may be indexed
using two spin indices, suffix (#1, #,2), or interaction indices, suffix
(#).


These next two read functions attempt to read in a series of dipolar interactions whose parameter names are indexed with the prefix [ # ] . The interactions MUST be sequentially labeled the first one not defined will be signal an end of the search . The individual interactions may be indexed using two spin indices suffix ( #1 # 2 ) or interaction indices suffix ( # ) .
bool IntDipVec::read(const string& filename, int idx, int warn)
  {
  ParameterSet pset;			
  if(!pset.read(filename, warn?1:0))	
     {   
     if(warn)
       {
       IDVerror(101, filename, 1);	
       if(warn > 1) IDVfatal(21);	
       else         IDVerror(21);	
       }
     return false;
     }
  if(!read(pset, idx, warn))
     {
     if(warn)
       {
       IDVerror(101, filename, 1);	
       if(warn > 1) IDVfatal(21);	
       else         IDVerror(21);	
       }
     return false;
     }
  return true;
  }
bool IntDipVec :: read ( const string & filename , int idx , int warn ) { ParameterSet pset ; if ( ! pset . read ( filename , warn ? 1 : 0 ) ) { if ( warn ) { IDVerror ( 101 , filename , 1 ) ; if ( warn > 1 ) IDVfatal ( 21 ) ; else IDVerror ( 21 ) ; } return false ; } if ( ! read ( pset , idx , warn ) ) { if ( warn ) { IDVerror ( 101 , filename , 1 ) ; if ( warn > 1 ) IDVfatal ( 21 ) ; else IDVerror ( 21 ) ; } return false ; } return true ; }
These next two read functions attempt to read in a series of dipolar
interactions whose parameter names are indexed with the prefix [#].
These next two read functions attempt to read in a series of dipolar interactions whose parameter names are indexed with the prefix [ # ] .
// Declare a parameter set // Read in pset from file //      Problems with file  //      Its a fatal error  //	or a warning issued //      Problems with file  //      Its a fatal error  //	or a warning issued