time | calls | line |
---|
| | 1 | function [F] = SCAadvect_TVD_mex(Nx, Ny, dx, dy, dt, rho, u, v, NodeP, Nodeu, Nodev, idsP,Nbcs,NbcsDP,NbcsDu,NbcsDv)
|
| | 2 | % function [F] = SCAadvect_mex(Nx, Ny, dx, dy, P, u, v, NodeP, Nodeu,Nodev,idsP)
|
| | 3 | %
|
| | 4 | % This function calculates the FV fluxes in a staggered grid for tracer
|
| | 5 | % advection using QUICK advection scheme.
|
| | 6 | %
|
| | 7 | % INPUTS:
|
| | 8 | % Nx: Number of interior nodes in the x-direction
|
| | 9 | % Ny: Number of interior nodes in the y-direction
|
| | 10 | % dx: Step size in x direction
|
| | 11 | % dy: Step size in y direction
|
| | 12 | % dt: Time step size
|
| | 13 | % P: Vector containing the values of Tracer, including boundary data
|
| | 14 | % u: Vector containing the u values of velocity, including boundary
|
| | 15 | % data
|
| | 16 | % v: Vector containing the v values of velocity, including boudary
|
| | 17 | % data
|
| | 18 | % NodeP: Node numbering matrix for the scalar
|
| | 19 | % Nodeu: Node numbering matrix for the u velocity
|
| | 20 | % Nodev: Node numbering matrix for the v velocity
|
| | 21 | % idsP: Location of active Tracer nodes in interior
|
| | 22 | % Nbcs: Number of boundary conditions
|
| | 23 | % NbcsDP: Number of Dirichlet Tracer boundary conditions
|
| | 24 | % NbcsDu: Number of Dirichlet u-velocity boundary conditions
|
| | 25 | % NbcsDv: Number of Dirichlet v-velocity boundary conditions
|
| | 26 | % OUTPUTS:
|
| | 27 | % F: Output vector: (Fe-Fw)*dy/dV+(Fs-Fn)*dx/dV
|
| | 28 | %
|
| | 29 | % Authors: Matt Ueckermann, Pierre Lermusiaux, Pat Haley for MIT course 2.29
|
| | 30 |
|
| | 31 | %% Call C++ function to do advection. Note the casting to int32's (important)
|
851.27 | 66420 | 32 | F = SCAadvect_TVD_mx(int32(Nx),int32(Ny),dx,dy,dt,rho,u,v,...
|
| | 33 | int32(NodeP),int32(Nodeu),int32(Nodev),...
|
| | 34 | int32(Nbcs),int32(NbcsDP),int32(NbcsDu),int32(NbcsDv));
|
38.35 | 66420 | 35 | F = F(idsP);
|