8000 Colloid wetting problem by kevinstratford · Pull Request #345 · ludwig-cf/ludwig · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Colloid wetting problem #345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
23 changes: 13 additions & 10 deletions src/gradient_3d_27pt_solid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (kevin@epcc.ed.ac.uk)
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
0