Skip to content

Commit

Permalink
Merge pull request #186 from ludwig-cf/develop
Browse files Browse the repository at this point in the history
Release 0.17.0
  • Loading branch information
kevinstratford committed Jul 13, 2022
2 parents 9819ad1 + 2db691c commit 720a794
Show file tree
Hide file tree
Showing 54 changed files with 4,903 additions and 71 deletions.
21 changes: 21 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@

### Changes

version 0.17.0

- add liquid crystal anchoring "fd_gradient_calculation s7_anchoring"
- this is a replcement for "3d_7pt_fluid" and does a slightly better
job at the edges and corners by using a consistent surface normal.
The anchoring properties are now specifed in a slightly different
way.
- For walls, see https://ludwig.epcc.ed.ac.uk/inputs/walls.html
- For colloids, see https://ludwig.epcc.ed.ac.uk/inputs/colloid.html

- The existing fd_gradient_calculation 3d_7pt_solid is retained, and
existing input keys for anchoring will be recognised.

- add option for rectilinear grid format vtk output "extract -l"
- add option for 2d random nematic "lc_q_initialisation random_xy"

- A functional AMD GPU version is now available using HIP.
- See https://ludwig.epcc.ed.ac.uk/building/index.html

- Various minor improvements

version 0.16.1

- And get the version number right!
Expand Down
2 changes: 1 addition & 1 deletion docs/liquidcrystal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ \subsection{Dynamics}

\begin{equation}
\partial_t Q_{\alpha\beta} + \partial_\gamma (u_\gamma Q_{\alpha\beta})
+ S_{\alpha\beta}(W_{\alpha\beta}, Q_{\alpha\beta}) = -\Gamma H_{\alpha\beta}.
+ S_{\alpha\beta}(W_{\alpha\beta}, Q_{\alpha\beta}) = \Gamma H_{\alpha\beta}.
\label{equation-lc-beris-edwards}
\end{equation}
This relates the time rate of change of the order parameter to terms
Expand Down
18 changes: 9 additions & 9 deletions src/blue_phase.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
*
* fe_lc.h
*
* This file name is a bit of a misnomer. It's for any LC type, not
* just blue phases.
*
* Edinburgh Soft Matter and Statistical Physics Group and
* Edinburgh Parallel Computing Centre
*
* (c) 2010-2020 The University of Edinburgh
* (c) 2010-2022 The University of Edinburgh
*
* Contributing authors:
* Kevin Stratford (kevin@epcc.ed.ac.uk)
Expand All @@ -26,6 +29,8 @@
#include "field_grad.h"
#include "io_harness.h"

#include "lc_anchoring.h"

typedef struct fe_lc_s fe_lc_t;
typedef struct fe_lc_param_s fe_lc_param_t;

Expand Down Expand Up @@ -66,22 +71,17 @@ struct fe_lc_param_s {
double w2_coll; /* Second anchoring parameter */
double w1_wall;
double w2_wall;
double nfix[3]; /* Fixed anchoring orientation */

double nfix[3]; /* Fixed anchoring orientation */
int anchoring_coll; /* Colloids anchoring type */
int anchoring_wall; /* Wall anchoring type */
int is_redshift_updated; /* Switch */
int is_active; /* Switch for active fluid */
};

/* Surface anchoring types */
enum lc_anchoring_enum {LC_ANCHORING_PLANAR = 0,
LC_ANCHORING_NORMAL,
LC_ANCHORING_FIXED,
LC_ANCHORING_TYPES /* Last entry */
lc_anchoring_param_t coll; /* Anchoring parameters (colloids) */
lc_anchoring_param_t wall; /* Anchoring parameters (wall) */
};


__host__ int fe_lc_create(pe_t * pe, cs_t * cs, lees_edw_t * le,
field_t * q, field_grad_t * dq, fe_lc_t ** fe);
__host__ int fe_lc_free(fe_lc_t * fe);
Expand Down
53 changes: 53 additions & 0 deletions src/blue_phase_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,59 @@ int blue_phase_random_q_init(cs_t * cs, fe_lc_param_t * param, field_t * fq) {
return 0;
}

/*****************************************************************************
*
* blue_phase_random_q_2d
*
* Set a decomposition-independent random initial Q tensor in
* two dimensions (x,y).
*
*****************************************************************************/

int blue_phase_random_q_2d(cs_t * cs, fe_lc_param_t * param, field_t * fq) {

int seed = DEFAULT_SEED;
int nlocal[3] = {0};

noise_t * rng = NULL;
PI_DOUBLE(pi);

assert(fq);

cs_nlocal(cs, nlocal);

noise_create(fq->pe, cs, &rng);
noise_init(rng, seed);

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

int index = cs_index(cs, ic, jc, kc);
double ran1 = 0.0;
double phase1 = 0.0;
double n[3] = {0};
double q[3][3] = {0};

noise_uniform_double_reap(rng, index, &ran1);

phase1 = 2.0*pi*(0.5 - ran1);

n[X] = cos(phase1);
n[Y] = sin(phase1);
n[Z] = 0.0;

fe_lc_q_uniaxial(param, n, q);
field_tensor_set(fq, index, q);
}
}
}

noise_free(rng);

return 0;
}

/*****************************************************************************
*
* blue_phase_random_q_rectangle
Expand Down
3 changes: 2 additions & 1 deletion src/blue_phase_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Edinburgh Soft Matter and Statistical Physics Group and
* Edinburgh Parallel Computing Centre
*
* (c) 2010-2021 The University of Edinburgh
* (c) 2010-2022 The University of Edinburgh
*
* Contributing authors:
* Oliver Henrich (o.henrich@ucl.ac.uk) wrote most of these.
Expand Down Expand Up @@ -39,6 +39,7 @@ int lc_active_nematic_init_q2d(cs_t * cs, fe_lc_param_t * param, field_t * q,
int blue_phase_chi_edge(cs_t * cs, fe_lc_param_t * param, field_t * fq, int n,
double z0, double x0);
int blue_phase_random_q_init(cs_t * cs, fe_lc_param_t * param, field_t * fq);
int blue_phase_random_q_2d(cs_t * cs, fe_lc_param_t * param, field_t * fq);
int blue_phase_random_q_rectangle(cs_t * cs, fe_lc_param_t * param,
field_t * q, int rmin[3], int rmax[3]);
int blue_phase_cf1_init(cs_t * cs, fe_lc_param_t * param, field_t * fq, int axis);
Expand Down
Loading

0 comments on commit 720a794

Please sign in to comment.