Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

force_arg.C

Go to the documentation of this file.
00001 #include <util/qcdio.h>
00002 #include <alg/force_arg.h>
00003 
00004 CPS_START_NAMESPACE
00005 
00006 ForceArg::ForceArg() : cname("ForceArg"), L1(0.0), L2(0.0), Linf(0.0)
00007 {
00008 //  char *fname="ForceArg()";
00009 //  printf("%s::%s: allocated (%p)\n",cname,fname,this);
00010 }
00011 
00012 ForceArg::ForceArg(Float L1, Float L2, Float Linf) : cname("ForceArg"), L1(fabs(L1)), L2(fabs(L2)), Linf(fabs(Linf))
00013 {
00014 //  char *fname="ForceArg()";
00015 //  printf("%s::%s: allocated (%p)\n",cname,fname,this);
00016 }
00017 
00018 ForceArg::~ForceArg()
00019 {
00020 //  char *fname="~ForceArg()";
00021 //  printf("%s::%s: deallocated (%p)\n",cname,fname,this);
00022 }
00023 
00024 
00025 void ForceArg::print(Float dt, char *label) {
00026   char *fname = "print(Float, char*)";
00027   FILE *fp;
00028   
00029 #if TARGET==cpsMPI
00030   using MPISCU::fprintf;
00031 #endif
00032   
00033   // Print out monitor info
00034   //---------------------------------------------------------------
00035   if( (fp = Fopen("force.dat", "a")) == NULL ) {
00036     ERR.FileA(cname,fname, "force.dat");
00037   }
00038   Fprintf(fp,"%s L1 = %e L2 = %e Linf = %e dt = %f\n", 
00039           label, (IFloat)L1, (IFloat)L2, (IFloat)Linf, (IFloat)dt);
00040   Fclose(fp);
00041     
00042 }
00043 
00044 CPS_END_NAMESPACE

Generated on Sat Oct 10 14:11:17 2009 for Columbia Physics System by  doxygen 1.3.9.1