====== Commit 2018-07-23 ====== ===== 1. Description ===== A center of gravity and mass extractor for ''interactions'' has been implemented in Metafor. The synthax is the same as other extractors: valuesmanager = metafor.getValuesManager() extractor1 = InteractionGravityCenterAndMassValueExtractor(interaction) valuesmanager.add(nbr, extractor1, name = "TheNameYouWant") # manages extraction, result storage... At each archiving step the extractor fills a four columns text file, where columns 1-3 contain x, y, and z coordinates of the center of gravity respectively, and column 4 contains the value of the mass. Since the evolution of the density is not directly tracked in Metafor, the mass matrix is directly employed to take into account the density variation for the computation of the center of gravity and mass. To compute the center of gravity and the mass of an interaction a density different from zero is needed. Pay attention, when you define your material properties, to explicitly define a ''MASS_DENSITY'' different from zero, otherwise a ''FATAL_ERROR'' is raised. ===== 2. Tests ===== For the moment, a gravity center and mass extractor has been added in ''apps/imp/bounce.py'' and for all the test cases contained in ''apps/monosMaterials2'' and ''mtThixo/tests/monoMaterials2'' run via ''apps/toolbox/materialTesting.py''. A density different from zero has been defined where needed. A bug, introduced in a previous commit, concerning the initialization of Norton-Hoff materials physical properties has been found. In particular, in ''NortonHoffHypoMaterial::initPrmat()'' function, ''Material::initPrmat()'' was called instead of ''MechanicalMaterial::initPrmat()'', so that the density was not initialized for these materials. The bug has been corrected and this justifies the large amount of diffs in the tests involving Norton-Hoff materials between the present commit and the previous versions of Metafor. ===== Added [a] / deleted [d] / modified [m] / renamed [r] files ====== [a] oo_meta/mtFEM/extractors/InteractionGravityCenterAndMassValueExtractor.h [a] oo_meta/mtFEM/extractors/InteractionGravityCenterAndMassValueExtractor.cpp [m] apps/imp/bounce.py [m] apps/toolbox/materialTesting.py [m] apps/monoMaterials2/EvpAnisoDamageAlvBoneRemod.py [m] apps/monoMaterials2/EvpAnisoDamageBoneRemod.py [m] apps/monoMaterials2/EvpAnisoDamageDummy.py [m] apps/monoMaterials2/EvpAnisoDamageLemaitre.py [m] apps/monoMaterials2/EvpIsoDamageAlvBoneRemod2.py [m] apps/monoMaterials2/EvpIsoDamageBoneRemod.py [m] apps/monoMaterials2/NortonHoff.py [m] mtThixo/tests/monoMaterials2/ThixoEnhanced.py [m] mtThixo/tests/monoMaterials2/ThixoEquivalentNortonHoff.py [m] mtThixo/tests/monoMaterials2/ThixoMicroMacro.py [m] mtThixo/tests/monoMaterials2/ThixoNortonHoff.py