Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Retaining variables at old time step

Retaining variables at old time step 7 years 2 months ago #27846

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
I would say yes
The better think is to check this by printing the information for the first element...

Regards
Christophe
The administrator has disabled public write access.

Retaining variables at old time step 7 years 2 months ago #27847

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks a lot!

I defined a BIEF_OBJ in a subroutine as

TYPE(BIEF_OBJ) :: EVOL

It passed the compilation but failed to use OS('X=0 ',X=EVOL) on it or assign values to EVOL%R. Do I have to initialize it in this subroutine before using it? I know for other global BIEF_OBJ, They are initialized in BIEF_ALLVEC(...).

Kind regards,
Qilong
The administrator has disabled public write access.

Retaining variables at old time step 7 years 2 months ago #27849

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi Qilong

Yes of course you should allocate it.
It's like all other vector types you declare it and you allocate it.
If you add a call to bief_allvec with the right parameters this should works.

Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: qilong

Retaining variables at old time step 7 years 2 months ago #27859

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks for your suggestions.

I also printed out the IKLE vector. The order is not like what I thought before.

Actually it's like

[ELEM_1(1) ELEM_2(1) ... ELEM_N(1) ELEM_1(2) ELEM_2(2) ... ELEM_N(2) ...]

I also found a piece of code that confirms this.

Kind regards,
Qilong
The administrator has disabled public write access.

Retaining variables at old time step 7 years 1 month ago #27907

  • jmhervouet
  • jmhervouet's Avatar
Hello,

In Fortran in an array with two dimensions, in the memory the first dimension varies first, before changing the second, so e.g. IKLE(1,1), IKLE(2,1) up to IKLE(NELEM,1) and then IKLE(1,2), etc.


In C language it is the contrary, too bad!

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Retaining variables at old time step 7 years 1 month ago #27915

  • qilong
  • qilong's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 340
  • Thank you received: 33
Thanks for your explanation!
It's much clear to me now.

With best regards,
Qilong
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: Pablo, pavans

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.