Source code for Muscat

# -*- 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',
         'Info',
         "IO",
         "LinAlg",
         "Types",
         "Experimental",
         "GeometricalTools"
         ]

from Muscat.Info import __name__
from Muscat.Info import __copyright_holder__
from Muscat.Info import __copyright_years__
from Muscat.Info import __copyright__
from Muscat.Info import __license__
from Muscat.Info import __version__


[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 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()))