This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
FluidsSolver2_DO3function20
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
22
mom_thrd(j1,j2,j3)=sum(YY(:,j1...
12800005.892 s90.6%
23
end
12800000.589 s9.1%
21
for j3=1:NS
320000.013 s0.2%
24
end
320000.006 s0.1%
25
end
8000 s0%
All other lines  0 s0%
Totals  6.500 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
Show coverage for parent directory
Total lines in function25
Non-code lines (comments, blank lines)15
Code lines (lines that can run)10
Code lines that did run10
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
time 
calls 
 line
   1 
function mom_thrd=mom_thrd(YY)   
   2 
%function mom_thrd=mom_thrd(YY)   
   3 
% Calculates the third moment of stochastic coefficients E[YiYjYk] from Monte-
   4 
% Carlo samples. 
   5 
%
   6 
% INPUTS:
   7 
%	YY: 	   Array with Monte Carlo Samples size(YY) = [MC,NS], where
   8 
%                   MC is the number of Monte-Carlo samples and NS is the size of
   9 
%                   stochastic dimension. 
  10 
% OUTPUTS:
  11 
%	mom_thrd:  3D array containing the third moments. 
  12 
%	            E[YiYjYk] = mom_thd(i,j,k)
  13 
%
  14 
% Author: Themis Sapsis, Matt Ueckermann
  15 

     20 
  16 
NS=size(YY,2); 
     20 
  17 
MC=size(YY,1); 
     20 
  18 
mom_thrd = zeros(NS,NS,NS); 
     20 
  19 
for j1=1:NS 
    800 
  20 
    for j2=1:NS 
  0.01 
  32000 
  21 
        for j3=1:NS 
  5.89 
1280000 
  22 
            mom_thrd(j1,j2,j3)=sum(YY(:,j1).*YY(:,j2).*(YY(:,j3)))/MC;             
  0.59 
1280000 
  23 
        end 
< 0.01 
  32000 
  24 
    end 
    800 
  25 
end