# -*- coding: utf-8 -*-
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
#
#
_test = ["Actions",
"Containers",
"Bridges",
"FE",
"Helpers",
'ImplicitGeometry',
"IO",
"LinAlg",
"Types",
"Experimental",
"GeometricalTools"
]
__name__ = "Muscat"
__copyright_holder__ = "Safran"
__copyright_years__ = "2016-2023"
__copyright__ = "{}, {}".format(__copyright_years__, __copyright_holder__)
__license__ = "BSD 3-Clause License"
__version__ = "2.2.2"
[docs]def Preload(subSubModule="Muscat") -> float:
"""Function to preload all the import of a library using the test infrastructure of Muscat
Each __init__.py must contain a variable named "_test" containing a list of string with the
name of the module and submodules present on the directory. This ensure a safe travel thru
the directory hierarchy (only import the module on the list explicitly)
Parameters
----------
subSubModule : str, optional
_description_, by default "Muscat"
Returns
-------
float
time spend on the preload function.
"""
import time
import os
st = time.time()
from Muscat.Helpers.Check import __tryImport
try:
__tryImport(subSubModule, {}, stopAtFirstError=True, modulesToTreat=[], modulesToSkip=[])
pass
except Exception as e:
print(e)
print('Error Loading module : ' + subSubModule + ' (Current folder'+os.getcwd()+')')
print('-*-*-*-*-*-*> missing CheckIntegrity()??? <*-*-*-*-*-*--')
raise
if subSubModule == "Muscat":
import Muscat.Containers.NativeTransfer
import Muscat.LinAlg.NativeEigenSolver
import Muscat.FE.Integrators.NativeIntegration
import Muscat.FE.WeakForms.NativeNumericalWeakForm
import Muscat.Containers.NativeMesh
import Muscat.FE.Numberings.NativeDofNumbering
import Muscat.FE.Spaces.NativeSpace
import Muscat.Containers.Filters.NativeFilters
if subSubModule == "Muscat":
pass
return time.time()-st
[docs]def main():
"""This function call the function to check the integrity of the installation
Please read the documentation of py:class:Muscat.Helpers.Check.RunTests
"""
print(" {} version {}".format(__name__, __version__))
print(" Copyright (c) {}".format(__copyright__))
print("")
from Muscat.Helpers.Check import RunTests
import sys
sys.exit(len(RunTests()))