next up previous contents index
Next: II.3 The ``ClaMat'' class Up: II. Composite Reference Manual Previous: II.1 Theoretical background   Contents   Index


II.2 The ``ClaDb'' class

A ClaDb object may be considered as an object in which collections of materials, laminates and loads are stored. The ClaDb Class also provides the ``glue'' that bonds the objects of the other composite Classes together.

Table II.2.1 gives the list of methods defined in ``ClaDb'' class.

Table II.2.1: The different methods that have been defined in ``ClaDb'' class.
(FeResPost list of classes is given in Table 1 page [*].)
Method Name Description Example
Creation and initialization methods
ClaDb.newnew II.2.1 IV.5.1
ClaDb.initializeinitialize II.2.1  
ClaDb.cloneclone II.2.8  
Manipulation of data defining ClaDb object
ClaDb.insertMaterialinsertMaterial II.2.3 IV.5.2
ClaDb.eraseMaterialeraseMaterial II.2.3  
ClaDb.getMaterialsNbrgetMaterialsNbr II.2.3  
ClaDb.getMaterialCopygetMaterialCopy II.2.3 IV.5.2
ClaDb.insertLaminateinsertLaminate II.2.3 IV.5.2
ClaDb.eraseLaminateeraseLaminate II.2.3  
ClaDb.getLaminatesNbrgetLaminatesNbr II.2.3  
ClaDb.getLaminateCopygetLaminateCopy II.2.3 IV.5.4.2
ClaDb.reInitAllPliesAccelMatricesreInitAllPliesAccelMatrices II.2.3  
ClaDb.insertLoadinsertLoad II.2.3  
ClaDb.eraseLoaderaseLoad II.2.3  
ClaDb.getLoadsNbrgetLoadsNbr II.2.3  
ClaDb.getLoadCopygetLoadCopy II.2.3 IV.5.4.2
Management of units methods
ClaDb.getDbUnitsgetDbUnits II.2.4  
ClaDb.setDbUnitssetDbUnits II.2.4  
ClaDb.setUnitsAllEntitiessetUnitsAllEntities II.2.4  
ClaDb.setUnitsAllMaterialssetUnitsAllMaterials II.2.4  
ClaDb.setUnitsAllLaminatessetUnitsAllLaminates II.2.4  
ClaDb.setUnitsAllLoadssetUnitsAllLoads II.2.4  
ClaDb.changeUnitsAllEntitieschangeUnitsAllEntities II.2.4  
ClaDb.changeUnitsAllMaterialschangeUnitsAllMaterials II.2.4  
ClaDb.changeUnitsAllLaminateschangeUnitsAllLaminates II.2.4  
ClaDb.changeUnitsAllLoadschangeUnitsAllLoads II.2.4  
ClaDb.each_materialeach_material II.2.7  
ClaDb.each_materialIdeach_materialId II.2.7  
ClaDb.each_laminateeach_laminate II.2.7 IV.5.4.3
ClaDb.each_laminateIdeach_laminateId II.2.7  
ClaDb.each_loadeach_load II.2.7  
ClaDb.each_loadIdeach_loadId II.2.7  
Disk IO methods
ClaDb.readEdfreadEdf II.2.5 IV.5.1
ClaDb.writeNeutralwriteNeutral II.2.5 IV.5.1
ClaDb.readNeutralreadNeutral II.2.5 IV.5.1
NDF lines
ClaDb.initWithNeutralLinesinitWithNeutralLines II.2.6  
ClaDb.getNeutralLinesgetNeutralLines II.2.6  
ClaDb.IdId II.2.2  

II.2.1 Creation of an object

The singleton method ``ClaDb.newnew'' is used to create ClaDb objects. This method has no argument. (Nor has the ``ClaDb.initializeinitialize'' method an argument.)

II.2.2 Identifying a ClaDb

Two methods allow the manipulation of the identifier of ClaDb objects (``ClaDb.IdId'' attribute):

II.2.3 Manipulating entities stored in a ClaDb

The ClaDb class provides three methods to insert objects in the collections, and three methods to retrieve objects stored in the collections:

The six methods described above create copies of the entities they store to, or retrieve from the ClaDb.

Internally, the ClaDb manages 3 associative containers that associate identifiers to materials, laminates or loads respectively. When an object is stored into the ClaDb, the key which allows to retrieve the object is the identifier one attributed to it with the ``ClaDb.IdId'' attributes. (See Chapters II.3 to II.5.) Note that the identifier used to retrieve an object from the ClaDb must match exactly the key to which the object is associated. For example, if the identifier of a load is [17,"QS_and_bending"], then 17 or "QS_and_bending" will not allow to retrieve a copy of the object. [17,"QS_and_bending"] must be used as argument of the `getMaterialCopy'' method.

When a ClaLam object is stored into the ClaDb, its properties are calculated automatically. (Stiffness matrix and $ \left<\alpha Eh\right>$ vector.)

Note also that when a CLA object is extracted from the database, or inserted into the database, the object keeps the units that are attributed to it. These units may be different than the database units. (See also section II.2.4.)

II.2.4 Management of Units

Units are associated to the database, and to all the entities stored in the database. The units associated to the stored entities are independent of each other, and of the database units.

The ``ClaDb'' class defines several methods for the management of units:

The Hash arguments or return values mentioned above have String keys and values as explained in section II.1.13. The difference between the ``setUnits'' and ``changeUnits'' methods is also explained in the same section.

II.2.5 Saving to or retrieving from a disk file

Presently, three interface functions are defined:

Note that the neutral data files (``ndf'' files) mentioned above are files with a format specific to the FeResPost.

II.2.6 Saving or initializing with NDF lines

Two methods allow to save or read ClaDb objects from an Array of Strings in neutral format. For each of these two methods, instead of reading or saving the lines from or to a disk file, each line is saved or read from or to an Array of Strings. The two methods are:

II.2.7 Iterators

The ClaDb class provides 6 iterators:

These iterators have no argument.

II.2.8 Other methods

``ClaDb.cloneclone'' method has no argument and returns a copy of the ClaDb object.

next up previous contents index
Next: II.3 The ``ClaMat'' class Up: II. Composite Reference Manual Previous: II.1 Theoretical background   Contents   Index
FeResPost User Manual Version 4.4.2 (2018/01/01)