Skip to content

Commit

Permalink
adds case driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Oct 1, 2021
1 parent 088efaf commit ab7fa6a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
48 changes: 48 additions & 0 deletions acceptance/facebody/supcyl/accept-supcyl.sh
@@ -0,0 +1,48 @@
#!/usr/bin/env bash

set -x # echo commands
set -e # exit on first error
set -u # Treat unset variables as error

if [ $# -gt 0 ] ; then
src=$1/src
else
src=${HOME}/refine/egads/src
fi

tecplot=-t
field="-u supcyl"
prj="supcyl"

function adapt_cycle {
inproj=$1
outproj=$2
complexity=$3

${src}/ref_acceptance ${field} ${inproj}.meshb \
${inproj}.solb

${src}/ref multiscale ${inproj}.meshb ${inproj}.solb \
${complexity} ${inproj}-metric.solb

${src}/ref adapt ${inproj}.meshb \
-g ${project}.egads \
-m ${inproj}-metric.solb \
-x ${outproj}.meshb \
-f ${outproj}.tec

${src}/ref_acceptance ${field} ${outproj}.meshb \
${outproj}.solb

${src}/ref visualize ${outproj}.meshb ${outproj}.solb ${outproj}.plt
}

serveCSM -batch ${project}.csm
${src}/ref bootstrap ${project}.egads
cp ${project}-vol.meshb cycle00.meshb

adapt_cycle cycle00 cycle01 1000
adapt_cycle cycle01 cycle02 1000
adapt_cycle cycle02 cycle03 1000
adapt_cycle cycle03 cycle04 1000

4 changes: 4 additions & 0 deletions src/ref_acceptance.c
Expand Up @@ -208,6 +208,10 @@ static REF_STATUS ref_acceptance_u(REF_NODE ref_node, const char *function_name,
z = ref_node_xyz(ref_node, 2, node);
if (strcmp(function_name, "u5") == 0) {
scalar[node] = 2.0 * pow(x, 2) + 2.0 * pow(y, 2) + 2.0 * pow(z, 2);
} else if (strcmp(function_name, "supcyl") == 0) {
REF_DBL r;
r = sqrt(x * x + y * y) - 0.5;
scalar[node] = exp(r);
} else if (strcmp(function_name, "combo1") == 0) {
REF_DBL xy, x3;
xy = (2.0 * x - 1.0) * (2.0 * y - 1.0);
Expand Down

0 comments on commit ab7fa6a

Please sign in to comment.