Skip to content

Commit

Permalink
Minor corrections to the output. Now it is consistent throughout ADDA…
Browse files Browse the repository at this point in the history
…. In particular, : is always followed by space, while = typically has no spaces on either side (but in some places is used as " = ").

- Added space between : and size along X in shape description, and space after "CoupleConstant:".
- Removed space after "sphere center r/d=" in description of coated shape.
- Updated tests to ignore these differences when comparing against previous version.
- Fortunately, this doesn't affect parser in `/misc/parse_log`. Still it may potentially affect other parsers.
  • Loading branch information
myurkin committed Oct 14, 2020
1 parent 0c1c0a1 commit 758fea0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/calculator.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ static void CoupleConstant(doublecomplex *mrel,const enum incpol which,doublecom
#undef R3_INDEX
}
}
if (!orient_avg && IFROOT) PrintBoth(logfile, "CoupleConstant:"CFORM3V"\n", REIM3V(res));
if (!orient_avg && IFROOT) PrintBoth(logfile, "CoupleConstant: "CFORM3V"\n", REIM3V(res));
}
else {
double ka,kd2,S;
Expand Down Expand Up @@ -575,11 +575,11 @@ static void CoupleConstant(doublecomplex *mrel,const enum incpol which,doublecom
}
}
if (asym || anisotropy) {
if (!orient_avg && IFROOT) PrintBoth(logfile, "CoupleConstant:"CFORM3V"\n",REIM3V(res));
if (!orient_avg && IFROOT) PrintBoth(logfile, "CoupleConstant: "CFORM3V"\n",REIM3V(res));
}
else {
res[2]=res[1]=res[0];
if (!orient_avg && IFROOT) PrintBoth(logfile,"CoupleConstant:"CFORM"\n",REIM(res[0]));
if (!orient_avg && IFROOT) PrintBoth(logfile,"CoupleConstant: "CFORM"\n",REIM(res[0]));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/make_particle.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern TIME_TYPE Timing_Granul,Timing_GranulComm;
double ZsumShift; // distance between the lowest (in Z) dipoles and its image (in units of d_z)
// used in param.c
bool volcor_used; // volume correction was actually employed
const char *sh_form_str1,*sh_form_str2; // strings for log file with shape parameters
const char *sh_form_str1,*sh_form_str2; // strings for log file with shape parameters (first one should end with :)
size_t gr_N; // number of granules
double gr_vf_real; // actual granules volume fraction
size_t mat_count[MAX_NMAT+1]; // number of dipoles in each domain
Expand Down Expand Up @@ -1556,7 +1556,7 @@ void InitShape(void)
coat_z=sh_pars[3];
if (coat_x*coat_x+coat_y*coat_y+coat_z*coat_z>0.25*(1-coat_ratio)*(1-coat_ratio))
PrintErrorHelp("Inner sphere is not fully inside the outer");
if (IFROOT) buf=rea_sprintf(buf,"\n position of inner sphere center r/d= "GFORM3V,
if (IFROOT) buf=rea_sprintf(buf,"\n position of inner sphere center r/d="GFORM3V,
coat_x,coat_y,coat_z);
}
else coat_x=coat_y=coat_z=0; // initialize default values
Expand Down
2 changes: 1 addition & 1 deletion src/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -2328,7 +2328,7 @@ void PrintInfo(void)
// log basic parameters
fprintf(logfile,"lambda: "GFORM"\n",lambda);
fprintf(logfile,"shape: ");
fprintf(logfile,"%s"GFORM"%s\n",sh_form_str1,sizeX,sh_form_str2);
fprintf(logfile,"%s "GFORM"%s\n",sh_form_str1,sizeX,sh_form_str2);
#ifndef SPARSE
if (sh_granul) fprintf(logfile," domain %d is filled with %d granules of diameter "GFORMDEF"\n"
" volume fraction: specified - "GFORMDEF", actual - "GFORMDEF"\n",gr_mat+1,gr_N,gr_d,gr_vf,gr_vf_real);
Expand Down
3 changes: 2 additions & 1 deletion tests/2exec/comp2exec
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ ADDASPAOCL="./../../src/ocl/adda_spa_ocl" # this combination is not yet supporte
CMDIGNORE="^-h grid|^-h int|rect_dip|^-shape box 1.51|^-shape line|;mg9n;"
OLDIGNORE="^Sets parameter 'dipoles per lambda'|^ -rect_dip|^OpenCL memory usage|^#lattice spacings:|^Default: ldr"
OLDIGNORE="$OLDIGNORE|^ADDA v\.|^Built with GNU compilers|^ using MinGW-64|^Copyright \(C\) 2006-20|^Linked to"
OLDIGNORE="$OLDIGNORE|^(GPU-accelerated|Parallel) version conforming|^Particle is placed"
OLDIGNORE="$OLDIGNORE|^(GPU-accelerated|Parallel) version conforming|^Particle is placed|^shape: |^CoupleConstant:"
OLDIGNORE="$OLDIGNORE|^ position of inner sphere center r/d="

# Path to reference binaries, examples: "." or "./../../win64"
REFPATH=./../../win64
Expand Down

0 comments on commit 758fea0

Please sign in to comment.