28 if (
cs[] > 0. &&
cs[] < 1.) {
32 for (
int _c = 0; _c < 4; _c++) {
33 if (
cs[] > 0. &&
cs[] < 1.) {
37 cm[] = (
y + Delta*
p.y)*
cs[];
44 for (
int _c = 0; _c < 4; _c++)
63 double sig = 0., ff = 0.;
64 if (
cs[] > 0. &&
cs[] < 1.) {
66 sig =
sign(
n.y)*Delta/4.;
70 fine(
fm,0,0) = (
y - Delta/4. - sig*(1. - ff))*ff;
72 fine(
fm,0,1) = (
y + Delta/4. - sig*(1. - ff))*ff;
76 fine(
fm,2,0) = (
y - Delta/4. - sig*(1. - ff))*ff;
78 fine(
fm,2,1) = (
y + Delta/4. - sig*(1. - ff))*ff;
81 fine(
fm,1,0) = (
y - Delta/4. - sig*(1. - ff))*ff;
83 fine(
fm,1,1) = (
y + Delta/4. - sig*(1. - ff))*ff;
117 return (
y +
p.y*Delta);
122 for (
int _i = 0;
_i < _N;
_i++) {
123 if (
cs[] > 0. &&
cs[] < 1.) {
127 cm[] = (
y + Delta*
p.y)*
cs[];
138 for (
int _i = 0;
_i < _N;
_i++) {
140 if (
cs[] > 0. &&
cs[] < 1.) {
142 sig =
sign(
n.y)*Delta/2.;
146 for (
int _i = 0;
_i < _N;
_i++)
162 if (is_constant(
cm)) {
184 for (
int _i = 0;
_i < _N;
_i++)
195 if (is_constant(
fm.
x)) {
203 for (
int _i = 0;
_i < _N;
_i++)
static void refine_face_x_axi(Point point, scalar fm)
static void refine_cm_axi(Point point, scalar cm)
On trees we need refinement functions.
void event_metric(void)
If embedded solids are presents, cm, fm and the fluxes need to be updated consistently with the axisy...
static void refine_face_y_axi(Point point, scalar fm)
define neighbor(o, p, q)((Point)
scalar * list_concat(scalar *l1, scalar *l2)
scalar * list_copy(scalar *l)
static int sign(number x)
scalar cs[]
The volume and area fractions are stored in these fields.
double(* metric_embed_factor)(Point, coord)
macro2 double dirichlet(double expr, Point point=point, scalar s=_s, bool *data=data)
For ease of use, we replace the Neumann and Dirichlet functions with macros so that they can be used ...
coord facet_normal(Point point, scalar c, vector s)
#define plane_center(m, alpha, a, p)
This function fills the coordinates p of the centroid of the fraction a of a cubic cell lying under t...