This is a static copy of a profile report

Home

Grad2D_P (1640 calls, 25.624 sec)
Generated 04-Aug-2014 13:05:22 using cpu time.
function in file /gdata/projects/atl/FV_Matlab_Framework_JingPJH/trunk/Src/MatrixOps/Grad2D_P.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
FluidsSolver2_DO3function1640
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
21
dpdy = (P(NodeP(2:end-2, 2:end...
164012.502 s48.8%
20
dpdx = (P(NodeP(2:end-1, 3:end...
164011.926 s46.5%
24
dpdy = dpdy(idsv);
16400.737 s2.9%
23
dpdx = dpdx(idsu);
16400.401 s1.6%
All other lines  0.058 s0.2%
Totals  25.624 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function24
Non-code lines (comments, blank lines)20
Code lines (lines that can run)4
Code lines that did run4
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
calls 
 line
   1 
function [dpdx, dpdy] = Grad2D_P(P, NodeP, dx, dy, idsu, idsv)
   2 
% function [dpdx, dpdy] = Grad2D_P(P, NodeP, dx, dy, idsu, idsv)
   3 
% This function takes the gradient of pressure P, i.e. dP/dx and dP/dy,
   4 
% at the INTERIOR cell centers of u and v, respectively. 
   5 
%
   6 
% INPUTS:
   7 
%       P:      Vector containing values of pressure
   8 
%       NodeP:  Reference node numbering matrix for pressure
   9 
%       dx:     Mesh spacing in x direction
  10 
%       dy:     Mesh spacing in y direction
  11 
%       idsu:   Location of active u-velocity cells in interior
  12 
%       idsv:   Location of active v-velocity cells in interior
  13 
%       
  14 
% OUTPUTS:
  15 
%       dpdx:   x-derivative of pressure at centers of active u-velocity cells
  16 
%       dpdy:   y-derivative of pressure at centers of active v-velocity cells
  17 
%
  18 
% Authors:   Matt Ueckermann, Pierre Lermusiaux, Pat Haley for MIT course 2.29
  19 

 11.93 
   1640 
  20 
dpdx = (P(NodeP(2:end-1, 3:end-1)) - P(NodeP(2:end-1, 2:end-2)))/dx; 
 12.50 
   1640 
  21 
dpdy = (P(NodeP(2:end-2, 2:end-1)) - P(NodeP(3:end-1, 2:end-1)))/dy; 
  22 

  0.40 
   1640 
  23 
dpdx = dpdx(idsu); 
  0.74 
   1640 
  24 
dpdy = dpdy(idsv);