Skip to content

Commit

Permalink
Pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstratford committed Jul 17, 2024
1 parent 6c95308 commit a68cd05
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
6 changes: 3 additions & 3 deletions src/blue_phase_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ __host__ int blue_phase_init_rt(pe_t * pe, rt_t *rt,

if (strcmp(method, "s7") == 0) {

/* Check what is wanted for walls/colloids */
/* Check what is wanted for walls/colloids */
blue_phase_rt_wall_anchoring(pe, rt, RT_FATAL, &fe_param.wall);
blue_phase_rt_coll_anchoring(pe, rt, RT_FATAL, &fe_param.coll);

Expand Down Expand Up @@ -254,7 +254,7 @@ __host__ int blue_phase_init_rt(pe_t * pe, rt_t *rt,
if (n == 1) {
pe_info(pe, "Please replace lc_anchoring by lc_wall_anchoring and/or\n");
pe_info(pe, "lc_coll_anchoring types\n");
pe_fatal(pe, "Please check input file and try agains.\n");
pe_fatal(pe, "Please check input file and try again.\n");
}

rt_string_parameter(rt, "lc_coll_anchoring", type, FILENAME_MAX);
Expand Down Expand Up @@ -320,7 +320,7 @@ __host__ int blue_phase_init_rt(pe_t * pe, rt_t *rt,

if (strcmp(type, "normal") == 0) w2 = 0.0;
if (strcmp(type, "fixed") == 0) w2 = 0.0;

n = rt_double_parameter(rt, "lc_anchoring_strength_colloid", &w1);

if ( n == 1 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/collision_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int collision_run_time(pe_t * pe, rt_t * rt, lb_t * lb) {
}

/* Relaxation time scheme (default M10) */

strcpy(relax, "M10");
p = rt_string_parameter(rt, "lb_relaxation_scheme", tmp, BUFSIZ);

Expand Down
1 change: 0 additions & 1 deletion src/collision_rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
int collision_run_time(pe_t * pe, rt_t * rt, lb_t * lb);

#endif

22 changes: 11 additions & 11 deletions src/field_phi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int field_phi_init_uniform(field_t * phi, double phi0) {
cs_nlocal(phi->cs, nlocal);

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand All @@ -119,7 +119,7 @@ int field_phi_init_uniform(field_t * phi, double phi0) {
* Initialise two blocks with interfaces at z = Lz/4 and z = 3Lz/4.
*
*****************************************************************************/

int field_phi_init_block(field_t * phi, double xi) {

int nlocal[3];
Expand All @@ -140,7 +140,7 @@ int field_phi_init_block(field_t * phi, double xi) {
z2 = 0.75*ltot[Z];

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -186,7 +186,7 @@ int field_phi_init_block_X(field_t * phi, double xi, double xwidth) {
x2 = 0.5*(len[X] + xwidth);

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -234,7 +234,7 @@ int field_phi_init_block_Y(field_t * phi, double xi, double ywidth) {
y2 = 0.5*(len[Y] + ywidth);

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -282,7 +282,7 @@ int field_phi_init_block_Z(field_t * phi, double xi, double zwidth) {
z2 = 0.5*(len[Z] + zwidth);

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -329,7 +329,7 @@ int field_phi_init_layer_X(field_t * phi, double xi, double layer_size) {
x1 = layer_size*len[X];

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -370,7 +370,7 @@ int field_phi_init_layer_Y(field_t * phi, double xi, double layer_size) {
y1 = layer_size*len[Y];

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -411,7 +411,7 @@ int field_phi_init_layer_Z(field_t * phi, double xi, double layer_size) {
z1 = layer_size*len[Z];

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -455,7 +455,7 @@ int field_phi_init_bath(field_t * phi) {
xi0 = 1.13;

for (ic = 1; ic <= nlocal[X]; ic++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (jc = 1; jc <= nlocal[Y]; jc++) {
for (kc = 1; kc <= nlocal[Z]; kc++) {

index = cs_index(phi->cs, ic, jc, kc);
Expand Down Expand Up @@ -613,7 +613,7 @@ int field_phi_init_emulsion(field_t * phi, double xi, double radius,
int PosY[N_drops];
int PosZ[N_drops];
int PosY0, PosZ0;
double Rclosest;
double Rclosest;

double r;
int ny, nz; /* number of drops on each dimension */
Expand Down
2 changes: 1 addition & 1 deletion src/noise.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int noise_create(pe_t * pe, cs_t * cs, const noise_options_t * options,
* Convenience for seed-only argument
*
* If the input seed is negative, it may get converted to
* an unsinged int which is positive. This may not be what
* an unsigned int which is positive. This may not be what
* one expects. So check.
*
*****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/d3q19-short/serial-le2d-fd2.inp
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ LE_init_profile 0
#
###############################################################################

random_seed 13
random_seed 13
4 changes: 2 additions & 2 deletions tests/unit/test_noise.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int test_ns_statistical_testx(pe_t * pe);
/*****************************************************************************
*
* test_noise_suite
*
*
*****************************************************************************/

int test_noise_suite(void) {
Expand Down Expand Up @@ -579,7 +579,7 @@ int test_ns_statistical_test(pe_t * pe) {
cs_nlocal(cs, nlocal);
cs_cart_comm(cs, &comm);

noise_create(pe, cs, &opts, &ns); /* seed defualt */
noise_create(pe, cs, &opts, &ns); /* seed default */

for (int ic = 1; ic <= nlocal[X]; ic++) {
for (int jc = 1; jc <= nlocal[Y]; jc++) {
Expand Down
12 changes: 6 additions & 6 deletions util/capillary.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* capillary.c
*
* This utility produces an output file suitable for initialising
* a capillary structure in Ludwig.
* a capillary structure in Ludwig.
*
* Some examples of uniform, and less uniform capillary initialisations.
* Options are selected at compile time (below) at the momoent.
* Options are selected at compile time (below) at the moment.
*
* The output should be capillary.dat [for human consumption]
* capillary.001-001 [for initial input to run]
Expand Down Expand Up @@ -39,7 +39,7 @@ const int xmax = 20;
const int ymax = 20;
const int zmax = 20;

const int crystalline_cell_size = 10; /* Must devide all lengths */
const int crystalline_cell_size = 10; /* Must divide all lengths */

/* CROSS SECTION */
/* You can choose a square or circular cross section */
Expand All @@ -55,7 +55,7 @@ int obstacle_number = 1; /* number of obstacles per wall */
int obstacle_length = 6; /* along the wall direction */
int obstacle_height = 8; /* perpendicular from wall */
int obstacle_depth = 6; /* perpendicular to length and height */
/* NOTE: obstacle_depth == xmax/ymax/zmax
/* NOTE: obstacle_depth == xmax/ymax/zmax
means obstacles don't have a z-boundary */

/* OUTPUT */
Expand Down Expand Up @@ -569,8 +569,8 @@ int capillary_write_ascii_serial(pe_t * pe, cs_t * cs, map_t * map) {
map_data(map, index, data);

fprintf(fp, "%4d %4d %4d %3d", ic, jc, kc, status);
for (int nd = 0; nd < map->ndata; nd++) {
fprintf(fp, " %22.15e", data[nd]);
for (int idata = 0; idata < map->ndata; idata++) {
fprintf(fp, " %22.15e", data[idata]);
}
fprintf(fp, "\n");
}
Expand Down

0 comments on commit a68cd05

Please sign in to comment.