Ignore:
Timestamp:
06/01/12 17:26:03 (13 years ago)
Author:
Mathieu Morlighem
Message:

merged trunk-jpl and trunk for revision 12326M

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp

    r11995 r12330  
    1616#include "../../objects/objects.h"
    1717               
    18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    19 void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
    20 #else
    2118void OutputResultsx(                    Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
    22 #endif
    2319
    2420        extern int  my_rank;
     
    3127        bool        dakota_analysis         = false;
    3228       
    33         #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    34         const char **fnames      = NULL;
    35         mwSize       onebyone[2] = {0,0};
    36         mwSize       ndim        = 2;
    37         int          nfields=0;
    38         #endif
    39 
    4029        /*retrieve parameters: */
    4130        parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
     
    4332        if(dakota_analysis){
    4433                //no need to output anything, Dakota analysis has different outputs
    45                 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    46                 *pdataref=mxCreateStructArray( ndim,onebyone,nfields,fnames);
    47                 #endif
    4834                return;
    4935        }
     
    5642        /*Results do not include the type of solution being run . In parallel, we output results to a filename,
    5743         *therefore, we need to include the solutiontype into the filename: */
    58         #ifdef _PARALLEL_
    5944        if(my_rank==0){
    6045                parameters->FindParam(&solutiontype,SolutionTypeEnum);
     
    8873                parameters->SetParam(fid,OutputFilePointerEnum);
    8974        }
    90         #endif
    9175
    92         /*Write results to disk (in parallel), or to memory (in serial mode): */
    93         #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    94                 results->Write(pdataref);
    95         #else
    96                 results->Write(parameters);
    97         #endif
     76        /*Write results to disk: */
     77        results->Write(parameters);
    9878
    9979        /*Delete and reinitialize results, in parallel: */
    100         #ifdef _PARALLEL_
    101                 results->clear();
     80        results->clear();
    10281
    103                 /*Close output file? :*/
    104                 /*WARNING: issm.cpp is taking care of it for now (quick fix)
    105                 if((step==1) && (time==0)){
    106                         if(io_gather){
    107                                 if(my_rank==0) pfclose(fid,outputfilename);
    108                         }
    109                         else pfclose(fid,cpu_outputfilename);
    110                 }
    111                 */
    112         #endif
     82        /*Close output file? :*/
     83        /*WARNING: issm.cpp is taking care of it for now (quick fix)
     84          if((step==1) && (time==0)){
     85          if(io_gather){
     86          if(my_rank==0) pfclose(fid,outputfilename);
     87          }
     88          else pfclose(fid,cpu_outputfilename);
     89          }
     90        */
    11391}
Note: See TracChangeset for help on using the changeset viewer.