Utilities

Muscat provides some generic functionalities not related to finite elements problems. All this functionalities are present in the folder Muscat.Helpers of the library.

Configuration

Muscat has some module level variables accessible to the user. These variables can be used to alter the behavior of the library. The following template can be used to configure Muscat for a specific application. Please refer to the module help for more information.

# -*- coding: utf-8 -*-

#from Muscat.Helpers.Logger import SetUseDifferentialTime
#default True
# SetUseDifferentialTime(True)
# SetUseDifferentialTime(False)

#
#import Muscat.Helpers.Decorators as Decorators
#print("Decorators.useFroze_itDecorator =", Decorators.useFroze_itDecorator)
#default True
#Decorators.useFroze_itDecorator = False
#Decorators.useFroze_itDecorator = True

#import Muscat.Actions.OpenInParaView as OpenInParaView
#print("OIP.paraviewExec =", OIP.paraviewExec)
#default "paraview"
#OpenInParaView.paraviewExec = "paraview"

#import Muscat.FE.SymWeakForm as SWF
#print("SWF.testcharacter =", SWF.testcharacter)
#default "'"
#SWF.testcharacter = "'"

#import Muscat.FE.DofNumbering as DN
#print("DN.numberingAlgorithm =", DN.numberingAlgorithm)
#default  "CppBase"
#DN.numberingAlgorithm = "NumpyBase"
#DN.numberingAlgorithm = "DictBase"
#DN.numberingAlgorithm = "CppBase"

#print("DN.__cacheSize__ =", DN.__cacheSize__)
#default 1
#DN.__cacheSize__ = 1


#import Muscat.FE.Integration as Integration
#print("Integration.UseCpp =", Integration.UseCpp)
#default True
#Integration.UseCpp = True
#Integration.UseCpp = False

#print("Integration.UseMultiThread =", Integration.UseMultiThread)
#default True
#Integration.UseMultiThread =  True
#Integration.UseMultiThread =  False

#print("Integration.MultiThreadThreshold =", Integration.MultiThreadThreshold)
#default 100
#Integration.MultiThreadThreshold = 100

#import Muscat.LinAlg.LinearSolver as LinearSolver
#print("LinearSolver.defaultSolver =", LinearSolver.defaultSolver)
#print("LinearSolver.defaultIfError =", LinearSolver.defaultIfError)
#LinearSolver.defaultIfError = "EigenCG"
#LinearSolver.defaultIfError = "CG"

#from Muscat.LinAlg import ConstraintsHolder as ConstraintsHolder
#print("ConstraintsHolder.defaultMethod =", ConstraintsHolder.defaultMethod)
#default "Projection"
#ConstraintsHolder.defaultMethod = "Projection"
#ConstraintsHolder.defaultMethod = "Ainsworth"
#ConstraintsHolder.defaultMethod = "Penalisation"
#ConstraintsHolder.defaultMethod = "Lagrange"


# Disconnect the use of the cache
# Evaluated at execution time (not at definition)
# so the user can turn off the use of cache for a single call of a cache function
# from Muscat.Helpers import Cache
# Cache.Use_CACHE = True  (default)
# Cache.Use_CACHE = False