[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] programming and storage...



<I have to store several Matrix variables, with quite huge dimensions :
XS(0...5, 1...10) which mean 60 values....>

<Laughing>  While that may seem huge, we've used Storage to save millions
of temperatures in our slab-on-grade models.  60 shouldn't be a problem.

<Do I have to set every value as a stored variable or can I store
directly the matrix ? For example, to store the XS matrix, do I need to
allocate 60 spots by
setting : setStorageSize(60,INFO) or can I use only one spot ?>

You'll have to set aside 60 spots as you're storing 60 unique values.

Something along the lines of:

Double Precision XS(60),Stored(60)
.
.
.
setStorageSize(60,INFO)
.
.
.
Do i=0,5
Do j=1,10
   k=i*10+j
   Stored(k)=XS(i,j)
Enddo
Enddo

CALL setStorageVars(Stored,N_60,Info)

Then retrieve them later when you need them

CALL getStorageVars(Stored,N_60,Info)
.
.
.
Do i=0,5
Do j=1,10
   k=i*10+j
   XS(i,j)=Stored(k)
Enddo
Enddo



Jeff

Jeff Thornton
President - TESS, LLC

22 North Carroll Street - Suite 370
Madison WI 53703 USA

Phone: 608-274-2577
Fax: 608-278-1475
E-mail: thornton@tess-inc.com
Web: www.tess-inc.com