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

Re: [TRNSYS-users] Problems with dynamic arrays definition in new types



Dear Jordi,

I suppose that you are using a parameter to size the arrays (parameters do not change with time). I would use the initialization call (INFO(7) == -1) to allocate the arrays. This call is used to set the size of storage arrays and general checking routines.
You can deallocate the arrays during the last call (INFO(8) == -1).
Best regards,

Diego

jordi cipriano wrote:
Dear Trnsys users,
I have a question concerning to the use of Dynamic arrays in new Trnsys types. I'm programming a new Type with fortran 90 and I'm using the instruction ALLOCATABLE to define the dimension of some arrays. This dimension is depending on an input defined in the proforma. The issue is that I don't exactly know at which step iteration should I define the array dimension so that this dimenson keeps saved in each iteration. In other words, if I define the array dimension just bellow the variables definition, each time the trnsys call my type, the matrix appear as "Undefined pointer/array" until trnsys finds the ALLOCATE instruction. This happens even if I've already defined the dimension in previous iteration callings. This fact affects all the calculations because one of the arrays is the STORED array, which I use to update the temporary terms of my ecuations. Does anybody know who to solve this problem? Many thanks, Jordi Cipriano
BEE-Group
CIMNE-Terrassa
CIMNE. Spain
_______________________________________________
TRNSYS-users mailing list
TRNSYS-users@engr.wisc.edu
https://www.cae.wisc.edu/mailman/listinfo/trnsys-users


--
Diego A. Arias
TRNSYS Coordinator
Solar Energy Laboratory
University of Wisconsin - Madison
1500 Engineering Drive
Madison, WI 53706