Skip to content

Commit

Permalink
Default to aniso in stokes-adapt-3d-PETSc.edp
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd8 committed Nov 17, 2023
1 parent e059549 commit 35f26a2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/hpddm/stokes-adapt-3d-PETSc.edp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ func Pk = [P2, P2, P2, P1];
macro grad(u)[dx(u), dy(u), dz(u)]// EOM
macro div(u)(dx(u) + dy(u#B) + dz(u#C))// EOM

bool aniso = getARGV("-aniso", 0);
real anisomax = getARGV("-anisomax", 4.0);
bool aniso = bool(anisomax > 1.0);
mesh3 Th;
{
mesh ThGlobal2d = square(getARGV("-global", 12), getARGV("-global", 12), [x, y]); // global mesh
Expand Down Expand Up @@ -81,8 +82,8 @@ for(int i = 0; i < 5; ++i) {
// Define normalized sol'n
def(uReduce) = [uG/unorm, uGB/unorm, uGC/unorm, uGD/pnorm];
// create metric
real[int] met = mshmet(ThG, [uReduce, uReduceB, uReduceC], uReduceD, normalization = bool(getARGV("-normalization",1)), aniso = aniso, hmin = 1.0e-3, hmax = 0.2, err = 1.0e-2, verbosity = verbosity);
if(aniso) boundaniso(6, met, getARGV("-anisomax",2.0)); // restrict anisotropy
real[int] met = mshmet(ThG, [uReduce, uReduceB, uReduceC], uReduceD, normalization = bool(getARGV("-normalization",0)), aniso = aniso, hmin = 1.0e-3, hmax = 0.2, err = 1.0e-2, verbosity = verbosity);
if(aniso) boundaniso(6, met, anisomax); // restrict anisotropy
fespace METhG(ThG,[P1,P1,P1,P1,P1,P1]);
METhG [m11,m21,m22,m31,m32,m33];
QhG mm;
Expand All @@ -92,7 +93,7 @@ for(int i = 0; i < 5; ++i) {
mm = m11+m22+m33; // trace of anisotropic metric tensor
}
plot(mm);
ThG = mmg3d(ThG, metric = met, hmin = 1.0e-3, hmax = 0.2, hgrad = -1, hgradreq = 100, verbose=verbosity-(verbosity==0));
ThG = mmg3d(ThG, metric = met, hmin = 1.0e-3, hmax = 0.2, hgrad = -1, verbose=verbosity-(verbosity==0));
cout << "it = " << (i+1) << ", Th.nv = " << ThG.nv << endl;
plot(ThG);
}
Expand Down

0 comments on commit 35f26a2

Please sign in to comment.