From 0d3a1a17569e5365f056960644b92813a37f0972 Mon Sep 17 00:00:00 2001 From: DanGon Date: Sun, 30 Nov 2025 14:24:07 +0300 Subject: [PATCH] Correction in Vel Grad computation,Change LocGrad to Glogal grad to estimate the export parameter --- incompressible/fv1/navier_stokes_fv1.cpp | 39 ++++++++++++++---------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/incompressible/fv1/navier_stokes_fv1.cpp b/incompressible/fv1/navier_stokes_fv1.cpp index a5b103e..91cfd35 100644 --- a/incompressible/fv1/navier_stokes_fv1.cpp +++ b/incompressible/fv1/navier_stokes_fv1.cpp @@ -1059,6 +1059,8 @@ ex_velocity_grad(MathMatrix vValue[], // storage for shape function at ip MathVector vLocGrad[numSH]; + MathVector locGrad; + MathVector vGlobGrad; // Reference Mapping MathMatrix JTInv; @@ -1069,30 +1071,35 @@ ex_velocity_grad(MathMatrix vValue[], { // evaluate at shapes at ip rTrialSpace.grads(vLocGrad, vLocIP[ip]); - - // Loop dimensions for direction - for(int d1 = 0; d1 < dim; ++d1) + + // compute global grad + mapping.jacobian_transposed_inverse(JTInv, vLocIP[ip]); + MatSet(vValue[ip],0.0); + + for(size_t sh = 0; sh < numSH; ++sh) { - // Loop dimensions for derivative - for(int d2 = 0; d2