diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index a1adf4d19..ac97a531c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build and run the unit tests run: | cp config/coverage-gcc.mk config.mk diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6a66412d5..74e1633f2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,7 +36,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 27b844003..065f0adfa 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -1,6 +1,6 @@ # Regression tests (serial) -name: "Regression" +name: "build, test" on: pull_request: @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build run: | @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build run: | @@ -49,13 +49,14 @@ jobs: run: | make unit make -C tests d3q15 + cat tests/regression/d3q15/*.new make-d3q19-short: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build run: | @@ -75,7 +76,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build run: | @@ -90,3 +91,39 @@ jobs: run: | make unit make -C tests d3q27 + + d2q9-mpi: + name: d2q9 / mpi + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up MPI + uses: mpi4py/setup-mpi@v1 + - run: mpicc --version + - run: cp config/github-mpicc.mk config.mk + - run: make -j 2 + - run: export OMP_NUM_THREADS=2 + - run: make unit + - run: export OMP_NUM_THREADS=1 + - run: make -C tests d2q9 + + d3q15-mpi: + name: d3q15 / mpi + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up MPI + uses: mpi4py/setup-mpi@v1 + - run: mpicc --version + - run: cp config/github-mpicc.mk config.mk + - run: sed -i "s/D2Q9/D3Q15/" config.mk + - run: make -j 2 + - run: export OMP_NUM_THREADS=2 + - run: make unit + - run: export OMP_NUM_THREADS=1 + - run: make -C tests d3q15 + - run: cat tests/regression/d3q15/*new diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0c1fdeaf3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: c -cache: - - directories: - - mpi -before_install: - - bash ./config/build-mpi.sh -script: - - export OMP_NUM_THREADS=1 - - export PATH=$(pwd)/mpi/bin:${PATH} - - cp config/travis-mpicc.mk ./config.mk - - make - - make unit diff --git a/README.md b/README.md index 1d1eea409..d5282307e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A lattice Boltzmann code for complex fluids -[![Build Status](https://travis-ci.com/ludwig-cf/ludwig.svg?branch=develop)](https://travis-ci.com/ludwig-cf/ludwig) +![Build Status](https://github.com/ludwig-cf/ludwig/actions/workflows/regression.yml/badge.svg) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1998/badge)](https://bestpractices.coreinfrastructure.org/projects/1998) diff --git a/config/epcc-cirrus-nvcc.mk b/config/epcc-cirrus-nvcc.mk index 1ca49c995..30ff0c067 100644 --- a/config/epcc-cirrus-nvcc.mk +++ b/config/epcc-cirrus-nvcc.mk @@ -2,18 +2,15 @@ # # nvcc build # -# There are a number of ways forward here... see further comments below +# "Serial" build. # -# E.g., serial with stub MPI -# module load nvidia/nvhpc-nompi/22.11 -# -# E.g., parallel using NVHPC with MPI ... -# module load nvidia/nvhpc/22.11 +# module load nvidia/nvhpc-nompi # ############################################################################### -BUILD = parallel +BUILD = serial MODEL = -D_D3Q19_ +TARGET = nvcc CC = nvcc CFLAGS = -g -DADDR_SOA -O2 -arch=sm_70 -x cu -dc @@ -24,13 +21,3 @@ CFLAGS = -g -DADDR_SOA -O2 -arch=sm_70 -x cu -dc AR = ar ARFLAGS = -cr LDFLAGS = -arch=sm_70 - -# nvhpc (mpicc is present but drives nvc not nvcc) so use nvcc still ... but -MPI_HOME = ${NVHPC_ROOT}/comm_libs/mpi -MPI_INC_PATH = -I$(MPI_HOME)/include -MPI_LIB_PATH = -L$(MPI_HOME)/lib -lmpi - -# NVHPC bundled MPI must use mpirun supplied ... -LAUNCH_SERIAL_CMD = -LAUNCH_MPIRUN_CMD = mpirun -MPIRUN_NTASK_FLAG = -np diff --git a/config/travis-mpicc.mk b/config/github-mpicc.mk similarity index 52% rename from config/travis-mpicc.mk rename to config/github-mpicc.mk index 9a9fb11d0..34f331f87 100644 --- a/config/travis-mpicc.mk +++ b/config/github-mpicc.mk @@ -1,25 +1,19 @@ ############################################################################## # -# travis-mpicc.mk +# github-mpicc.mk # -# Parallel unit tests +# We expect mpicc driving gcc; tests run on two mpi processes. # ############################################################################## BUILD = parallel -MODEL = -D_D3Q19_ +MODEL = -D_D2Q9_ CC = mpicc -fopenmp -CFLAGS = -O2 -g -Wall -Werror +CFLAGS = -g -Wall -O2 AR = ar ARFLAGS = -cru LDFLAGS = -LAUNCH_SERIAL_CMD = -LAUNCH_MPIRUN_CMD = mpirun --oversubscribe -MPIRUN_NTASK_FLAG = -np - -# Unit tests only -MPIRUN_NTASK_UNIT = 4 - +LAUNCH_MPIRUN_CMD = mpirun -np 2 diff --git a/config/travis-gcc.mk b/config/travis-gcc.mk deleted file mode 100644 index 0fbea80e3..000000000 --- a/config/travis-gcc.mk +++ /dev/null @@ -1,24 +0,0 @@ -############################################################################## -# -# lunix-gcc-travis.mk -# -# gcc, no OpenMP -# -############################################################################## - -BUILD = serial -MODEL = -D_D3Q19_ - -CC = gcc -fopenmp -CFLAGS = -O -g -Wall - -AR = ar -ARFLAGS = -cru -LDFLAGS = - -MPI_INC_PATH = ./mpi_s -MPI_LIB_PATH = ./mpi_s -MPI_LIB = -lmpi - -LAUNCH_SERIAL_CMD = -LAUNCH_MPIRUN_CMD = diff --git a/src/bbl.c b/src/bbl.c index faf08fde6..c75f8ed9a 100644 --- a/src/bbl.c +++ b/src/bbl.c @@ -49,6 +49,7 @@ struct bbl_s { int active; /* Global flag for active particles. */ int ellipsoid_didt; /* Switch for unsteady term method */ int ndist; /* Number of LB distributions active */ + double eta; /* Dynamic viscosity for lubrication correction */ double deltag; /* Excess or deficit of phi between steps */ double stress[3][3]; /* Surface stress diagnostic */ }; @@ -77,6 +78,9 @@ void record_force_torque(colloid_t * pc); void bbl_ellipsoid_unsteady_mI(const double q[4], const double mi[3], const double omega[3], double didt[3][3]); +int bbl_wall_lubr_correction_ellipsoid(bbl_t * bbl, wall_t * wall, + colloid_t * pc, double wdrag[3]); + /***************************************************************************** * * bbl_create @@ -103,6 +107,15 @@ int bbl_create(pe_t * pe, cs_t * cs, lb_t * lb, bbl_t ** pobj) { bbl->ellipsoid_didt = BBL_ELLIPSOID_UPDATE_QUATERNION; lb_ndist(lb, &bbl->ndist); + /* I would like to obtain the viscosity from the lb data structure; + * but it's not present at initialisation, so ... */ + + { + physics_t * phys = NULL; + physics_ref(&phys); + physics_eta_shear(phys, &bbl->eta); + } + *pobj = bbl; return 0; @@ -898,7 +911,6 @@ int bbl_update_colloids(bbl_t * bbl, wall_t * wall, colloids_info_t * cinfo) { /* All colloids, including halo */ colloids_info_all_head(cinfo, &pc); - for ( ; pc; pc = pc->nextall) { if (pc->s.bc != COLLOID_BC_BBL) continue; @@ -1186,7 +1198,9 @@ void bbl_ladd_ellipsoid(bbl_t * bbl, colloid_t * pc, wall_t * wall, util_q4_inertia_tensor(pc->s.quat, mI_P, mI); - wall_lubr_sphere(wall, pc->s.ah, pc->s.r, dwall); + + /* Lubrication correction at wall ... */ + bbl_wall_lubr_correction_ellipsoid(bbl, wall, pc, dwall); /* Add inertial terms to diagonal elements */ @@ -1370,9 +1384,8 @@ int bbl_6x6_gaussian_elimination(double a[6][6], double xb[6]) { static int bbl_wall_lubrication_account(bbl_t * bbl, wall_t * wall, colloids_info_t * cinfo) { - double f[3] = {0.0, 0.0, 0.0}; - double dwall[3]; colloid_t * pc = NULL; + double f[3] = {0.0, 0.0, 0.0}; assert(bbl); assert(cinfo); @@ -1382,8 +1395,19 @@ static int bbl_wall_lubrication_account(bbl_t * bbl, wall_t * wall, colloids_info_local_head(cinfo, &pc); for (; pc; pc = pc->nextlocal) { + double dwall[3] = {0}; if (pc->s.bc != COLLOID_BC_BBL) continue; - wall_lubr_sphere(wall, pc->s.ah, pc->s.r, dwall); + + if (pc->s.shape == COLLOID_SHAPE_SPHERE) { + wall_lubr_sphere(wall, pc->s.ah, pc->s.r, dwall); + } + else if (pc->s.shape == COLLOID_SHAPE_ELLIPSOID) { + bbl_wall_lubr_correction_ellipsoid(bbl, wall, pc, dwall); + } + else { + /* Specifically, no COLLOID_SHAPE_DISK */ + assert(0); + } f[X] -= pc->s.v[X]*dwall[X]; f[Y] -= pc->s.v[Y]*dwall[Y]; f[Z] -= pc->s.v[Z]*dwall[Z]; @@ -1496,3 +1520,117 @@ void bbl_ellipsoid_unsteady_mI(const double q[4], return; } + +/***************************************************************************** + * + * bbl_wall_lubr_correction_ellipsoid + * + * We will compute the distance between the centre of the ellipsoid and + * the tangent plane normal to each wall. This will provide the + * normal separation. One computation per co-ordinate direction is + * required. + * + * This is fed into a fudge for the lubrication correction based on the + * analytical expression for a sphere with a hydrodynamic radius of the + * semi-major axis. A more representative effective radius could be + * identified with some geometry. + * + * A velocity-independent drag is returned. + * + * Returns zero on success. If an overlap between the surface of the + * ellipsoid and a wall position is detected, a non-zero value will + * be returned. + * + *****************************************************************************/ + +int bbl_wall_lubr_correction_ellipsoid(bbl_t * bbl, wall_t * wall, + colloid_t * pc, double wdrag[3]) { + int ifail = 0; + double lmin[3] = {0}; + double ltot[3] = {0}; + double ah = pc->s.elabc[X]; /* semi-major axis length */ + + cs_lmin(bbl->cs, lmin); + cs_ltot(bbl->cs, ltot); + + if (wall->param->isboundary[X]) { + double xtan = -1.0; /* colloid centre to colloid tangent plane */ + double nhat[3] = {1.0, 0.0, 0.0}; /* +/- wall normal */ + double hc = wall->param->lubr_rc[X]; /* cut off */ + double dh = wall->param->lubr_dh[X]; /* offset distance wall */ + + double xc = pc->s.r[X]; + double drag = 0.0; + + xtan = util_q4_distance_to_tangent_plane(pc->s.elabc, pc->s.quat, nhat); + + /* Compute a correction at (potentially) each end. */ + { + double hbot = xc - (lmin[X] + dh) - xtan; /* surface to bottom wall */ + drag += wall_lubr_drag(bbl->eta, ah, hbot, hc); + if (hbot < 0.0) ifail = -1; + } + { + double htop = lmin[X] + (ltot[X] - dh) - xc - xtan; /* surface to top */ + drag += wall_lubr_drag(bbl->eta, ah, htop, hc); + if (htop < 0.0) ifail = +1; + } + wdrag[X] = drag; + } + + /* Repeat for y-direction */ + + if (wall->param->isboundary[Y]) { + double ytan = -1.0; /* colloid centre to colloid tangent plane */ + double nhat[3] = {0.0, 1.0, 0.0}; /* +/- wall normal */ + double hc = wall->param->lubr_rc[Y]; /* cut off */ + double dh = wall->param->lubr_dh[Y]; /* offset distance wall */ + + double yc = pc->s.r[Y]; + double drag = 0.0; + + ytan = util_q4_distance_to_tangent_plane(pc->s.elabc, pc->s.quat, nhat); + + /* Compute a correction at (potentially) each end. */ + { + double hbot = yc - (lmin[Y] + dh) - ytan; /* surface to bottom wall */ + drag += wall_lubr_drag(bbl->eta, ah, hbot, hc); + if (hbot < 0.0) ifail = -1; + } + { + double htop = lmin[Y] + (ltot[Y] - dh) - yc - ytan; /* surface to top */ + drag += wall_lubr_drag(bbl->eta, ah, htop, hc); + if (htop < 0.0) ifail = +1; + } + wdrag[Y] = drag; + } + + /* Repeat for z-direction */ + + if (wall->param->isboundary[Z]) { + double ztan = -1.0; /* colloid centre to colloid tangent plane */ + double nhat[3] = {0.0, 0.0, 1.0}; /* +/- wall normal */ + double hc = wall->param->lubr_rc[Z]; /* cut off */ + double dh = wall->param->lubr_dh[Z]; /* offset distance wall */ + + double zc = pc->s.r[Z]; + double drag = 0.0; + + ztan = util_q4_distance_to_tangent_plane(pc->s.elabc, pc->s.quat, nhat); + + /* Compute a correction at (potentially) each end. */ + { + double hbot = zc - (lmin[Z] + dh) - ztan; /* surface to bottom wall */ + drag += wall_lubr_drag(bbl->eta, ah, hbot, hc); + if (hbot < 0.0) ifail = -1; + } + { + double htop = lmin[Z] + (ltot[Z] - dh) - zc - ztan; /* surface to top */ + drag += wall_lubr_drag(bbl->eta, ah, htop, hc); + if (htop < 0.0) ifail = +1; + } + wdrag[Z] = drag; + } + + return ifail; +} diff --git a/src/colloids.h b/src/colloids.h index bb1b7c439..82b67c2cd 100644 --- a/src/colloids.h +++ b/src/colloids.h @@ -7,7 +7,7 @@ * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * - * (c) 2010-2023 The University of Edinburgh + * (c) 2010-2024 The University of Edinburgh * * Contributing authors: * Kevin Stratford (kevin@epcc.ed.ac.uk) @@ -184,7 +184,6 @@ __host__ int colloid_rb(colloids_info_t * info, colloid_t * pc, int index, __host__ int colloid_rb_ub(colloids_info_t * info, colloid_t * pc, int index, double rb[3], double ub[3]); -__host__ int is_site_inside_colloid(colloid_t * pc, double rsep[3]); __host__ int colloids_type_check(colloids_info_t * info); __host__ int colloids_ellipsoid_abc_check(colloids_info_t * info); diff --git a/src/util_ellipsoid.c b/src/util_ellipsoid.c index 52461adb3..670fff0af 100644 --- a/src/util_ellipsoid.c +++ b/src/util_ellipsoid.c @@ -589,7 +589,7 @@ int util_ellipsoid_euler_from_vectors(const double a0[3], const double b0[3], * cf2 = (16/3) e^3 [+2e +(3e^2 - 1) log(1+e/1-e)]^-1 * * The Stokes' relationship is: - * F = 6 pi mu a (U_1 cf1 xhat + U_2 cf2 yhat) + * F = 6 pi eta a (U_1 cf1 xhat + U_2 cf2 yhat) * * a is the semi-major axis * b is the semi-minor axis (b < a) @@ -634,7 +634,7 @@ int util_ellipsoid_prolate_settling_velocity(double a, * util_discrete_volume_ellipsoid * * A utility to return the discrete volume of an ellipsoid with axes - * abs[3] and orientation described by quaternion q placed on the + * abc[3] and orientation described by quaternion q placed on the * unit lattice at position r. * * We just draw a large box around the central position based on the @@ -642,6 +642,7 @@ int util_ellipsoid_prolate_settling_velocity(double a, * The inside/outside determination is via util_q4_is_inside_ellipsoid(). * * The return value is the volume as an integer. + * The volume is also returned as a double in the argument list. * *****************************************************************************/ @@ -670,3 +671,113 @@ int util_discrete_volume_ellipsoid(const double abc[3], const double r0[3], return inside; } + +/**************************************************************************** + * + * util_ellipsoid_eqn_lhs + * + * Calculate the lhs of the equation for an ellipsoid using the equation + * of the ellipsoid + * + ****************************************************************************/ + +double ellipsoid_eqn_lhs(const double elA[3][3], const double rsep[3]) { + + double lhs = + + elA[0][0]*rsep[X]*rsep[X] + + elA[1][1]*rsep[Y]*rsep[Y] + + elA[2][2]*rsep[Z]*rsep[Z] + + (elA[0][1]+elA[1][0])*rsep[X]*rsep[Y] + + (elA[0][2]+elA[2][0])*rsep[X]*rsep[Z] + + (elA[1][2]+elA[2][1])*rsep[Y]*rsep[Z]; + + return lhs; +} + +/***************************************************************************** + * + * util_ellipsoid_gaussian_rad_curv + * + * Calculate the Gaussian curvature of an ellipsoid in the body fixed + * coordinate system + * + ****************************************************************************/ + +double Gaussian_RadCurv_ellipsoid(const double *elabc, const double x[3]) { + + double a2 = elabc[0]*elabc[0]; + double b2 = elabc[1]*elabc[1]; + double c2 = elabc[2]*elabc[2]; + double s1= ((x[0]*x[0])/(a2*a2)) + ((x[1]*x[1])/(b2*b2)) + ((x[2]*x[2])/(c2*c2)); + + return elabc[0]*elabc[1]*elabc[2]*s1; +} + +/***************************************************************************** + * + * util_q4_to_r + * + * Return the rotation matrix which corresponds to q. + * + * The rotation matrix may be constructed directly from + * + * b = (2q_0 - 1) a + 2(q.a)q + 2q_0 q x a + * + * See util_q4_rotate_vector() above. + * + *****************************************************************************/ + +void util_q4_to_r(const double q[4], double r[3][3]) { + + r[0][0] = 2.0*(q[0]*q[0] - 0.5 + q[1]*q[1] ); + r[0][1] = 2.0*( q[2]*q[1] - q[0]*q[3]); + r[0][2] = 2.0*( q[3]*q[1] + q[0]*q[2]); + + r[1][0] = 2.0*( q[1]*q[2] + q[0]*q[3]); + r[1][1] = 2.0*(q[0]*q[0] - 0.5 + q[2]*q[2] ); + r[1][2] = 2.0*( q[3]*q[2] - q[0]*q[1]); + + r[2][0] = 2.0*( q[1]*q[3] - q[0]*q[2]); + r[2][1] = 2.0*( q[2]*q[3] + q[0]*q[1]); + r[2][2] = 2.0*(q[0]*q[0] - 0.5 + q[3]*q[3] ); + + return; +} + +/***************************************************************************** + * + * util_q4_distance_to_tangent_plane + * + * For ellipsoid with principal semi-axis lengths abc and orientation + * described by q, what is the normal distance from the centre to the + * tangent plane with plane normal nhat (nhat in the lab frame). + * + * See e.g., Ferguson, Mathematical Geology, 11, 329--336 (1979). + * https://link.springer.com/content/pdf/10.1007/BF01034997.pdf + * + * In brief: + * If the normal is n_i then beta_j = n_i R_ij where R_ij is the + * rotation to move from the lab frame to the principal frame. + * + * The distance is then d = sqrt(beta_i^2 abc_i^2) + * + * Here, the rotation matrix is replaced by the rotation q^*. + * + *****************************************************************************/ + +double util_q4_distance_to_tangent_plane(const double abc[3], + const double q[4], + const double nhat[3]) { + double d = 0.0; + double qbar[4] = {q[0], -q[1], -q[2], -q[3]}; + double beta[3] = {0}; + + util_q4_rotate_vector(qbar, nhat, beta); + + for (int i = 0; i < 3; i++) { + d += beta[i]*beta[i]*abc[i]*abc[i]; + } + assert(d >= 0.0); + + return sqrt(d); +} diff --git a/src/util_ellipsoid.h b/src/util_ellipsoid.h index ae601383c..d5c7098c2 100644 --- a/src/util_ellipsoid.h +++ b/src/util_ellipsoid.h @@ -27,6 +27,7 @@ int util_q4_is_inside_ellipsoid(const double q[4], const double elabc[3], const double r[3]); void util_q4_inertia_tensor(const double q[4], const double moment[3], double mI[3][3]); + int util_ellipsoid_euler_from_vectors(const double a0[3], const double b0[3], double euler[3]); int util_ellipsoid_prolate_settling_velocity(double a, double b, double eta, @@ -38,6 +39,11 @@ void matrix_product(const double a[3][3], const double b[3][3], double result[3][3]); void matrix_transpose(const double a[3][3], double result[3][3]); +void util_q4_to_r(const double q[4], double r[3][3]); +double util_q4_distance_to_tangent_plane(const double abc[3], + const double q[4], + const double nhat[3]); + /***************************************************************************** * * __host__ __device__ static inline diff --git a/src/wall.c b/src/wall.c index 6050e89cb..51083103e 100644 --- a/src/wall.c +++ b/src/wall.c @@ -20,11 +20,14 @@ #include #include #include +#include #include "kernel.h" #include "physics.h" #include "util.h" #include "wall.h" +#include "util_ellipsoid.h" +#include "util_vector.h" typedef enum wall_init_enum {WALL_INIT_COUNT_ONLY, WALL_INIT_ALLOCATE} wall_init_enum_t; diff --git a/src/wall.h b/src/wall.h index 610758dc5..7ee905123 100644 --- a/src/wall.h +++ b/src/wall.h @@ -65,7 +65,7 @@ struct wall_s { pe_t * pe; /* Parallel environment */ cs_t * cs; /* Reference to coordinate system */ map_t * map; /* Reference to map structure */ - lb_t * lb; /* Reference to LB information */ + lb_t * lb; /* Reference to LB information */ wall_t * target; /* Device memory */ wall_param_t * param; /* parameters */ diff --git a/tests/Makefile b/tests/Makefile index f57b8d66b..f4993a400 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -9,14 +9,12 @@ # d2q9 D2Q9 tests # d3q15 D3Q15 tests # d3q19-short a batch of shorter tests -# d3q19-io a batch of tests with file I/O -# d3q19-elec a batch of tests for electrokinetics -# d3q27 D3Q27-specific tests +# d3q27 D3Q27 tests # # Edinburgh Soft Matter and Statistical Physics Group and # Edinburgh Parallel Computing Centre # -# (c) 2015-2023 The University of Edinburgh +# (c) 2015-2024 The University of Edinburgh # Contributing authors: # Kevin Stratford (kevinAepcc.ed.ac.uk) # @@ -50,12 +48,6 @@ d3q15: d3q19-short: $(MAKE) -C regression/d3q19-short -d3q19-io: - $(MAKE) -C regression/d3q19-io - -d3q19-elec: - $(MAKE) -C regression/d3q19-elec - d3q27: $(MAKE) -C regression/d3q27 diff --git a/tests/regression/d2q9/Makefile b/tests/regression/d2q9/Makefile index 34d0ca274..a61a537a6 100644 --- a/tests/regression/d2q9/Makefile +++ b/tests/regression/d2q9/Makefile @@ -8,24 +8,11 @@ include ../../../Makefile.mk -SER=${LAUNCH_SERIAL_CMD} -PAR=${LAUNCH_MPI_CMD} ${LAUNCH_MPI_NP_SWITCH} +PAR=${LAUNCH_MPIRUN_CMD} -serial: - @echo "TEST --> regression tests serial" +d2q9: + @echo "TEST --> regression tests (d2q9)" inputs='serial*inp'; \ - for file in $$inputs; do ../../test.sh $$file "" ""; done - -mpix01: - @echo "TEST --> regression tests mpi (1 mpi task)" - inputs='serial*inp'; \ - for file in $$inputs; do ../../test.sh $$file "$(SER)" "$(PAR) 1"; done - -mpix08: - @echo "TEST --> regression tests mpi (8 mpi tasks)" - -mpix64: - @echo "TEST --> regression test mpi (64 mpi tasks)" - + for file in $$inputs; do ../../test.sh $$file "" "$(PAR)"; done clean: rm -f *new test-diff* input diff --git a/tests/regression/d3q15/Makefile b/tests/regression/d3q15/Makefile index 3ac3de4db..15c7cbc07 100644 --- a/tests/regression/d3q15/Makefile +++ b/tests/regression/d3q15/Makefile @@ -8,12 +8,11 @@ include ../../../Makefile.mk -SER=${LAUNCH_SERIAL_CMD} -PAR=${LAUNCH_MPI_CMD} ${LAUNCH_MPI_NP_SWITCH} +PAR=${LAUNCH_MPIRUN_CMD} serial: - @echo "TEST --> regression tests serial" + @echo "TEST --> regression tests (d3q15)" inputs='serial*inp'; \ - for file in $$inputs; do ../../test.sh $$file "" ""; done + for file in $$inputs; do ../../test.sh $$file "" "$(PAR)"; done clean: rm -f *new test-diff* input diff --git a/tests/regression/d3q19-short/Makefile b/tests/regression/d3q19-short/Makefile index a3d3c0714..47caf8bd4 100644 --- a/tests/regression/d3q19-short/Makefile +++ b/tests/regression/d3q19-short/Makefile @@ -9,12 +9,7 @@ include ../../../Makefile.mk -ifeq (${BUILD},parallel) -MPIRUN_NTASKS=1 -endif - -SER=${LAUNCH_SERIAL_CMD} -PAR=${LAUNCH_MPIRUN_CMD} ${MPIRUN_NTASK_FLAG} ${MPIRUN_NTASKS} +PAR=${LAUNCH_MPIRUN_CMD} SOURCES = $(wildcard *.inp) LOGS = ${SOURCES:.inp=.new} @@ -27,7 +22,7 @@ test: logs: $(LOGS) %.new: %.inp - ../../test.sh $< "${SER}" "${PAR}" + ../../test.sh $< "" "${PAR}" # Restart tests must be in the right order @@ -38,7 +33,7 @@ serial-rest-c02.new: serial-rest-c01.new serial-poly-st1.new: serial-poly-st1.pre serial-poly-st1.pre: - ${SER} ${PAR} ../../../util/multi_poly_init + ${PAR} ../../../util/multi_poly_init clean: rm -f *new test-diff* *meta *001-001 diff --git a/tests/regression/d3q19/long08-chol-n01.inp b/tests/regression/d3q19/long08-chol-n01.inp deleted file mode 100644 index 17d0ed301..000000000 --- a/tests/regression/d3q19/long08-chol-n01.inp +++ /dev/null @@ -1,105 +0,0 @@ -############################################################################## -# -# Cholesteric normal anchoring test. -# Longer version of serial-chol-n01.inp -# -############################################################################## - -N_cycles 1000 - -############################################################################## -# -# System and MPI -# -############################################################################## - -size 64_64_64 -grid 2_2_2 -reduced_halo no - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 1.0 -isothermal_fluctuations off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy lc_blue_phase - -fd_advection_scheme_order 1 -fd_gradient_calculation 3d_7pt_solid - -lc_a0 0.01 -lc_gamma 3.0 -lc_q0 0.19635 -lc_kappa0 0.000648456 -lc_kappa1 0.000648456 -lc_xi 0.7 - -lc_Gamma 0.5 -lc_active_zeta 0.0 - -lc_q_initialisation twist -lc_q_init_amplitude 0.333333333333333 -lc_init_redshift 1.0 -lc_init_nematic 1.0_0.0_0.0 - -lc_anchoring_method two -lc_wall_anchoring normal -lc_coll_anchoring normal -lc_anchoring_strength_colloid 0.002593824 - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init input_one - -colloid_one_type default -colloid_one_a0 7.25 -colloid_one_ah 7.25 -colloid_one_r 32.0_32.0_32.0 -colloid_one_v 0.0_0.0_0.0 -colloid_one_s 1.0_0.0_0.0 -colloid_one_m0 1.0_0.0_0.0 - -# Constant body force on all colloids ("gravity") - -colloid_gravity 0.0_0.0_0.0 - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 1000 -colloid_io_freq 2000 -config_at_end no - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/long08-chol-n01.log b/tests/regression/d3q19/long08-chol-n01.log deleted file mode 100644 index 885656c06..000000000 --- a/tests/regression/d3q19/long08-chol-n01.log +++ /dev/null @@ -1,189 +0,0 @@ -Welcome to Ludwig v0.1.28 (MPI version running on 8 processes) - -The SVN revision details are: -Note assertions via standard C assert() are on. - -Read 40 user parameters from ./long08-chol-n01.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e-02 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 1.9635000e-01 -... gives pitch length = 3.1999925e+01 -Elastic constant kappa0 = 6.4845600e-04 -Elastic constant kappa1 = 6.4845600e-04 -Amplitude (uniaxial) order = 3.3333333e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 3.0000080e-01 -Reduced temperature = 0.0000000e+00 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -LC activity constant zeta = 0.0000000e+00 - -Liquid crystal anchoring -Anchoring method: = two -Anchoring type (colloids): = normal -Anchoring type (walls): = normal -Surface free energy (colloid)w1: = 2.5938240e-03 -Surface free energy (colloid)w2: = 0.0000000e+00 -Surface free energy (wall) w1: = 0.0000000e+00 -Surface free energy (wall) w2: = 0.0000000e+00 -Ratio (colloid) w1/kappa0: = 4.0000000e+00 -Ratio (wall) w1/kappa0: = 0.0000000e+00 -Computed surface order f(gamma) = 3.3333333e-01 - -Using Beris-Edwards solver: -Rotational diffusion const = 5.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e+00 -Bulk viscosity 1.00000e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External electric field 0.00000e+00 0.00000e+00 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 3.50000e+00 -Bulk relaxation time: 3.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one default -colloid_one_a0 7.2500000e+00 -colloid_one_ah 7.2500000e+00 -colloid_one_r 3.2000000e+01 3.2000000e+01 3.2000000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_s 1.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 7.2500000e+00 -Final cell list: 3 3 3 -Final cell lengths: 1.0666667e+01 1.0666667e+01 1.0666667e+01 - -Gradient calculation: 3d_7pt_solid - - -Initialising Q_ab to cholesteric -Helical axis Z -Initial conditions. - -Scalars - total mean variance min max -[rho] 260569.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 2.1558645e+04 8.2736799e-02 3.1266048e-02 -1.6666667e-01 3.3333333e-01 -[phi] 2.5523242e-02 9.7951952e-08 3.1233596e-02 -2.5000000e-01 2.5000000e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[phi] 2.1869522e+04 8.3929867e-02 3.1266048e-02 -1.6666667e-01 3.3333333e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 -0.0000000e+00 0.0000000e+00 - -Momentum - x y z -[total ] 3.6161213e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 3.6161213e-12 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] -2.3994590e-17 -6.7220387e-18 1.1139132e-11 -[maximum ] -2.3994590e-17 -6.7220387e-18 1.1139132e-11 - -Scalars - total mean variance min max -[rho] 260569.00 1.00000000000 3.0681169e-10 0.99961151915 1.00015089479 -[phi] 2.1295970e+04 8.1728717e-02 3.1009546e-02 -1.6710856e-01 3.3305668e-01 -[phi] 2.3940086e-02 9.1876187e-08 3.0952248e-02 -2.5057607e-01 2.5057653e-01 -[phi] 8.4376950e-15 3.2381807e-20 2.3895421e-05 -2.2488410e-01 2.2488410e-01 -[phi] 2.1605318e+04 8.2915919e-02 3.0984971e-02 -1.6717982e-01 3.3285240e-01 -[phi] 1.1901591e-13 4.5675390e-19 3.2300231e-05 -2.3030091e-01 2.3030091e-01 - -Free energies - timestep f v f/v f_s a f_s/a -[fe] 1000 -1.7481958352e+01 2.6056900000e+05 -6.7091474243e-05 2.3352456348e-02 1.0140000000e+03 2.3030035846e-05 - -Momentum - x y z -[total ] 1.1957892e-12 -3.9073765e-13 -2.2371501e-12 -[fluid ] 1.2461351e-12 -3.8813397e-13 -1.7754930e-08 -[colloids] -5.0345953e-14 -2.6036845e-15 1.7752693e-08 - -Velocity - x y z -[minimum ] -9.0880496e-05 -7.4310380e-05 -5.7726526e-05 -[maximum ] 9.0880496e-05 7.4310380e-05 5.7726719e-05 - -Completed cycle 1000 - -Timer resolution: 0.001 second - -Timer statistics - Section: tmin tmax total - Total: 198.112 198.112 198.112 198.112199 (1 call) - Time step loop: 0.188 0.245 198.034 0.198034 (1000 calls) - Propagation: 0.002 0.008 3.059 0.003059 (1000 calls) - Collision: 0.058 0.072 59.371 0.059371 (1000 calls) - Lattice halos: 0.002 0.035 8.305 0.004152 (2000 calls) - phi gradients: 0.009 0.015 10.561 0.010561 (1000 calls) - Forces: 0.000 0.000 0.002 0.000002 (1000 calls) - Rebuild: 0.001 0.002 1.442 0.001442 (1000 calls) - BBL: 0.001 0.002 0.923 0.000923 (1000 calls) - Particle halos: 0.000 0.007 1.019 0.001019 (1000 calls) - Force calculation: 0.053 0.073 54.826 0.054826 (1000 calls) - phi update: 0.053 0.085 58.116 0.058116 (1000 calls) - Free1: 0.000 0.000 0.000 0.000000 (2000 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/long08-chol-p01.inp b/tests/regression/d3q19/long08-chol-p01.inp deleted file mode 100644 index 1a8e0082e..000000000 --- a/tests/regression/d3q19/long08-chol-p01.inp +++ /dev/null @@ -1,104 +0,0 @@ -############################################################################## -# -# Cholesterteric planar anchoring test. -# Longer version of serial-chol-p01.inp -# -############################################################################## - -N_cycles 1000 - -############################################################################## -# -# System and MPI -# -############################################################################## - -size 64_64_64 -grid 2_2_2 -reduced_halo no - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 1.0 -isothermal_fluctuations off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy lc_blue_phase - -fd_advection_scheme_order 1 -fd_gradient_calculation 3d_7pt_solid - -lc_a0 0.01 -lc_gamma 3.0 -lc_q0 0.19635 -lc_kappa0 0.000648456 -lc_kappa1 0.000648456 -lc_xi 0.7 - -lc_Gamma 0.5 -lc_active_zeta 0.0 - -lc_q_initialisation twist -lc_q_init_amplitude 0.333333333333333 -lc_init_redshift 1.0 -lc_init_nematic 1.0_0.0_0.0 - -lc_anchoring_method two -lc_wall_anchoring planar -lc_coll_anchoring planar -lc_anchoring_strength 0.002593824 - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init input_one - -colloid_one_a0 7.25 -colloid_one_ah 7.25 -colloid_one_r 16.0_16.0_16.0 -colloid_one_v 0.0_0.0_0.0 -colloid_one_s 1.0_0.0_0.0 -colloid_one_m 1.0_0.0_0.0 - -# Constant body force on all colloids ("gravity") - -colloid_gravity 0.0_0.0_0.0 - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 1000 -colloid_io_freq 2000 -config_at_end no - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/long08-chol-p01.log b/tests/regression/d3q19/long08-chol-p01.log deleted file mode 100644 index 94882f8e5..000000000 --- a/tests/regression/d3q19/long08-chol-p01.log +++ /dev/null @@ -1,189 +0,0 @@ -Welcome to Ludwig v0.1.28 (MPI version running on 8 processes) - -The SVN revision details are: -Note assertions via standard C assert() are on. - -Read 39 user parameters from ./long08-chol-p01.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.0000000e-02 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 1.9635000e-01 -... gives pitch length = 3.1999925e+01 -Elastic constant kappa0 = 6.4845600e-04 -Elastic constant kappa1 = 6.4845600e-04 -Amplitude (uniaxial) order = 3.3333333e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 3.0000080e-01 -Reduced temperature = 0.0000000e+00 -Initial redshift = 1.0000000e+00 -Dynamic redshift update = no -LC activity constant zeta = 0.0000000e+00 - -Liquid crystal anchoring -Anchoring method: = two -Anchoring type (colloids): = planar -Anchoring type (walls): = planar -Surface free energy (colloid)w1: = 2.5938240e-03 -Surface free energy (colloid)w2: = 0.0000000e+00 -Surface free energy (wall) w1: = 2.5938240e-03 -Surface free energy (wall) w2: = 0.0000000e+00 -Ratio (colloid) w1/kappa0: = 4.0000000e+00 -Ratio (wall) w1/kappa0: = 4.0000000e+00 -Computed surface order f(gamma) = 3.3333333e-01 - -Using Beris-Edwards solver: -Rotational diffusion const = 5.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e+00 -Bulk viscosity 1.00000e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External electric field 0.00000e+00 0.00000e+00 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 3.50000e+00 -Bulk relaxation time: 3.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 0 - -Requested one colloid via input: -colloid_one_a0 7.2500000e+00 -colloid_one_ah 7.2500000e+00 -colloid_one_r 1.6000000e+01 1.6000000e+01 1.6000000e+01 -colloid_one_v 0.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_s 1.0000000e+00 0.0000000e+00 0.0000000e+00 -colloid_one_m 1.0000000e+00 0.0000000e+00 0.0000000e+00 - -Initialised 1 colloid - -Colloid cell list information ------------------------------ -Input radius maximum: 7.2500000e+00 -Final cell list: 3 3 3 -Final cell lengths: 1.0666667e+01 1.0666667e+01 1.0666667e+01 - -Gradient calculation: 3d_7pt_solid - - -Initialising Q_ab to cholesteric -Helical axis Z -Initial conditions. - -Scalars - total mean variance min max -[rho] 260569.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 2.1558645e+04 8.2736799e-02 3.1266048e-02 -1.6666667e-01 3.3333333e-01 -[phi] 2.7809292e-02 1.0672525e-07 3.1233596e-02 -2.5000000e-01 2.5000000e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 -[phi] 2.1869522e+04 8.3929867e-02 3.1266048e-02 -1.6666667e-01 3.3333333e-01 -[phi] 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Momentum - x y z -[total ] 3.6161213e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 3.6161213e-12 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: - -Colloid velocities - x y z -[minimum ] 2.8153827e-18 1.1625616e-18 -1.5770409e-12 -[maximum ] 2.8153827e-18 1.1625616e-18 -1.5770409e-12 - -Scalars - total mean variance min max -[rho] 260569.00 1.00000000000 5.0922155e-11 0.99986412837 1.00034454372 -[phi] 2.1299059e+04 8.1740571e-02 3.1020456e-02 -1.6833339e-01 3.3373773e-01 -[phi] 2.5853839e-02 9.9220703e-08 3.0975965e-02 -2.4929205e-01 2.4929197e-01 -[phi] 5.9470658e-15 2.2823382e-20 6.3084140e-06 -1.6983470e-01 1.6983470e-01 -[phi] 2.1656599e+04 8.3112722e-02 3.1017246e-02 -1.6754731e-01 3.3520833e-01 -[phi] -2.6029092e-14 -9.9893280e-20 1.4369471e-05 -1.9622018e-01 1.9622018e-01 - -Free energies - timestep f v f/v f_s a f_s/a -[fe] 1000 -1.7521847156e+01 2.6056900000e+05 -6.7244557702e-05 1.5293834654e-02 1.0140000000e+03 1.5082677173e-05 - -Momentum - x y z -[total ] 7.9637552e-13 -1.2398470e-13 -1.9979065e-12 -[fluid ] 8.1640597e-13 -1.2641277e-13 2.5052010e-09 -[colloids] -2.0030449e-14 2.4280701e-15 -2.5071989e-09 - -Velocity - x y z -[minimum ] -3.0248583e-05 -2.3816211e-05 -3.4441134e-05 -[maximum ] 3.0248583e-05 2.3816211e-05 3.4440827e-05 - -Completed cycle 1000 - -Timer resolution: 0.001 second - -Timer statistics - Section: tmin tmax total - Total: 214.020 214.020 214.020 214.019727 (1 call) - Time step loop: 0.200 0.280 213.939 0.213939 (1000 calls) - Propagation: 0.002 0.011 3.398 0.003398 (1000 calls) - Collision: 0.058 0.074 60.237 0.060237 (1000 calls) - Lattice halos: 0.002 0.039 11.511 0.005755 (2000 calls) - phi gradients: 0.007 0.030 10.580 0.010580 (1000 calls) - Forces: 0.000 0.001 0.003 0.000003 (1000 calls) - Rebuild: 0.001 0.003 1.463 0.001463 (1000 calls) - BBL: 0.000 0.002 0.614 0.000614 (1000 calls) - Particle halos: 0.000 0.010 1.659 0.001659 (1000 calls) - Force calculation: 0.053 0.074 55.796 0.055796 (1000 calls) - phi update: 0.052 0.108 68.230 0.068230 (1000 calls) - Free1: 0.000 0.000 0.000 0.000000 (2000 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/long08-le3d-fd1.inp b/tests/regression/d3q19/long08-le3d-fd1.inp deleted file mode 100644 index 638ccff43..000000000 --- a/tests/regression/d3q19/long08-le3d-fd1.inp +++ /dev/null @@ -1,89 +0,0 @@ -############################################################################## -# -# Lees Edwards + Brazovski 3d smoke test -# -############################################################################## - -N_cycles 400 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_64 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.0833333333 -ghost_modes off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy brazovskii - -A -0.0005 -B 0.0005 -K -0.0006 -C 0.00076 - -noise 1.0 -phi0 0.0 -phi_initialisation spinodal -mobility 0.250 - -fd_advection_scheme_order 5 -fd_gradient_calculation 3d_27pt_fluid - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 400 -config_at_end no - -############################################################################### -# -# Lees-Edwards planes -# -############################################################################### - -N_LE_plane 2 -LE_plane_vel 0.0064 -LE_init_profile 0 - -############################################################################### -# -# Miscellaneous -############################################################################### - -random_seed -7361237 -#random_seed 8361235 diff --git a/tests/regression/d3q19/long08-le3d-fd1.log b/tests/regression/d3q19/long08-le3d-fd1.log deleted file mode 100644 index c26e95c07..000000000 --- a/tests/regression/d3q19/long08-le3d-fd1.log +++ /dev/null @@ -1,127 +0,0 @@ -Welcome to Ludwig v0.1.10 (MPI version running on 8 processes) - -The SVN revision details are: -Note assertions via standard C assert() are on. - -Read 25 user parameters from ./long08-le3d-fd1.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 3 -Reorder: true -Initialised: 1 - -Lees-Edwards boundary conditions are active: -LE plane 1 is at x = 16 with speed 0.006400 -LE plane 2 is at x = 48 with speed 0.006400 -Overall shear rate = 0.000200 - -Lees-Edwards time offset (time steps): 0 - -Free energy details -------------------- - -Brazovskii free energy selected. - -Brazovskii free energy parameters: -Bulk parameter A = -5.00000e-04 -Bulk parameter B = 5.00000e-04 -Ext. parameter C = 7.60000e-04 -Surface penalty kappa = -6.00000e-04 -Wavelength 2pi/q_0 = 1.00006e+01 -Amplitude = 1.28418e+00 - -Using Cahn-Hilliard solver: -Mobility M = 2.50000e-01 -Force caluclation: divergence method - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 8.33333e-02 -Bulk viscosity 8.33333e-02 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External electric field 0.00000e+00 0.00000e+00 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 7.50000e-01 -Bulk relaxation time: 7.50000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: -7361237 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 5 -Initialising phi for spinodal -Gradient calculation: 3d_27pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -1.3229656e+02 -5.0467131e-04 8.3511292e-02 -4.9999763e-01 4.9999902e-01 - -Momentum - x y z -[total ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 5.9344041e-10 0.99973172585 1.00011531489 -[phi] -1.3229656e+02 -5.0467131e-04 7.7403971e-03 -3.9249518e-01 3.6130991e-01 - -Free energy density - timestep total fluid -[fed] 400 4.9307913587e-06 4.9307913587e-06 - -Momentum - x y z -[total ] 3.6933512e-12 -8.8802165e-05 -3.0295211e-14 -[fluid ] 3.6933512e-12 -8.8802165e-05 -3.0295211e-14 - -Velocity - x y z -[minimum ] -9.7940007e-05 -3.1061948e-03 -1.0283819e-04 -[maximum ] 1.0006914e-04 3.1053377e-03 9.4483200e-05 - -Completed cycle 400 - -Timer resolution: 0.001 second - -Timer statistics - Section: tmin tmax total - Total: 128.446 128.447 128.447 128.446662 (1 call) - Time step loop: 0.193 0.873 127.999 0.319997 (400 calls) - Propagation: 0.005 0.152 8.289 0.020722 (400 calls) - Collision: 0.036 0.178 18.873 0.047183 (400 calls) - Lattice halos: 0.005 0.315 17.004 0.042509 (400 calls) - phi gradients: 0.024 0.203 21.391 0.053478 (400 calls) - Lees Edwards BC: 0.002 0.120 2.999 0.007498 (400 calls) - BBL: 0.000 0.000 0.002 0.000005 (400 calls) - Force calculation: 0.028 0.282 23.589 0.058971 (400 calls) - phi update: 0.047 0.317 35.262 0.088155 (400 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/long08-pair-yk1.inp b/tests/regression/d3q19/long08-pair-yk1.inp deleted file mode 100644 index 768fec238..000000000 --- a/tests/regression/d3q19/long08-pair-yk1.inp +++ /dev/null @@ -1,81 +0,0 @@ -############################################################################## -# -# Colloid pairwise interaction parallel smoke test -# Yukawa no noise: longer version of serial-pair-yk1.inp -# -############################################################################## - -N_cycles 400 - -size 64_64_64 -grid 2_2_2 -reduced_halo no - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.02 - -isothermal_fluctuations off -temperature 0.0002133333 - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy none - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_type inactive -colloid_init from_file - -colloid_cell_min 16.0 -colloid_gravity 0.0_0.0_0.0 - -lubrication_on 0 -yukawa_on 1 -yukawa_epsilon 1.330764285 -yukawa_kappa 0.72463768115 -yukawa_cutoff 16.0 - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Input/Output frequency -# -############################################################################### - -freq_statistics 400 -config_at_end no - -colloid_file_stub colloids-serial-pair-yk1 -colloids_io_grid 1_1_1 -colloid_io_format_input ASCII_SERIAL - -############################################################################### -# -# Miscellaneous -# -# random_seed +ve integer is the random number generator seed -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/long08-pair-yk1.log b/tests/regression/d3q19/long08-pair-yk1.log deleted file mode 100644 index 33cc0d03f..000000000 --- a/tests/regression/d3q19/long08-pair-yk1.log +++ /dev/null @@ -1,137 +0,0 @@ -Welcome to Ludwig v0.1.28 (MPI version running on 8 processes) - -The SVN revision details are: -Note assertions via standard C assert() are on. - -Read 25 user parameters from ./long08-pair-yk1.inp - -No free energy selected - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 2.00000e-02 -Bulk viscosity 2.00000e-02 -Temperature 2.13333e-04 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External electric field 0.00000e+00 0.00000e+00 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.60000e-01 -Bulk relaxation time: 5.60000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Colloid information -------------------- - -Colloid I/O settings --------------------- -Decomposition: 1 1 1 -Number of files: 1 -Input format: ascii -Output format: ascii -Single file read flag: 1 - -colloid_io_read: reading from single file colloids-serial-pair-yk1.001-001 -Read a total of 1000 colloids from file - -Initialised 1000 colloids - -Yukawa potential -epsilon: 1.3307643e+00 -epsilon / kt 6.2379586e+03 -kappa: 7.2463768e-01 -cut off (centre-centre) 1.6000000e+01 -cut off / kappa 2.2080000e+01 - -Colloid cell list information ------------------------------ -Input radius maximum: 2.4150000e+00 -Hydrodynamic radius maximum: 2.4150000e+00 -Surface-surface interaction: 0.0000000e+00 -Centre-centre interaction: 1.6000000e+01 -Final cell list: 2 2 2 -Final cell lengths: 1.6000000e+01 1.6000000e+01 1.6000000e+01 - -Initial conditions. - -Scalars - total mean variance min max -[rho] 202992.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 - -Momentum - x y z -[total ] 2.8170799e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 2.8170799e-12 0.0000000e+00 0.0000000e+00 -[colloids] 0.0000000e+00 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Particle statistics: -Pair potential minimum h is: 1.5269433e+00 -Pair potential energy is: 6.9683691e+00 - -Colloid velocities - x y z -[minimum ] -5.5057998e-04 -5.9614876e-04 -5.9365093e-04 -[maximum ] 4.8432994e-04 6.7473886e-04 6.1223022e-04 - -Scalars - total mean variance min max -[rho] 203065.00 1.00000000000 9.9593089e-10 0.99983323119 1.00013672062 - -Momentum - x y z -[total ] -9.8449027e-13 -5.5122573e-13 -8.4060536e-13 -[fluid ] 3.2040231e-02 5.4277334e-03 1.5039872e-02 -[colloids] -3.2040231e-02 -5.4277334e-03 -1.5039872e-02 - -Velocity - x y z -[minimum ] -5.4834735e-04 -6.0747033e-04 -6.4286070e-04 -[maximum ] 4.9854297e-04 6.9736957e-04 6.0877469e-04 - -Completed cycle 400 - -Timer resolution: 0.001 second - -Timer statistics - Section: tmin tmax total - Total: 44.840 44.841 44.840 44.840444 (1 call) - Time step loop: 0.100 0.131 44.720 0.111799 (400 calls) - Propagation: 0.002 0.009 1.662 0.004155 (400 calls) - Collision: 0.057 0.072 24.060 0.060150 (400 calls) - Lattice halos: 0.001 0.020 3.755 0.004693 (800 calls) - phi gradients: 0.000 0.000 0.000 0.000001 (400 calls) - Forces: 0.003 0.005 1.353 0.003381 (400 calls) - Rebuild: 0.006 0.010 2.915 0.007286 (400 calls) - BBL: 0.016 0.030 8.186 0.020464 (400 calls) - Particle halos: 0.002 0.016 2.562 0.006404 (400 calls) - Force calculation: 0.000 0.000 0.000 0.000001 (400 calls) - phi update: 0.000 0.000 0.000 0.000000 (400 calls) - Free1: 0.000 0.000 0.000 0.000000 (800 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/long64-chol-bp1.inp b/tests/regression/d3q19/long64-chol-bp1.inp deleted file mode 100644 index 479d021b6..000000000 --- a/tests/regression/d3q19/long64-chol-bp1.inp +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################## -# -# BPI test. -# Following initialisation in serial-init-bp1.inp -# -############################################################################## - -N_cycles 20000 - -############################################################################## -# -# System and MPI -# -############################################################################## - -size 32_32_32 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 1.666666666666 - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy lc_blue_phase -fd_gradient_calculation 3d_7pt_fluid - -############################################################################### -# -# Blue Phase free energy -# -############################################################################### - -lc_a0 0.014384711 -lc_gamma 3.1764706 -lc_q0 0.27768018 -lc_kappa0 0.01 -lc_kappa1 0.01 - -lc_xi 0.7 -lc_Gamma 0.1 - -lc_q_initialisation o8m -lc_q_init_amplitude -0.2 -lc_init_redshift 0.83 -lc_anchoring_method none - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 20000 -config_at_end no - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/long64-chol-bp1.log b/tests/regression/d3q19/long64-chol-bp1.log deleted file mode 100644 index d54c132ba..000000000 --- a/tests/regression/d3q19/long64-chol-bp1.log +++ /dev/null @@ -1,139 +0,0 @@ -Welcome to Ludwig v0.2.15 (MPI version running on 64 processes) - -The SVN revision details are: -Note assertions via standard C assert() are on. - -Read 23 user parameters from long64-chol-bp1.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 4 4 4 -Local domain: 8 8 8 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 1.4384711e-02 -Magnitude of order gamma = 3.1764706e+00 -Pitch wavevector q0 = 2.7768018e-01 -... gives pitch length = 2.2627417e+01 -Elastic constant kappa0 = 1.0000000e-02 -Elastic constant kappa1 = 1.0000000e-02 -Amplitude (uniaxial) order = -2.0000000e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 1.3500000e+00 -Reduced temperature = -5.0000003e-01 -Initial redshift = 8.3000000e-01 -Dynamic redshift update = no -LC activity constant zeta = 0.0000000e+00 - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e+00 -Bulk viscosity 1.66667e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.50000e+00 -Bulk relaxation time: 5.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab using O8M (BPI) -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -1.7053026e-13 -5.2041704e-18 6.0000000e-02 -4.4966058e-01 4.4966058e-01 -[phi] -1.4495072e-12 -4.4235449e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 -[phi] -1.5845103e-12 -4.8355417e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 -[phi] -2.1316282e-14 -6.5052130e-19 6.0000000e-02 -4.4966058e-01 4.4966058e-01 -[phi] -1.8189894e-12 -5.5511151e-17 5.0000000e-02 -6.0000000e-01 6.0000000e-01 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.7974870e-09 0.99995331917 1.00016701701 -[phi] 8.0824236e-13 2.4665599e-17 2.2598396e-02 -1.9090918e-01 3.6978523e-01 -[phi] 1.0195211e-07 3.1113316e-12 1.6031174e-02 -2.5750012e-01 2.5750012e-01 -[phi] 1.0195209e-07 3.1113307e-12 1.6031174e-02 -2.5750012e-01 2.5750012e-01 -[phi] 7.1054274e-13 2.1684043e-17 2.2598396e-02 -1.9090918e-01 3.6978523e-01 -[phi] 1.0195228e-07 3.1113367e-12 1.6031174e-02 -2.5750012e-01 2.5750012e-01 - -Free energy density - timestep total fluid -[fed] 20000 -1.4690016166e-04 -1.4690016166e-04 - -Momentum - x y z -[total ] 5.6200183e-13 3.9367468e-13 3.3562042e-13 -[fluid ] 5.6200183e-13 3.9367468e-13 3.3562042e-13 - -Velocity - x y z -[minimum ] -1.9484591e-06 -1.9484591e-06 -1.9484591e-06 -[maximum ] 1.9484593e-06 1.9484593e-06 1.9484593e-06 - -Completed cycle 20000 - -Timer resolution: 0.001 second - -Timer statistics - Section: tmin tmax total - Total: 265.670 265.707 265.692 265.691948 (1 call) - Time step loop: 0.012 0.178 265.336 0.013267 (20000 calls) - Propagation: 0.000 0.016 7.248 0.000362 (20000 calls) - Collision: 0.004 0.089 96.701 0.004835 (20000 calls) - Lattice halos: 0.000 0.119 21.891 0.001095 (20000 calls) - phi gradients: 0.000 0.155 19.706 0.000985 (20000 calls) - BBL: 0.000 0.000 0.023 0.000001 (20000 calls) - Force calculation: 0.003 0.080 69.657 0.003483 (20000 calls) - phi update: 0.001 0.081 48.831 0.002442 (20000 calls) - Collision (kernel): 0.004 0.089 88.310 0.004416 (20000 calls) -Chem stress (kernel): 0.002 0.080 63.491 0.003175 (20000 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/long64-chol-bp2.inp b/tests/regression/d3q19/long64-chol-bp2.inp deleted file mode 100644 index 297a2992b..000000000 --- a/tests/regression/d3q19/long64-chol-bp2.inp +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################## -# -# BPII test -# Following initialisation of serial-init-bp2.inp -# -############################################################################## - -N_cycles 20000 - -############################################################################## -# -# System and MPI -# -############################################################################## - -size 32_32_32 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 1.666666666666 - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy lc_blue_phase -fd_gradient_calculation 3d_7pt_fluid - -############################################################################### -# -# Blue Phase free energy -# -############################################################################### - -lc_a0 0.0069 -lc_gamma 3.0 -lc_q0 0.1963495 -lc_kappa0 0.02 -lc_kappa1 0.02 - -lc_xi 0.7 -lc_Gamma 0.1 - -lc_q_initialisation o2 -lc_q_init_amplitude 0.3 -lc_init_redshift 0.91 -lc_anchoring_method none - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 20000 -config_at_end no - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/long64-chol-bp2.log b/tests/regression/d3q19/long64-chol-bp2.log deleted file mode 100644 index 42c989c56..000000000 --- a/tests/regression/d3q19/long64-chol-bp2.log +++ /dev/null @@ -1,139 +0,0 @@ -Welcome to Ludwig v0.2.15 (MPI version running on 64 processes) - -The SVN revision details are: -Note assertions via standard C assert() are on. - -Read 23 user parameters from long64-chol-bp2.inp - -System details --------------- -System size: 32 32 32 -Decomposition: 4 4 4 -Local domain: 8 8 8 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Blue phase free energy selected. - -Liquid crystal blue phase free energy -Bulk parameter A0: = 6.9000000e-03 -Magnitude of order gamma = 3.0000000e+00 -Pitch wavevector q0 = 1.9634950e-01 -... gives pitch length = 3.2000007e+01 -Elastic constant kappa0 = 2.0000000e-02 -Elastic constant kappa1 = 2.0000000e-02 -Amplitude (uniaxial) order = 3.0000000e-01 -Effective aspect ratio xi = 7.0000000e-01 -Chirality = 2.0057255e+00 -Reduced temperature = 0.0000000e+00 -Initial redshift = 9.1000000e-01 -Dynamic redshift update = no -LC activity constant zeta = 0.0000000e+00 - -Using Beris-Edwards solver: -Rotational diffusion const = 1.0000000e-01 -LC fluctuations: = off - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.66667e+00 -Bulk viscosity 1.66667e+00 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Hydrodynamic modes: on -Ghost modes: on -Isothermal fluctuations: off -Shear relaxation time: 5.50000e+00 -Bulk relaxation time: 5.50000e+00 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 (default) -Gradient calculation: 3d_7pt_fluid - - -Initialising Q_ab using O2 (BPII) -Initial conditions. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 1.1368684e-13 3.4694470e-18 8.9999982e-02 -6.0000000e-01 6.0000000e-01 -[phi] -4.0156292e-04 -1.2254728e-08 4.5000009e-02 -3.0000000e-01 3.0000000e-01 -[phi] -4.0156293e-04 -1.2254728e-08 4.5000009e-02 -3.0000000e-01 3.0000000e-01 -[phi] 9.6633812e-13 2.9490299e-17 8.9999982e-02 -6.0000000e-01 6.0000000e-01 -[phi] -4.0156291e-04 -1.2254727e-08 4.5000009e-02 -3.0000000e-01 3.0000000e-01 - -Momentum - x y z -[total ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 -[fluid ] 4.5474735e-13 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 32768.00 1.00000000000 1.1629897e-10 0.99998760476 1.00002796095 -[phi] 5.0448534e-13 1.5395671e-17 1.8974269e-02 -1.7420184e-01 3.3686462e-01 -[phi] -2.1867716e-06 -6.6734973e-11 1.0496069e-02 -2.5072308e-01 2.5072308e-01 -[phi] -2.1867714e-06 -6.6734966e-11 1.0496069e-02 -2.5072308e-01 2.5072308e-01 -[phi] 5.6843419e-13 1.7347235e-17 1.8974269e-02 -1.7420184e-01 3.3686462e-01 -[phi] -2.1867716e-06 -6.6734972e-11 1.0496069e-02 -2.5072308e-01 2.5072308e-01 - -Free energy density - timestep total fluid -[fed] 20000 -3.1263312546e-05 -3.1263312546e-05 - -Momentum - x y z -[total ] 5.4114352e-13 2.2606222e-13 1.3559293e-13 -[fluid ] 5.4114352e-13 2.2606222e-13 1.3559293e-13 - -Velocity - x y z -[minimum ] -2.0393528e-07 -2.0393528e-07 -2.0393528e-07 -[maximum ] 2.0393543e-07 2.0393543e-07 2.0393543e-07 - -Completed cycle 20000 - -Timer resolution: 0.001 second - -Timer statistics - Section: tmin tmax total - Total: 269.789 269.820 269.807 269.807264 (1 call) - Time step loop: 0.012 0.155 269.481 0.013474 (20000 calls) - Propagation: 0.000 0.011 7.074 0.000354 (20000 calls) - Collision: 0.004 0.072 97.842 0.004892 (20000 calls) - Lattice halos: 0.000 0.103 24.199 0.001210 (20000 calls) - phi gradients: 0.000 0.101 19.879 0.000994 (20000 calls) - BBL: 0.000 0.015 0.025 0.000001 (20000 calls) - Force calculation: 0.003 0.068 70.286 0.003514 (20000 calls) - phi update: 0.001 0.089 48.898 0.002445 (20000 calls) - Collision (kernel): 0.004 0.072 88.384 0.004419 (20000 calls) -Chem stress (kernel): 0.002 0.068 63.646 0.003182 (20000 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/pmpi08-le2d-fd2.inp b/tests/regression/d3q19/pmpi08-le2d-fd2.inp deleted file mode 100644 index 9b6013187..000000000 --- a/tests/regression/d3q19/pmpi08-le2d-fd2.inp +++ /dev/null @@ -1,108 +0,0 @@ -############################################################################## -# -# Lees Edwards + Brazovskii 2d smoke test -# -############################################################################## - -############################################################################## -# -# Run duration -# -############################################################################### - -N_cycles 2600 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_1 -grid 2_4_1 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.0833333333 -temperature 0.00002133333 - -ghost_modes off -force 0.0_0.00_0.0 - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy brazovskii - -A -0.0005 -B 0.0005 -K -0.0006 -C 0.00076 - -noise 1.0 -phi0 0.0 -phi_initialisation spinodal -mobility 0.250 - -fd_advection_scheme_order 5 -fd_gradient_calculation 2d_5pt_fluid - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 2600 -config_at_end no - -############################################################################### -# -# Lees-Edwards planes -# -# These parameters set up a number of equally spaced planes -# with constant velocity. -# -# N_LE_plane the number of planes -# LE_plane_vel the y-component of the plane velocity -# LE_init_profile set the initial velocity profile to be consistent with -# desired shear rate. (Only valid at t = 0). [0|1] -# -############################################################################### - -N_LE_plane 2 -LE_plane_vel 0.0064 -LE_init_profile 0 - -############################################################################### -# -# Miscellaneous -# -# random_seed +ve integer is the random number generator seed -# -############################################################################### - -random_seed -7361237 diff --git a/tests/regression/d3q19/pmpi08-le2d-fd2.log b/tests/regression/d3q19/pmpi08-le2d-fd2.log deleted file mode 100644 index 4fa388057..000000000 --- a/tests/regression/d3q19/pmpi08-le2d-fd2.log +++ /dev/null @@ -1,135 +0,0 @@ -Welcome to Ludwig v0.7.33 (MPI version running on 8 processes) - -The SVN revision details are: 3210M -Note assertions via standard C assert() are on. - -Read 27 user parameters from pmpi08-le2d-fd2.inp - -System details --------------- -System size: 64 64 1 -Decomposition: 2 4 1 -Local domain: 32 16 1 -Periodic: 1 1 1 -Halo nhalo: 3 -Reorder: true -Initialised: 1 - -Lees-Edwards boundary conditions are active: -LE plane 1 is at x = 16 with speed 0.006400 -LE plane 2 is at x = 48 with speed 0.006400 -Overall shear rate = 0.000200 - -Lees-Edwards time offset (time steps): 0 - -Free energy details -------------------- - -Brazovskii free energy selected. - -Brazovskii free energy parameters: -Bulk parameter A = -5.00000e-04 -Bulk parameter B = 5.00000e-04 -Ext. parameter C = 7.60000e-04 -Surface penalty kappa = -6.00000e-04 -Wavelength 2pi/q_0 = 1.00006e+01 -Amplitude = 1.28418e+00 - -Using Cahn-Hilliard solver: -Mobility M = 2.50000e-01 -Force caluclation: divergence method - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 8.33333e-02 -Bulk viscosity 8.33333e-02 -Temperature 2.13333e-05 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 7.50000e-01 -Bulk relaxation time: 7.50000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: -7361237 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 5 -Initialising phi for spinodal -Gradient calculation: 2d_5pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -1.1802440e-01 -2.8814551e-05 8.2680383e-02 -4.9977721e-01 4.9988335e-01 - -Momentum - x y z -[total ] 5.6843419e-14 0.0000000e+00 0.0000000e+00 -[fluid ] 5.6843419e-14 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 6.9251671e-10 0.99992647849 1.00010395248 -[phi] -1.1802440e-01 -2.8814551e-05 1.4352315e-02 -3.7480300e-01 3.6512572e-01 - -Free energy density - timestep total fluid -[fed] 2600 -1.6553460541e-06 -1.6553460541e-06 - -Momentum - x y z -[total ] 3.3330977e-14 -1.3816011e-06 0.0000000e+00 -[fluid ] 3.3330977e-14 -1.3816011e-06 0.0000000e+00 - -Velocity - x y z -[minimum ] -1.6113681e-04 -3.1922442e-03 0.0000000e+00 -[maximum ] 1.3123970e-04 3.1976735e-03 1.1754944e-38 - -Completed cycle 2600 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 44.954 44.954 44.954 44.954330 (1 call) - Time step loop: 0.014 0.024 44.944 0.017286 (2600 calls) - Propagation: 0.000 0.003 3.424 0.001317 (2600 calls) - Propagtn (krnl) : 0.000 0.003 3.407 0.001310 (2600 calls) - Collision: 0.001 0.007 8.273 0.003182 (2600 calls) - Collision (krnl) : 0.001 0.007 8.245 0.003171 (2600 calls) - Lattice halos: 0.001 0.007 7.253 0.002790 (2600 calls) - phi gradients: 0.000 0.005 4.018 0.001546 (2600 calls) - phi halos: 0.000 0.004 3.051 0.001174 (2600 calls) - Lees Edwards BC: 0.000 0.007 4.582 0.001762 (2600 calls) - BBL: 0.000 0.002 0.002 0.000001 (2600 calls) - Force calculation: 0.001 0.003 3.539 0.001361 (2600 calls) - phi update: 0.003 0.011 11.838 0.004553 (2600 calls) - Advectn (krnl) : 0.000 0.004 1.643 0.000632 (2600 calls) - Advectn BCS (krnl) : 0.000 0.004 1.290 0.000496 (2600 calls) - Free1: 0.000 0.002 0.003 0.000001 (2600 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/pmpi08-le2d-lb1.inp b/tests/regression/d3q19/pmpi08-le2d-lb1.inp deleted file mode 100644 index 2ae4d1b3f..000000000 --- a/tests/regression/d3q19/pmpi08-le2d-lb1.inp +++ /dev/null @@ -1,104 +0,0 @@ -############################################################################## -# -# Lees Edwards + symmetric_lb 2d smoke test -# -############################################################################## - -############################################################################## -# -# Run duration -# -############################################################################### - -N_cycles 2600 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_1 -grid 2_4_1 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.1 - -ghost_modes off -force 0.0_0.00_0.0 - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy symmetric_lb - -A -0.0625 -B 0.0625 -K 0.04 - -phi0 0.0 -phi_initialisation spinodal -mobility 0.45 - -fd_gradient_calculation 3d_27pt_fluid - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 2600 -config_at_end no - -############################################################################### -# -# Lees-Edwards planes -# -# These parameters set up a number of equally spaced planes -# with constant velocity. -# -# N_LE_plane the number of planes -# LE_plane_vel the y-component of the plane velocity -# LE_init_profile set the initial velocity profile to be consistent with -# desired shear rate. (Only valid at t = 0). [0|1] -# -############################################################################### - -N_LE_plane 2 -LE_plane_vel 0.05 -LE_init_profile 1 - -############################################################################### -# -# Miscellaneous -# -# random_seed +ve integer is the random number generator seed -# -############################################################################### - -random_seed -7361237 diff --git a/tests/regression/d3q19/pmpi08-le2d-lb1.log b/tests/regression/d3q19/pmpi08-le2d-lb1.log deleted file mode 100644 index 710e5dd1a..000000000 --- a/tests/regression/d3q19/pmpi08-le2d-lb1.log +++ /dev/null @@ -1,128 +0,0 @@ -Welcome to Ludwig v0.7.33 (MPI version running on 8 processes) - -The SVN revision details are: 3210M -Note assertions via standard C assert() are on. - -Read 24 user parameters from pmpi08-le2d-lb1.inp - -System details --------------- -System size: 64 64 1 -Decomposition: 2 4 1 -Local domain: 32 16 1 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -Lees-Edwards boundary conditions are active: -LE plane 1 is at x = 16 with speed 0.050000 -LE plane 2 is at x = 48 with speed 0.050000 -Overall shear rate = 0.001563 - -Lees-Edwards time offset (time steps): 0 - -Free energy details -------------------- - -Symmetric phi^4 free energy selected. - -Parameters: -Bulk parameter A = -6.25000e-02 -Bulk parameter B = 6.25000e-02 -Surface penalty kappa = 4.00000e-02 -Surface tension = 4.71405e-02 -Interfacial width = 1.13137e+00 - -Using full lattice Boltzmann solver for Cahn-Hilliard: -Mobility M = 4.50000e-01 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 2 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: -7361237 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 -Initialising phi for spinodal -Initialising shear profile -Gradient calculation: 3d_27pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 0.0000000e+00 1.00000000000 1.00000000000 -[phi] -1.1802440e-02 -2.8814551e-06 8.2680383e-04 -4.9977721e-02 4.9988335e-02 - -Momentum - x y z -[total ] 1.5099033e-14 -1.5543122e-14 0.0000000e+00 -[fluid ] 1.5099033e-14 -1.5543122e-14 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 4096.00 1.00000000000 4.2323269e-05 0.97719283427 1.02804195103 -[phi] -1.1802440e-02 -2.8814551e-06 8.4887719e-01 -1.0190475e+00 1.0178491e+00 - -Free energy density - timestep total fluid -[fed] 2600 -1.3296135943e-02 -1.3296135943e-02 - -Momentum - x y z -[total ] 6.2394534e-14 -1.6570329e-01 0.0000000e+00 -[fluid ] 6.2394534e-14 -1.6570329e-01 0.0000000e+00 - -Velocity - x y z -[minimum ] -3.3920054e-02 -7.5796082e-02 0.0000000e+00 -[maximum ] 2.3283628e-02 5.5441921e-02 1.1754944e-38 - -Completed cycle 2600 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 29.452 29.452 29.452 29.452186 (1 call) - Time step loop: 0.008 0.017 29.439 0.011323 (2600 calls) - Propagation: 0.000 0.003 2.648 0.001018 (2600 calls) - Propagtn (krnl) : 0.000 0.003 2.633 0.001013 (2600 calls) - Collision: 0.001 0.005 5.581 0.002147 (2600 calls) - Collision (krnl) : 0.001 0.005 5.561 0.002139 (2600 calls) - Lattice halos: 0.001 0.007 6.886 0.002649 (2600 calls) - phi gradients: 0.001 0.008 9.290 0.003573 (2600 calls) - phi halos: 0.000 0.004 4.269 0.001642 (2600 calls) - Lees Edwards BC: 0.000 0.005 4.394 0.001690 (2600 calls) - BBL: 0.000 0.001 0.002 0.000001 (2600 calls) - Free1: 0.000 0.002 0.003 0.000001 (2600 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/pmpi08-le3d-fd1.inp b/tests/regression/d3q19/pmpi08-le3d-fd1.inp deleted file mode 100644 index fbdb2349d..000000000 --- a/tests/regression/d3q19/pmpi08-le3d-fd1.inp +++ /dev/null @@ -1,88 +0,0 @@ -############################################################################## -# -# Lees Edwards + symmetric 3d FD smoke test -# -############################################################################## - -N_cycles 400 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_64 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.1 -ghost_modes off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy symmetric - -A -0.0625 -B 0.0625 -K 0.04 - -phi0 0.0 -phi_initialisation spinodal -mobility 0.15 - -fd_gradient_calculation 3d_27pt_fluid -fd_advection_scheme_order 3 - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 400 -config_at_end no - -############################################################################### -# -# Lees-Edwards planes -# -############################################################################### - -N_LE_plane 2 -LE_plane_vel 0.05 -LE_init_profile 1 - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed -7361237 -#random_seed 8361235 diff --git a/tests/regression/d3q19/pmpi08-le3d-fd1.log b/tests/regression/d3q19/pmpi08-le3d-fd1.log deleted file mode 100644 index 00172a9e1..000000000 --- a/tests/regression/d3q19/pmpi08-le3d-fd1.log +++ /dev/null @@ -1,136 +0,0 @@ -Welcome to Ludwig v0.7.33 (MPI version running on 8 processes) - -The SVN revision details are: 3210M -Note assertions via standard C assert() are on. - -Read 24 user parameters from pmpi08-le3d-fd1.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Lees-Edwards boundary conditions are active: -LE plane 1 is at x = 16 with speed 0.050000 -LE plane 2 is at x = 48 with speed 0.050000 -Overall shear rate = 0.001563 - -Lees-Edwards time offset (time steps): 0 - -Free energy details -------------------- - -Symmetric phi^4 free energy selected. - -Parameters: -Bulk parameter A = -6.25000e-02 -Bulk parameter B = 6.25000e-02 -Surface penalty kappa = 4.00000e-02 -Surface tension = 4.71405e-02 -Interfacial width = 1.13137e+00 - -Using Cahn-Hilliard finite difference solver. -Mobility M = 1.50000e-01 -Order parameter noise = off -Force calculation: divergence method - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: -7361237 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 3 -Initialising phi for spinodal -Initialising shear profile -Gradient calculation: 3d_27pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 0.0000000e+00 1.00000000000 1.00000000000 -[phi] -1.3229656e+01 -5.0467131e-05 8.3511292e-04 -4.9999763e-02 4.9999902e-02 - -Momentum - x y z -[total ] 9.6633812e-13 2.3980817e-14 0.0000000e+00 -[fluid ] 9.6633812e-13 2.3980817e-14 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 1.4570567e-10 0.99996125762 1.00016202704 -[phi] -1.3229656e+01 -5.0467131e-05 3.6492859e-04 -9.3832553e-02 8.2004113e-02 - -Free energy density - timestep total fluid -[fed] 400 -7.2148542434e-06 -7.2148542434e-06 - -Momentum - x y z -[total ] 1.0675349e-12 -1.9819022e-04 4.6199156e-14 -[fluid ] 1.0675349e-12 -1.9819022e-04 4.6199156e-14 - -Velocity - x y z -[minimum ] -9.2548063e-05 -2.4262607e-02 -8.7312388e-05 -[maximum ] 1.1018002e-04 2.4269478e-02 8.4308587e-05 - -Completed cycle 400 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 87.920 87.921 87.921 87.920572 (1 call) - Time step loop: 0.189 0.252 87.770 0.219424 (400 calls) - Propagation: 0.003 0.026 3.367 0.008418 (400 calls) - Propagtn (krnl) : 0.003 0.026 3.364 0.008411 (400 calls) - Collision: 0.006 0.066 9.673 0.024182 (400 calls) - Collision (krnl) : 0.006 0.066 9.668 0.024171 (400 calls) - Lattice halos: 0.002 0.051 5.812 0.014531 (400 calls) - phi gradients: 0.014 0.083 19.676 0.049190 (400 calls) - phi halos: 0.001 0.025 3.703 0.009258 (400 calls) - Lees Edwards BC: 0.002 0.062 5.973 0.014933 (400 calls) - BBL: 0.000 0.000 0.000 0.000001 (400 calls) - Force calculation: 0.024 0.078 15.848 0.039619 (400 calls) - phi update: 0.022 0.113 26.323 0.065808 (400 calls) - Advectn (krnl) : 0.004 0.078 8.686 0.021715 (400 calls) - Advectn BCS (krnl) : 0.001 0.048 1.173 0.002932 (400 calls) - Free1: 0.000 0.058 0.048 0.000120 (400 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/pmpi08-le3d-lb1.inp b/tests/regression/d3q19/pmpi08-le3d-lb1.inp deleted file mode 100644 index 218699a16..000000000 --- a/tests/regression/d3q19/pmpi08-le3d-lb1.inp +++ /dev/null @@ -1,97 +0,0 @@ -############################################################################## -# -# 3d LE test with symmetric_lb -# -############################################################################## - -############################################################################## -# -# Run duration -# -############################################################################### - -N_cycles 400 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_64 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.1 - -ghost_modes off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy symmetric_lb - -A -0.0625 -B 0.0625 -K 0.04 - -phi0 0.0 -fd_gradient_calculation 3d_27pt_fluid -phi_initialisation spinodal -mobility 6.0 - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 400 -freq_measure 2000000 -freq_config 5000000 -config_at_end no - -############################################################################### -# -# Lees-Edwards planes -# -############################################################################### - -N_LE_plane 2 -LE_plane_vel 0.005 -LE_init_profile 0 - -############################################################################### -# -# Miscellaneous -# -# random_seed +ve integer is the random number generator seed -# -############################################################################### - -random_seed -7361237 -#random_seed 8361235 diff --git a/tests/regression/d3q19/pmpi08-le3d-lb1.log b/tests/regression/d3q19/pmpi08-le3d-lb1.log deleted file mode 100644 index cbeb075f1..000000000 --- a/tests/regression/d3q19/pmpi08-le3d-lb1.log +++ /dev/null @@ -1,127 +0,0 @@ -Welcome to Ludwig v0.7.33 (MPI version running on 8 processes) - -The SVN revision details are: 3210M -Note assertions via standard C assert() are on. - -Read 25 user parameters from pmpi08-le3d-lb1.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -Lees-Edwards boundary conditions are active: -LE plane 1 is at x = 16 with speed 0.005000 -LE plane 2 is at x = 48 with speed 0.005000 -Overall shear rate = 0.000156 - -Lees-Edwards time offset (time steps): 0 - -Free energy details -------------------- - -Symmetric phi^4 free energy selected. - -Parameters: -Bulk parameter A = -6.25000e-02 -Bulk parameter B = 6.25000e-02 -Surface penalty kappa = 4.00000e-02 -Surface tension = 4.71405e-02 -Interfacial width = 1.13137e+00 - -Using full lattice Boltzmann solver for Cahn-Hilliard: -Mobility M = 6.00000e+00 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 1.00000e-01 -Bulk viscosity 1.00000e-01 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 2 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 8.00000e-01 -Bulk relaxation time: 8.00000e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: -7361237 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 -Initialising phi for spinodal -Gradient calculation: 3d_27pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] -1.3229656e+01 -5.0467131e-05 8.3511292e-04 -4.9999763e-02 4.9999902e-02 - -Momentum - x y z -[total ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 4.4258322e-05 0.98053373171 1.04538207072 -[phi] -1.3229656e+01 -5.0467131e-05 6.5365468e-01 -1.0149862e+00 1.0160211e+00 - -Free energy density - timestep total fluid -[fed] 400 -9.2341449640e-03 -9.2341449640e-03 - -Momentum - x y z -[total ] -1.2363444e-12 2.1834660e-01 3.4390268e-12 -[fluid ] -1.2363444e-12 2.1834660e-01 3.4390268e-12 - -Velocity - x y z -[minimum ] -7.1527744e-02 -6.5077371e-02 -6.2861395e-02 -[maximum ] 7.2896817e-02 7.9820659e-02 8.0104471e-02 - -Completed cycle 400 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 79.471 79.471 79.471 79.471043 (1 call) - Time step loop: 0.152 0.249 79.303 0.198257 (400 calls) - Propagation: 0.005 0.057 6.177 0.015442 (400 calls) - Propagtn (krnl) : 0.005 0.057 6.174 0.015434 (400 calls) - Collision: 0.014 0.129 27.566 0.068916 (400 calls) - Collision (krnl) : 0.014 0.129 27.558 0.068896 (400 calls) - Lattice halos: 0.004 0.073 9.567 0.023917 (400 calls) - phi gradients: 0.011 0.165 29.061 0.072653 (400 calls) - phi halos: 0.001 0.043 6.386 0.015964 (400 calls) - Lees Edwards BC: 0.004 0.095 6.088 0.015219 (400 calls) - BBL: 0.000 0.000 0.000 0.000001 (400 calls) - Free1: 0.000 0.089 0.060 0.000149 (400 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/pmpi08-spin-fd1.inp b/tests/regression/d3q19/pmpi08-spin-fd1.inp deleted file mode 100644 index 450360189..000000000 --- a/tests/regression/d3q19/pmpi08-spin-fd1.inp +++ /dev/null @@ -1,86 +0,0 @@ -############################################################################## -# -# Spinodal finite difference smoke test -# Longer version of serial-spin-fd1.inp -# -############################################################################## - -############################################################################## -# -# Run duration -# -############################################################################### - -N_cycles 400 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_64 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.00625 -ghost_modes off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy symmetric - -A -0.00625 -B 0.00625 -K 0.004 -C 0.0 - -phi0 0.0 -phi_initialisation spinodal -mobility 1.25 - -fd_gradient_calculation 3d_27pt_fluid -fd_advection_scheme_order 1 - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 400 -config_at_end no - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/pmpi08-spin-fd1.log b/tests/regression/d3q19/pmpi08-spin-fd1.log deleted file mode 100644 index 04426ef5e..000000000 --- a/tests/regression/d3q19/pmpi08-spin-fd1.log +++ /dev/null @@ -1,128 +0,0 @@ -Welcome to Ludwig v0.7.33 (MPI version running on 8 processes) - -The SVN revision details are: 3210M -Note assertions via standard C assert() are on. - -Read 21 user parameters from pmpi08-spin-fd1.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 2 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Symmetric phi^4 free energy selected. - -Parameters: -Bulk parameter A = -6.25000e-03 -Bulk parameter B = 6.25000e-03 -Surface penalty kappa = 4.00000e-03 -Surface tension = 4.71405e-03 -Interfacial width = 1.13137e+00 - -Using Cahn-Hilliard finite difference solver. -Mobility M = 1.25000e+00 -Order parameter noise = off -Force calculation: divergence method - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 6.25000e-03 -Bulk viscosity 6.25000e-03 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 1 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 5.18750e-01 -Bulk relaxation time: 5.18750e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 - -Advection scheme order: 1 -Initialising phi for spinodal -Gradient calculation: 3d_27pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 3.1484764e+00 1.2010484e-05 8.3289934e-04 -4.9999916e-02 4.9999705e-02 - -Momentum - x y z -[total ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 1.0389467e-12 0.99999634314 1.00000970068 -[phi] 3.1484764e+00 1.2010484e-05 2.8562911e-04 -7.1620898e-02 6.9687036e-02 - -Free energy density - timestep total fluid -[fed] 400 -5.5560937586e-07 -5.5560937586e-07 - -Momentum - x y z -[total ] 3.5668586e-12 -1.4080750e-13 9.1662788e-14 -[fluid ] 3.5668586e-12 -1.4080750e-13 9.1662788e-14 - -Velocity - x y z -[minimum ] -3.7368581e-05 -4.8355181e-05 -4.3305701e-05 -[maximum ] 5.0422966e-05 6.6450613e-05 5.1930662e-05 - -Completed cycle 400 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 77.428 77.428 77.428 77.428146 (1 call) - Time step loop: 0.166 0.218 77.308 0.193270 (400 calls) - Propagation: 0.003 0.024 3.480 0.008700 (400 calls) - Propagtn (krnl) : 0.003 0.024 3.476 0.008689 (400 calls) - Collision: 0.006 0.070 12.338 0.030844 (400 calls) - Collision (krnl) : 0.006 0.070 12.334 0.030834 (400 calls) - Lattice halos: 0.002 0.072 9.824 0.024560 (400 calls) - phi gradients: 0.010 0.101 20.217 0.050543 (400 calls) - phi halos: 0.001 0.092 10.971 0.027428 (400 calls) - BBL: 0.000 0.000 0.000 0.000001 (400 calls) - Force calculation: 0.006 0.077 11.502 0.028756 (400 calls) - Phi force (krnl) : 0.004 0.073 8.802 0.022005 (400 calls) - phi update: 0.008 0.128 19.172 0.047930 (400 calls) - Advectn (krnl) : 0.002 0.051 1.868 0.004670 (400 calls) - Advectn BCS (krnl) : 0.001 0.056 1.017 0.002542 (400 calls) - Free1: 0.000 0.054 0.045 0.000111 (400 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q19/pmpi08-spin-lb1.inp b/tests/regression/d3q19/pmpi08-spin-lb1.inp deleted file mode 100644 index 8607e7a57..000000000 --- a/tests/regression/d3q19/pmpi08-spin-lb1.inp +++ /dev/null @@ -1,84 +0,0 @@ -############################################################################## -# -# Spinodal LB smoke test -# Longer version of serial-spin-lb1.inp -# -############################################################################## - -############################################################################## -# -# Run duration -# -############################################################################### - -N_cycles 400 - -############################################################################## -# -# System -# -############################################################################## - -size 64_64_64 -grid 2_2_2 - -############################################################################## -# -# Fluid parameters -# -############################################################################## - -viscosity 0.00625 -ghost_modes off - -############################################################################## -# -# Free energy parameters -# -############################################################################### - -free_energy symmetric_lb - -A -0.00625 -B 0.00625 -K 0.004 -C 0.0 - -phi0 0.0 -phi_initialisation spinodal -mobility 3.75 -fd_gradient_calculation 3d_27pt_fluid - -############################################################################### -# -# Colloid parameters -# -############################################################################### - -colloid_init no_colloids - -############################################################################### -# -# Periodic conditions / boundaries -# -############################################################################### - -boundary_walls_on no -periodicity 1_1_1 - -############################################################################### -# -# Output frequency and type -# -############################################################################### - -freq_statistics 400 -config_at_end no - -############################################################################### -# -# Miscellaneous -# -############################################################################### - -random_seed 8361235 diff --git a/tests/regression/d3q19/pmpi08-spin-lb1.log b/tests/regression/d3q19/pmpi08-spin-lb1.log deleted file mode 100644 index 10a0f1783..000000000 --- a/tests/regression/d3q19/pmpi08-spin-lb1.log +++ /dev/null @@ -1,119 +0,0 @@ -Welcome to Ludwig v0.7.33 (MPI version running on 8 processes) - -The SVN revision details are: 3210M -Note assertions via standard C assert() are on. - -Read 20 user parameters from pmpi08-spin-lb1.inp - -System details --------------- -System size: 64 64 64 -Decomposition: 2 2 2 -Local domain: 32 32 32 -Periodic: 1 1 1 -Halo nhalo: 1 -Reorder: true -Initialised: 1 - -Free energy details -------------------- - -Symmetric phi^4 free energy selected. - -Parameters: -Bulk parameter A = -6.25000e-03 -Bulk parameter B = 6.25000e-03 -Surface penalty kappa = 4.00000e-03 -Surface tension = 4.71405e-03 -Interfacial width = 1.13137e+00 - -Using full lattice Boltzmann solver for Cahn-Hilliard: -Mobility M = 3.75000e+00 - -System properties ----------------- -Mean fluid density: 1.00000e+00 -Shear viscosity 6.25000e-03 -Bulk viscosity 6.25000e-03 -Temperature 0.00000e+00 -External body force density 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field amplitude 0.00000e+00 0.00000e+00 0.00000e+00 -External E-field frequency 0.00000e+00 -External magnetic field 0.00000e+00 0.00000e+00 0.00000e+00 - -Lattice Boltzmann distributions -------------------------------- -Model: d3q19 -SIMD vector len: 1 -Number of sets: 2 -Halo type: full -Input format: binary -Output format: binary -I/O grid: 1 1 1 - -Lattice Boltzmann collision ---------------------------- -Relaxation time scheme: M10 -Hydrodynamic modes: on -Ghost modes: off -Isothermal fluctuations: off -Shear relaxation time: 5.18750e-01 -Bulk relaxation time: 5.18750e-01 -Ghost relaxation time: 1.00000e+00 -[User ] Random number seed: 8361235 - -Hydrodynamics -------------- -Hydrodynamics: on - -Order parameter I/O -------------------- -Order parameter I/O format: -I/O decomposition: 1 1 1 -Initialising phi for spinodal -Gradient calculation: 3d_27pt_fluid -Initial conditions. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 2.2204460e-16 1.00000000000 1.00000000000 -[phi] 3.1484764e+00 1.2010484e-05 8.3289934e-04 -4.9999916e-02 4.9999705e-02 - -Momentum - x y z -[total ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 -[fluid ] 3.6379788e-12 0.0000000e+00 0.0000000e+00 - -Starting time step loop. - -Scalars - total mean variance min max -[rho] 262144.00 1.00000000000 8.6439744e-12 0.99998918253 1.00003227165 -[phi] 3.1484764e+00 1.2010484e-05 5.0209947e-04 -9.7618051e-02 8.9753962e-02 - -Free energy density - timestep total fluid -[fed] 400 -1.0487384227e-06 -1.0487384227e-06 - -Momentum - x y z -[total ] 6.8594436e-14 -5.3724386e-14 -7.9096452e-14 -[fluid ] 6.8594436e-14 -5.3724386e-14 -7.9096452e-14 - -Velocity - x y z -[minimum ] -6.4411425e-05 -9.6213900e-05 -8.0159249e-05 -[maximum ] 9.7876012e-05 1.2081571e-04 1.0236469e-04 - -Completed cycle 400 - -Timer resolution: 1e-06 second - -Timer statistics - Section: tmin tmax total - Total: 75.175 75.175 75.175 75.174660 (1 call) - Time step loop: 0.142 0.232 75.004 0.187509 (400 calls) - Propagation: 0.005 0.058 6.254 0.015635 (400 calls) - Propagtn (krnl) : 0.005 0.058 6.251 0.015628 (400 calls) - Collision: 0.013 0.123 29.404 0.073510 (400 calls) - Collision (krnl) : 0.013 0.123 29.396 0.073489 (400 calls) - Lattice halos: 0.003 0.112 10.948 0.027370 (400 calls) - phi gradients: 0.010 0.152 27.642 0.069104 (400 calls) - phi halos: 0.001 0.136 13.722 0.034306 (400 calls) - BBL: 0.000 0.000 0.000 0.000001 (400 calls) - Free1: 0.000 0.076 0.061 0.000153 (400 calls) -Ludwig finished normally. diff --git a/tests/regression/d3q27/Makefile b/tests/regression/d3q27/Makefile index 38e518d99..023475870 100644 --- a/tests/regression/d3q27/Makefile +++ b/tests/regression/d3q27/Makefile @@ -8,12 +8,11 @@ include ../../../Makefile.mk -SER=${LAUNCH_SERIAL_CMD} -PAR=${LAUNCH_MPI_CMD} ${LAUNCH_MPI_NP_SWITCH} +PAR=${LAUNCH_MPIRUN_CMD} serial: - @echo "TEST --> regression tests serial" + @echo "TEST --> regression tests (d3q27)" inputs='serial*inp'; \ - for file in $$inputs; do ../../test.sh $$file "" ""; done + for file in $$inputs; do ../../test.sh $$file "" "$(PAR)"; done clean: rm -f *new test-diff* input diff --git a/tests/test-diff.sh b/tests/test-diff.sh index 05ae0227f..652d95626 100755 --- a/tests/test-diff.sh +++ b/tests/test-diff.sh @@ -15,7 +15,7 @@ # - the run times # - Version information # - exact location of input file -# - compiler deatils +# - compiler details # - allow "Model R" tests to pass by looking for "d3q19 R" etc # # Options: @@ -26,7 +26,7 @@ # # Contributing Authors: # Kevin Stratford (kevin@epcc.ed.ac.uk) -# (c) 2013-2023 The University of Edinburgh +# (c) 2013-2024 The University of Edinburgh # ############################################################################### @@ -77,7 +77,7 @@ fi # - timer statistics identified via "call)" or "calls)" # - blank lines # - "Timer resolution" -# - exact location of the input file via "user parameters" +# - exact location of the input file via "user parameters" sed '/call)/d' $1 > test-diff-tmp.ref sed -i~ '/calls)/d' test-diff-tmp.ref @@ -126,6 +126,19 @@ sed -i~ '/SIMD\ vector/d' test-diff-tmp.log sed -i~ '/Start time/d' test-diff-tmp.log sed -i~ '/End time/d' test-diff-tmp.log +# Allow different decompositions ... +# The strategy is that we can ignore these simple quantities, as +# they should be captured by the unit tests (famous last words...) +sed -i~ '/Decomposition/d' test-diff-tmp.ref +sed -i~ '/Decomposition/d' test-diff-tmp.log +sed -i~ '/Local domain/d' test-diff-tmp.ref +sed -i~ '/Local domain/d' test-diff-tmp.log +sed -i~ '/Final cell list/d' test-diff-tmp.ref +sed -i~ '/Final cell list/d' test-diff-tmp.log +sed -i~ '/Final cell lengths/d' test-diff-tmp.ref +sed -i~ '/Final cell lengths/d' test-diff-tmp.log + + # Here we use the floating point diff to measure "success" var=`$FPDIFF test-diff-tmp.ref test-diff-tmp.log | wc -l` @@ -140,4 +153,3 @@ fi rm -rf test-diff-tmp.ref test-diff-tmp.log exit $var - diff --git a/tests/unit/test_util_ellipsoid.c b/tests/unit/test_util_ellipsoid.c index 27e9cf70a..9def6e782 100644 --- a/tests/unit/test_util_ellipsoid.c +++ b/tests/unit/test_util_ellipsoid.c @@ -31,6 +31,9 @@ int test_util_q4_from_omega(void); int test_util_q4_is_inside_ellipsoid(void); int test_util_q4_inertia_tensor(void); +int test_util_q4_r(void); +int test_util_q4_distance_to_tangent_plane(void); + int test_util_ellipsoid_is_sphere(void); int test_util_ellipsoid_euler_from_vectors(void); int test_util_ellipsoid_prolate_settling_velocity(void); @@ -58,6 +61,9 @@ int test_util_ellipsoid_suite(void) { test_util_q4_is_inside_ellipsoid(); test_util_q4_inertia_tensor(); + test_util_q4_r(); + test_util_q4_distance_to_tangent_plane(); + test_util_ellipsoid_is_sphere(); test_util_ellipsoid_euler_from_vectors(); test_util_ellipsoid_prolate_settling_velocity(); @@ -773,3 +779,231 @@ int test_util_discrete_volume_ellipsoid(void) { return ifail; } + +/***************************************************************************** + * + * test_util_q4_r + * + * Quaternion to rotation matrix. + * + *****************************************************************************/ + +int test_util_q4_r(void) { + + int ifail = 0; + PI_DOUBLE(pi); + + /* trivial case */ + { + double q[4] = {1.0, 0.0, 0.0, 0.0}; + double r[3][3] = {0}; + + util_q4_to_r(q, r); + + assert(fabs(r[0][0] - 1.0) < DBL_EPSILON); + assert(fabs(r[0][1] - 0.0) < DBL_EPSILON); + assert(fabs(r[0][2] - 0.0) < DBL_EPSILON); + assert(fabs(r[1][0] - 0.0) < DBL_EPSILON); + assert(fabs(r[1][1] - 1.0) < DBL_EPSILON); + assert(fabs(r[1][2] - 0.0) < DBL_EPSILON); + assert(fabs(r[2][0] - 0.0) < DBL_EPSILON); + assert(fabs(r[2][1] - 0.0) < DBL_EPSILON); + assert(fabs(r[2][2] - 1.0) < DBL_EPSILON); + } + + /* Rotate around z */ + { + double phi = pi/6.0; + double theta = 0.0; + double psi = 0.0; + double q[4] = {0}; + double r[3][3] = {0}; + + ifail = util_q4_from_euler_angles(phi, theta, psi, q); + assert(ifail == 0); + + util_q4_to_r(q, r); + + assert(fabs(r[0][0] - cos(phi)) < DBL_EPSILON); + assert(fabs(r[0][1] + sin(phi)) < DBL_EPSILON); + assert(fabs(r[0][2] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[1][0] - sin(phi)) < DBL_EPSILON); + assert(fabs(r[1][1] - cos(phi)) < DBL_EPSILON); + assert(fabs(r[1][2] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[2][0] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[2][1] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[2][2] - 1.0 ) < 2.0*DBL_EPSILON); + } + + /* Rotate around x (no z rotation) */ + { + double phi = 0.0; + double theta = pi/3.0; + double psi = 0.0; + double q[4] = {0}; + double r[3][3] = {0}; + + ifail = util_q4_from_euler_angles(phi, theta, psi, q); + assert(ifail == 0); + + util_q4_to_r(q, r); + + assert(fabs(r[0][0] - 1.0 ) < 2.0*DBL_EPSILON); /* v. close */ + assert(fabs(r[0][1] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[0][2] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[1][0] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[1][1] - cos(theta)) < DBL_EPSILON); + assert(fabs(r[1][2] + sin(theta)) < DBL_EPSILON); + assert(fabs(r[2][0] - 0.0 ) < DBL_EPSILON); + assert(fabs(r[2][1] - sin(theta)) < DBL_EPSILON); + assert(fabs(r[2][2] - cos(theta)) < DBL_EPSILON); + } + + return ifail; +} + +/***************************************************************************** + * + * test_util_q4_distance_to_tangent_plane + * + * nb. most of these pass at DBL_EPSILON, but there are a few that will + * not, so relax to FLT_EPSILON (mostly). + * + *****************************************************************************/ + +int test_util_q4_distance_to_tangent_plane(void) { + + int ifail = 0; + + double a = 3.0; + double b = 4.0; + double c = 5.0; + double abc[3] = {a, b, c}; + + PI_DOUBLE(pi); + + /* Principal axes aligned with lab frame. */ + { + double q[4] = {1.0, 0.0, 0.0, 0.0}; + + /* x-y plane */ + { + double d = -1.0; + double nhat[3] = {0.0, 0.0, 1.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - c) < DBL_EPSILON); + } + + /* y-z plane */ + { + double d = -1.0; + double nhat[3] = {1.0, 0.0, 0.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - a) < DBL_EPSILON); + } + + /* x-z plane */ + { + double d = -1.0; + double nhat[3] = {0.0, 1.0, 0.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - b) < DBL_EPSILON); + } + } + + + /* z-rotation of principal axes (30^o)*/ + { + double phi = pi/6.0; + double theta = 0.0; + double psi = 0.0; + double q[4] = {0}; + + ifail = util_q4_from_euler_angles(phi, theta, psi, q); + assert(ifail == 0); + + /* x-y plane (should be unchanged) */ + { + double d = -1.0; + double nhat[3] = {0.0, 0.0, -1.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - c) < FLT_EPSILON); + } + /* y-z plane */ + { + double d = -1.0; + double d0 = a*a*cos(phi)*cos(phi) + b*b*sin(phi)*sin(phi); + double nhat[3] = {-1.0, 0.0, 0.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - sqrt(d0)) < FLT_EPSILON); + } + } + + + /* z-rotation of principal axes (60^o)*/ + { + double phi = pi/3.0; + double theta = 0.0; + double psi = 0.0; + double q[4] = {0}; + + ifail = util_q4_from_euler_angles(phi, theta, psi, q); + assert(ifail == 0); + + /* x-y plane (should be unchanged) */ + { + double d = -1.0; + double nhat[3] = {0.0, 0.0, -1.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - c) < FLT_EPSILON); + } + /* y-z plane */ + { + double d = -1.0; + double d0 = a*a*cos(phi)*cos(phi) + b*b*sin(phi)*sin(phi); + double nhat[3] = {-1.0, 0.0, 0.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - sqrt(d0)) < FLT_EPSILON); + } + } + + + /* z-rotation of principal axes (90^o)*/ + { + double phi = pi/2.0; + double theta = 0.0; + double psi = 0.0; + double q[4] = {0}; + + ifail = util_q4_from_euler_angles(phi, theta, psi, q); + assert(ifail == 0); + + { + double d = -1.0; + double nhat[3] = {+1.0, 0.0, 0.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - b) < FLT_EPSILON); + } + } + + /* Rotation about z- and x'- axes. */ + /* This differentiates q and q^*, unlike the previous cases. */ + { + double phi = pi/2.0; + double theta = pi/2.0; + double psi = 0.0; + double q[4] = {0}; + + ifail = util_q4_from_euler_angles(phi, theta, psi, q); + assert(ifail == 0); + + { + double d = -1.0; + double nhat[3] = {+1.0, 0.0, 0.0}; + d = util_q4_distance_to_tangent_plane(abc, q, nhat); + assert(fabs(d - c) < FLT_EPSILON); + } + } + + return ifail; +}