diff --git a/src/blue_phase_rt.c b/src/blue_phase_rt.c index 6f03a55b..a49d14e2 100644 --- a/src/blue_phase_rt.c +++ b/src/blue_phase_rt.c @@ -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); @@ -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); @@ -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 ) { diff --git a/src/collision_rt.c b/src/collision_rt.c index f757ff14..021c99fc 100644 --- a/src/collision_rt.c +++ b/src/collision_rt.c @@ -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); diff --git a/src/collision_rt.h b/src/collision_rt.h index ccecb57e..0e0eef4d 100644 --- a/src/collision_rt.h +++ b/src/collision_rt.h @@ -20,4 +20,3 @@ int collision_run_time(pe_t * pe, rt_t * rt, lb_t * lb); #endif - diff --git a/src/field_phi_init.c b/src/field_phi_init.c index af045188..252fd541 100644 --- a/src/field_phi_init.c +++ b/src/field_phi_init.c @@ -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); @@ -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]; @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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); @@ -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 */ diff --git a/src/noise.c b/src/noise.c index fe57259a..bcb26b9b 100644 --- a/src/noise.c +++ b/src/noise.c @@ -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. * *****************************************************************************/ diff --git a/tests/regression/d3q19-short/serial-le2d-fd2.inp b/tests/regression/d3q19-short/serial-le2d-fd2.inp index 6c67c2c2..8615f042 100644 --- a/tests/regression/d3q19-short/serial-le2d-fd2.inp +++ b/tests/regression/d3q19-short/serial-le2d-fd2.inp @@ -105,4 +105,4 @@ LE_init_profile 0 # ############################################################################### -random_seed 13 \ No newline at end of file +random_seed 13 diff --git a/tests/unit/test_noise.c b/tests/unit/test_noise.c index 1081d929..5a2fb6f6 100644 --- a/tests/unit/test_noise.c +++ b/tests/unit/test_noise.c @@ -41,7 +41,7 @@ int test_ns_statistical_testx(pe_t * pe); /***************************************************************************** * * test_noise_suite - * + * *****************************************************************************/ int test_noise_suite(void) { @@ -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++) { diff --git a/util/capillary.c b/util/capillary.c index 2ee4ca5c..b69297d6 100644 --- a/util/capillary.c +++ b/util/capillary.c @@ -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] @@ -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 */ @@ -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 */ @@ -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"); }