icethermal_wrapper

PURPOSE ^

ICETHERMAL_WRAPPER - wrapper of the thermal solution

SYNOPSIS ^

function md=icethermal_wrapper(md,analysis_type);

DESCRIPTION ^

ICETHERMAL_WRAPPER - wrapper of the thermal solution

   thermal wrapper for thermal matlab driven solution. 
   we need a wrapper so that we can launch the thermal solution using Matlab parallel, 

   Usage:
      md=icethermal_wrapper(md,analysis_type);

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function md=icethermal_wrapper(md,analysis_type);
0002 %ICETHERMAL_WRAPPER - wrapper of the thermal solution
0003 %
0004 %   thermal wrapper for thermal matlab driven solution.
0005 %   we need a wrapper so that we can launch the thermal solution using Matlab parallel,
0006 %
0007 %   Usage:
0008 %      md=icethermal_wrapper(md,analysis_type);
0009 
0010 %start timing
0011 t1=clock;
0012 
0013 %If running in parallel, launch core thermal routine within a parallel job.
0014 if strcmpi(md.cluster,'yes'),
0015     sched = findResource('scheduler', 'configuration', md.scheduler_configuration);
0016     pjob = createParallelJob(sched);
0017     set(pjob, 'FileDependencies', {'icethermal.m'});
0018     set(pjob, 'MaximumNumberOfWorkers', md.np); set(pjob, 'MinimumNumberOfWorkers', md.np);
0019     t = createTask(pjob, @icethermal, 1, {md});
0020     set(t, 'CaptureCommandWindowOutput', true)
0021     disp('   Submitting job to cluster');
0022     submit(pjob);
0023     waitForState(pjob);
0024     get(t, 'CommandWindowOutput')
0025     get(t,'ErrorMessage')
0026     disp('   Done running on cluster');
0027 else
0028     md=icethermal(md,analysis_type);
0029 end
0030 
0031 %stop timing
0032 t2=clock;
0033 
0034 disp(sprintf('\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']));

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003