[Nek5000-users] common variables
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Aug 7 16:09:58 CDT 2014
I would normally define my own common block, that is common between
the routines in the .usr file, e.g.
common /mystuffi/ i1,i2
common /mystuffr/ a(lx1*ly1*lz1*lelt)
Note that it's important to segregate declared variables by type (i.e., integers
in the first case and reals in the second) in order to assure proper byte alignment.
Paul
________________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
Sent: Thursday, August 07, 2014 3:52 PM
To: nek5000-users at lists.mcs.anl.gov
Subject: [Nek5000-users] common variables
I have a number of parameters, which I use in several subroutines in *usr files,
namely userchk, userbc and userf.
I am still not very familiar with code of nek5000 and fortan, so my question is
what is the best way to define only once the whole set of parameters, which would
be visible for all subroutines.
I saw here in that it is recommended to define local variables as common.
Is it better to define your own common block or to user preexisting in nek like
common /scrns/ ?
and in which subroutine it is better to initialize them?
Thank you in advance,
Van
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
More information about the Nek5000-users
mailing list