file: Nektar2d/src/convective.c

/* ------------------------------------------------------------------------- * * VdgradV() - Calculate convective form of the nonlinear terms * * * * The following function calculates the nonlinear portion of the Navier- * * Stokes equation in convective form in order to minimize aliasing errors. * * In this form, the non-linear part looks like: * * * * dV_i * * N_i = -( V_j ---- ) * * dx_j * * * * RCS Information * * --------------- * $Author: * $Date: * $Source: * $Revision: * ------------------------------------------------------------------------- */ #include "nektar.h" static int cnt=0; void VdgradV(Domain *omega) //OVERLOAD CALL: Domain: nekcomp.h(?), nektar.h(?) { Element_List *U = omega->U, *V = omega->V, *Ux = omega->Pf, *Uy = omega->Vf, *Vx = omega->Vf, *Vy = omega->P, *Nx = omega->Uf, *Ny = omega->Vf, *Div = omega->Pf; U->Grad(Ux,Uy,NULL,'a'); //OVERLOAD CALL: Grad: Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad) dvmul (U->htot, U->base_h,1,Ux->base_h,1,Nx->base_h,1); dvvtvp (U->htot, V->base_h,1,Uy->base_h,1,Nx->base_h,1,Nx->base_h,1); dneg (U->htot, Nx->base_h,1); V->Grad(Vx,Vy,NULL,'a'); //OVERLOAD CALL: Grad: Gradient.c(Tet), Gradient.c(Pyr), Gradient.c(Prism), Gradient.c(Hex), Element_List.c(Element_List), Gradient.c(Tri), Gradient.c(Quad) dvmul (V->htot, U->base_h,1,Vx->base_h,1,Ny->base_h,1); dvvtvp (V->htot, V->base_h,1,Vy->base_h,1,Ny->base_h,1,Ny->base_h,1); dneg (V->htot, Ny->base_h,1); if(option("DIVERR") && !(cnt % option("DIVERR"))){ dvadd (V->htot, Ux->base_h, 1, Vy->base_h, 1, Div->base_h, 1); Div->Terror("0.0"); ++cnt; } Nx->Set_state('p'); Ny->Set_state('p'); return; }


Back to Source File Index


C++ to HTML Conversion by ctoohtml