Ignore:
Timestamp:
04/16/12 17:40:30 (13 years ago)
Author:
Eric.Larour
Message:

Preliminary commit of new issm version, where serial code is starting to be stripped away. Will not run before some major debugging is done

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp

    r11936 r12011  
    222222}
    223223/*}}}*/
    224 /*FUNCTION DoubleMatExternalResult::SetMatlabField{{{1*/
    225 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
    226 void DoubleMatExternalResult::SetMatlabField(mxArray* dataref){
    227 
    228         mxArray* pfield=NULL;
    229         mxArray* pfield2=NULL;
    230         char* name=NULL;
    231         double* doublemat=NULL;
    232 
    233         /*Make a copy of the value, to be used by matlab: */
    234         doublemat=(double*)xmalloc(M*N*sizeof(double));
    235         memcpy(doublemat,values,M*N*sizeof(double));
    236 
    237         /*recover name: */
    238         this->GetResultName(&name);
    239                                
    240         /*create matlab matrix: */
    241         pfield=mxCreateDoubleMatrix(0,0,mxREAL);
    242         mxSetM(pfield,N);
    243         mxSetN(pfield,M);
    244         mxSetPr(pfield,doublemat);
    245        
    246         /*transpose the matrix, from c to matlab format */
    247         mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");
    248 
    249         /*set tranpose matrix inside the dataref structure: */
    250         mxSetField( dataref, this->step-1, name,pfield2);
    251         mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));
    252         mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));
    253 
    254 }
    255 #endif
    256 /*}}}*/
    257224/*FUNCTION DoubleMatExternalResult::GetStep{{{1*/
    258225int DoubleMatExternalResult::GetStep(void){
Note: See TracChangeset for help on using the changeset viewer.