Skip to content

Commit 720a794

Browse files
Merge pull request #186 from ludwig-cf/develop
Release 0.17.0
2 parents 9819ad1 + 2db691c commit 720a794

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4903
-71
lines changed

CHANGES.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11

22
### Changes
33

4+
version 0.17.0
5+
6+
- add liquid crystal anchoring "fd_gradient_calculation s7_anchoring"
7+
- this is a replcement for "3d_7pt_fluid" and does a slightly better
8+
job at the edges and corners by using a consistent surface normal.
9+
The anchoring properties are now specifed in a slightly different
10+
way.
11+
- For walls, see https://ludwig.epcc.ed.ac.uk/inputs/walls.html
12+
- For colloids, see https://ludwig.epcc.ed.ac.uk/inputs/colloid.html
13+
14+
- The existing fd_gradient_calculation 3d_7pt_solid is retained, and
15+
existing input keys for anchoring will be recognised.
16+
17+
- add option for rectilinear grid format vtk output "extract -l"
18+
- add option for 2d random nematic "lc_q_initialisation random_xy"
19+
20+
- A functional AMD GPU version is now available using HIP.
21+
- See https://ludwig.epcc.ed.ac.uk/building/index.html
22+
23+
- Various minor improvements
24+
425
version 0.16.1
526

627
- And get the version number right!

docs/liquidcrystal.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ \subsection{Dynamics}
330330

331331
\begin{equation}
332332
\partial_t Q_{\alpha\beta} + \partial_\gamma (u_\gamma Q_{\alpha\beta})
333-
+ S_{\alpha\beta}(W_{\alpha\beta}, Q_{\alpha\beta}) = -\Gamma H_{\alpha\beta}.
333+
+ S_{\alpha\beta}(W_{\alpha\beta}, Q_{\alpha\beta}) = \Gamma H_{\alpha\beta}.
334334
\label{equation-lc-beris-edwards}
335335
\end{equation}
336336
This relates the time rate of change of the order parameter to terms

src/blue_phase.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
*
33
* fe_lc.h
44
*
5+
* This file name is a bit of a misnomer. It's for any LC type, not
6+
* just blue phases.
7+
*
58
* Edinburgh Soft Matter and Statistical Physics Group and
69
* Edinburgh Parallel Computing Centre
710
*
8-
* (c) 2010-2020 The University of Edinburgh
11+
* (c) 2010-2022 The University of Edinburgh
912
*
1013
* Contributing authors:
1114
* Kevin Stratford (kevin@epcc.ed.ac.uk)
@@ -26,6 +29,8 @@
2629
#include "field_grad.h"
2730
#include "io_harness.h"
2831

32+
#include "lc_anchoring.h"
33+
2934
typedef struct fe_lc_s fe_lc_t;
3035
typedef struct fe_lc_param_s fe_lc_param_t;
3136

@@ -66,22 +71,17 @@ struct fe_lc_param_s {
6671
double w2_coll; /* Second anchoring parameter */
6772
double w1_wall;
6873
double w2_wall;
69-
double nfix[3]; /* Fixed anchoring orientation */
7074

75+
double nfix[3]; /* Fixed anchoring orientation */
7176
int anchoring_coll; /* Colloids anchoring type */
7277
int anchoring_wall; /* Wall anchoring type */
7378
int is_redshift_updated; /* Switch */
7479
int is_active; /* Switch for active fluid */
75-
};
7680

77-
/* Surface anchoring types */
78-
enum lc_anchoring_enum {LC_ANCHORING_PLANAR = 0,
79-
LC_ANCHORING_NORMAL,
80-
LC_ANCHORING_FIXED,
81-
LC_ANCHORING_TYPES /* Last entry */
81+
lc_anchoring_param_t coll; /* Anchoring parameters (colloids) */
82+
lc_anchoring_param_t wall; /* Anchoring parameters (wall) */
8283
};
8384

84-
8585
__host__ int fe_lc_create(pe_t * pe, cs_t * cs, lees_edw_t * le,
8686
field_t * q, field_grad_t * dq, fe_lc_t ** fe);
8787
__host__ int fe_lc_free(fe_lc_t * fe);

src/blue_phase_init.c

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,59 @@ int blue_phase_random_q_init(cs_t * cs, fe_lc_param_t * param, field_t * fq) {
12151215
return 0;
12161216
}
12171217

1218+
/*****************************************************************************
1219+
*
1220+
* blue_phase_random_q_2d
1221+
*
1222+
* Set a decomposition-independent random initial Q tensor in
1223+
* two dimensions (x,y).
1224+
*
1225+
*****************************************************************************/
1226+
1227+
int blue_phase_random_q_2d(cs_t * cs, fe_lc_param_t * param, field_t * fq) {
1228+
1229+
int seed = DEFAULT_SEED;
1230+
int nlocal[3] = {0};
1231+
1232+
noise_t * rng = NULL;
1233+
PI_DOUBLE(pi);
1234+
1235+
assert(fq);
1236+
1237+
cs_nlocal(cs, nlocal);
1238+
1239+
noise_create(fq->pe, cs, &rng);
1240+
noise_init(rng, seed);
1241+
1242+
for (int ic = 1; ic <= nlocal[X]; ic++) {
1243+
for (int jc = 1; jc <= nlocal[Y]; jc++) {
1244+
for (int kc = 1; kc <= nlocal[Z]; kc++) {
1245+
1246+
int index = cs_index(cs, ic, jc, kc);
1247+
double ran1 = 0.0;
1248+
double phase1 = 0.0;
1249+
double n[3] = {0};
1250+
double q[3][3] = {0};
1251+
1252+
noise_uniform_double_reap(rng, index, &ran1);
1253+
1254+
phase1 = 2.0*pi*(0.5 - ran1);
1255+
1256+
n[X] = cos(phase1);
1257+
n[Y] = sin(phase1);
1258+
n[Z] = 0.0;
1259+
1260+
fe_lc_q_uniaxial(param, n, q);
1261+
field_tensor_set(fq, index, q);
1262+
}
1263+
}
1264+
}
1265+
1266+
noise_free(rng);
1267+
1268+
return 0;
1269+
}
1270+
12181271
/*****************************************************************************
12191272
*
12201273
* blue_phase_random_q_rectangle

src/blue_phase_init.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Edinburgh Soft Matter and Statistical Physics Group and
66
* Edinburgh Parallel Computing Centre
77
*
8-
* (c) 2010-2021 The University of Edinburgh
8+
* (c) 2010-2022 The University of Edinburgh
99
*
1010
* Contributing authors:
1111
* Oliver Henrich (o.henrich@ucl.ac.uk) wrote most of these.
@@ -39,6 +39,7 @@ int lc_active_nematic_init_q2d(cs_t * cs, fe_lc_param_t * param, field_t * q,
3939
int blue_phase_chi_edge(cs_t * cs, fe_lc_param_t * param, field_t * fq, int n,
4040
double z0, double x0);
4141
int blue_phase_random_q_init(cs_t * cs, fe_lc_param_t * param, field_t * fq);
42+
int blue_phase_random_q_2d(cs_t * cs, fe_lc_param_t * param, field_t * fq);
4243
int blue_phase_random_q_rectangle(cs_t * cs, fe_lc_param_t * param,
4344
field_t * q, int rmin[3], int rmax[3]);
4445
int blue_phase_cf1_init(cs_t * cs, fe_lc_param_t * param, field_t * fq, int axis);

0 commit comments

Comments
 (0)