src/IntRank2/SolidSys.cc
// ----------------------------------------------------------------------------
//    Functions To Output Solid State System To ASCII From A Parameter Set
// ----------------------------------------------------------------------------
Functions To Output Solid State System To ASCII From A Parameter Set
Functions To Output Solid State System To ASCII From A Parameter Set
int solid_sys::write(const string &fileout, int idx, int warn) const
  {
  if(!spins()) return 1;		
  ofstream ofstr(fileout.c_str());	
  int w2 = 0;                           
  if(warn) w2 = 1;
  if(!write(ofstr, idx, w2))            
    {
    if(warn==1) ssys_error(1,fileout);	
    else if(warn)
      {
      ssys_error(1,fileout,1);		
      ssys_fatal(20);		
      }
    return 0;
    }
  ofstr.close();                        
  return 1;
  }
int solid_sys :: write ( const string & fileout , int idx , int warn ) const { if ( ! spins ( ) ) return 1 ; ofstream ofstr ( fileout . c_str ( ) ) ; int w2 = 0 ; if ( warn ) w2 = 1 ; if ( ! write ( ofstr , idx , w2 ) ) { if ( warn == 1 ) ssys_error ( 1 , fileout ) ; else if ( warn ) { ssys_error ( 1 , fileout , 1 ) ; ssys_fatal ( 20 ) ; } return 0 ; } ofstr . close ( ) ; return 1 ; }
Functions To Output Solid State System To ASCII From A Parameter Set
Functions To Output Solid State System To ASCII From A Parameter Set
// Input		ssys	: Solid spin system (this) //                      fileout	: Output file name //                      idx     : Parameter index value used for //                                prefix [#] in output names //                      warn    : Warning level // Output               none    : Solid state system is written //                                as a parameter set to file fileout // Nothing if no spins // Open filename for input // Added warning level // If file bad then exit // Problems with file // Problems with file // Fatal error // Close it now