SetFactory("OpenCASCADE");
Box(1) = {0, 0, 0, 8, 8, 8};

Physical Surface("surfacedomain") = {1};
Physical Volume("volumedomain") = {1};

Field[3] = MathEval;
Field[3].F = ".5 - (.5-0.01)*exp(-(1./0.025) *((sqrt((x-2)*(x-2)+(y-2)*(y-2)+(z-0.5)*(z-0.5))-0.25))*((sqrt((x-2)*(x-2)+(y-2)*(y-2)+(z-0.5)*(z-0.5))-0.25)))";

Field[4] = MathEval;
Field[4].F = ".5 - (.5-0.01)*exp(-(1./0.025) *((sqrt((x-2.5)*(x-2.5)+(y-2.5)*(y-2.5)+(z-0.5)*(z-0.5))-0.25))*((sqrt((x-2.5)*(x-2.5)+(y-2.5)*(y-2.5)+(z-0.5)*(z-0.5))-0.25)))";

Field[5] = Min;
Field[5].FieldsList = {3,4};

Mesh.Algorithm = 5;
Background Field = 5;