aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-07-21 13:28:01 +0200
committerThomas White <taw@physics.org>2015-07-21 14:53:10 +0200
commita59b214e1c08f4b988cc4fb2e6ef1c5d10ec363f (patch)
tree22163db5c81c8a2e23d963ca5085a81e020ead42 /src
parente7af42c5c8b9dfb2efbc4767cb827c46e112fc98 (diff)
Add random partiality model
Diffstat (limited to 'src')
-rw-r--r--src/partialator.c2
-rw-r--r--src/post-refinement.c14
2 files changed, 10 insertions, 6 deletions
diff --git a/src/partialator.c b/src/partialator.c
index 70c82960..d539f784 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -530,6 +530,8 @@ int main(int argc, char *argv[])
pmodel = PMODEL_SCGAUSSIAN;
} else if ( strcmp(pmodel_str, "scsphere") == 0 ) {
pmodel = PMODEL_SCSPHERE;
+ } else if ( strcmp(pmodel_str, "random") == 0 ) {
+ pmodel = PMODEL_RANDOM;
} else {
ERROR("Unknown partiality model '%s'.\n", pmodel_str);
return 1;
diff --git a/src/post-refinement.c b/src/post-refinement.c
index 9054ed89..12a29cb2 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -147,10 +147,11 @@ static double volume_fraction_rgradient(double r, double pr,
case PMODEL_SCGAUSSIAN :
return gaussian_fraction_rgradient(r, pr);
- }
- ERROR("No pmodel in volume_fraction_rgradient!\n");
- return 1.0;
+ default :
+ ERROR("No pmodel in volume_fraction_rgradient!\n");
+ return 1.0;
+ }
}
@@ -167,10 +168,11 @@ static double volume_fraction(double rlow, double rhigh, double pr,
case PMODEL_SCGAUSSIAN :
return gaussian_fraction(rlow, rhigh, pr);
- }
- ERROR("No pmodel in volume_fraction!\n");
- return 1.0;
+ default :
+ ERROR("No pmodel in volume_fraction!\n");
+ return 1.0;
+ }
}