1. Use of the bases#
Simple objects can be created by routines JECREO and WKVECT, collections by routine JECREC.
WKVECT allows you to chain together the three calls JECREO, JEECRA and JEVEUO for a vector object.
The basic concept allows you to associate the various objects with a file that is saved or not saved at the end of the work. The objects to be kept at the end of the work will be created on the GLOBALE base associated with the class G. This database allows you to maintain data structures and to carry out pursuits.
The work objects will be created on the VOLATILE base associated with class V. This database is destroyed at the end of the work (it is even cleaned up between each order). By convention, the characters & will be used at the beginning of the name of any object associated with this database.
It should be noted that it is not possible to have objects with the same name on different bases. JE… routines do not have the class name among their arguments and the name is searched in all the directories associated with the various open databases.
.
base GLOBALE |
class name G |
preserved objects |
base VOLATILE |
class name V |
temporary objects |
Note:
It is also possible to dynamically create integer vectors, real, complex, character strings,… without going through Jeveux. You must then use the « macros » AS_ALLOCATE and AS_DEALLOCATE.
The differences between a Fortran vector and a Jeveux object are:
An object I want can be unloaded onto disk (then reloaded into memory). A Fortran vector only exists in memory.
An object I want has a name that can be passed in the form of a character string.
It’s faster to create a Fortran vector than a random object.
A jeveux object can be part of a named data structure (sd_mesh, sd_model,…).