-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e3a736
commit 0754b79
Showing
1 changed file
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
* Edinburgh Soft Matter and Statistical Physics Group and | ||
* Edinburgh Parallel Computing Centre | ||
* | ||
* (c) 2010-2024 The University of Edinburgh | ||
* (c) 2010-2025 The University of Edinburgh | ||
* | ||
* Contributing authors: | ||
* Kevin Stratford ([email protected]) | ||
|
@@ -80,24 +80,25 @@ __global__ void grad_3d_27pt_solid_kernel(kernel_3d_t k3d, | |
|
||
__host__ int grad_3d_27pt_solid_map_set(map_t * map) { | ||
|
||
int ndata; | ||
assert(map); | ||
|
||
static_solid.map = map; | ||
|
||
/* We expect at most two wetting parameters; if present | ||
/* We expect either zero or two wetting parameters; if present | ||
* first should be C, second H. Default to zero. */ | ||
|
||
ndata = map->ndata; | ||
|
||
if (ndata == 0) { | ||
if (map->ndata == 0) { | ||
/* Assume we are uniform from free energy */ | ||
static_solid.uniform = 1; | ||
} | ||
else if (ndata != 2) { | ||
/* We should have exactly 2 */ | ||
else if (map->ndata == 2) { | ||
/* Assume we have colloid non-uniform wetting */ | ||
static_solid.uniform = 0; | ||
} | ||
else { | ||
/* We don't handle the case */ | ||
pe_fatal(map->pe, "Wrong number of wetting parameters in map data %d\n", | ||
ndata); | ||
map->ndata); | ||
} | ||
|
||
return 0; | ||
|
@@ -113,11 +114,13 @@ __host__ int grad_3d_27pt_solid_fe_set(fe_symm_t * fe) { | |
|
||
assert(fe); | ||
|
||
/* Always assume this means uniform wetting */ | ||
|
||
static_solid.fe_symm = fe; | ||
static_solid.rkappa = 1.0/fe->param->kappa; | ||
static_solid.c = fe->param->c; | ||
static_solid.h = fe->param->h; | ||
if (static_solid.map == NULL) static_solid.uniform = 1; | ||
static_solid.uniform = 1; | ||
|
||
return 0; | ||
} | ||
|