本文整理汇总了Python中pyNastran.utils.log.get_logger函数的典型用法代码示例。如果您正苦于以下问题:Python get_logger函数的具体用法?Python get_logger怎么用?Python get_logger使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_logger函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, log=None, debug=None):
self.nodes = None
self.tris = None
self.tets = None
self.bcs = None
self.precision = 'double'
self.log = get_logger(log, 'debug' if debug else 'info')
示例2: __init__
def __init__(self, log=None, debug=False):
self.log = get_logger(log, 'debug' if debug else 'info')
self.nodes = None
self.elements = None
self.header = ''
self.infilename = None
示例3: __init__
def __init__(self, inputs=None):
if inputs is None:
inputs = {
'magnify' : 1,
'debug' : False,
'console' : True,
}
res_widget = MockResWidget()
GuiAttributes.__init__(self, inputs, res_widget)
self.is_testing = True
self.debug = False
self._form = []
self.result_cases = {}
self._finish_results_io = self.passer1
self._finish_results_io2 = self.passer2
#self.geometry_actors = {
#'main' : GeometryActor(),
#}
self.grid = Grid()
self.scalarBar = ScalarBar()
self.alt_geometry_actor = ScalarBar()
self.alt_grids = {
'main' : self.grid,
}
#self.geometry_properties = {
##'main' : None,
##'caero' : None,
##'caero_sub' : None,
#}
#self._add_alt_actors = _add_alt_actors
level = 'debug' if self.debug else 'info'
self.log = get_logger(log=None, level=level)
示例4: __init__
def __init__(self, log=None, debug=True):
self.infilename = None
self.title_lines = []
self.xz_symmetry = 0
self.xy_symmetry = 0
self.nsymmetry_planes = 0
self.title = ''
self.nnetworks = 0
self.patches = {}
self.lines = []
self.alphas = [0.]
self.ncases = None
self.betas = [0.]
self.alpha_compressibility = 0.
self.beta_compressibility = 0.
self.sref = 1.
self.bref = 1.
self.cref = 1.
self.dref = 1.
self.xref = 0.
self.yref = 0.
self.zref = 0.
self.isings = 0.0
self.isingp = 0.0
self.igeomp = 0.0
self.icontp = 0.0
self.ibconp = 0.0
self.iedgep = 0.0
self.ipraic = 0.0
self.nexdgn = 0.0
self.ioutpr = 0.0
self.ifmcpr = 0.0
self.icostp = 0.0
self.epsgeo = 0.0
self.igeoin = -1.0
self.igeout = 0.
self.nwxref = 0.
self.triint = 0.0
self.iabsum = -0.0
self.is_end = None
self.pea_section = ''
self.mach = 0.0
self.data_check = 2
self.title_section = ''
self.xyz_section = ''
self.streamline_section = ''
self.flow_section = ''
self.sectional_prop_section = ''
self.grid_section = ''
self.symmetry_section = ''
self.msg = ''
self.log = get_logger(log, 'debug' if debug else 'info')
示例5: __init__
def __init__(self, log=None, debug=False):
self.readHalf = False
self.cartType = None # grid, results
self.nPoints = None
self.nElements = None
self.infile = None
self.infilename = None
self.log = get_logger(log, 'debug' if debug else 'info')
示例6: _start_log
def _start_log(self, log=None, debug=False):
"""
Sets up a dummy logger if one is not provided
:self: the object pointer
:log: a python logging object
:debug: adds debug messages (True/False)
"""
self.log = get_logger(log, 'debug' if debug else 'info')
示例7: __init__
def __init__(self, log=None, debug=True):
self.nNetworks = 0
self.patches = {}
self.lines = []
self.alphas = [0.]
self.ncases = None
self.betas = [0.]
self.alphaC = 0.
self.betaC = 0.
self.sref = 1.
self.bref = 1.
self.cref = 1.
self.dref = 1.
self.xref = 0.
self.yref = 0.
self.zref = 0.
self.isings = 0.0
self.isingp = 0.0
self.igeomp = 0.0
self.icontp = 0.0
self.ibconp = 0.0
self.iedgep = 0.0
self.ipraic = 0.0
self.nexdgn = 0.0
self.ioutpr = 0.0
self.ifmcpr = 0.0
self.icostp = 0.0
self.epsgeo = 0.0
self.igeoin = -1.0
self.igeout = 0.
self.nwxref = 0.
self.triint = 0.0
self.iabsum = -0.0
self.isEnd = None
self.peaSection = ''
self.mach = 0.0
self.dataCheck = 2
self.titleSection = ''
self.xyzSection = ''
self.streamlineSection = ''
self.flowSection = ''
self.sectionalPropSection = ''
self.gridSection = ''
self.symmetrySection = ''
self.msg = ''
self.log = get_logger(log, 'debug' if debug else 'info')
示例8: __init__
def __init__(self, lines, log=None):
"""
Parameters
----------
lines : List[str]
list of lines that represent the case control deck
ending with BEGIN BULK
log : log()
a :mod: `logging` object
"""
# pulls the logger from the BDF object
self.log = get_logger(log, "debug")
self.debug = False
self.sol_200_map = {
'STATICS' : 101,
'STATIC' : 101,
'MODES' : 103,
'MODE' : 103,
'BUCK' : 105,
'BUCKLING' : 105,
'DFREQ' : 108,
'MFREQ' : 111,
'SAERO' : 144,
'FLUTTER' : 145,
'FLUT' : 145,
'DIVERGE' : 144,
'DIVERG' : 145,
# 'HEAT' : ,
# 'STRUCTURE' : ,
'NLSTATICS' : 400,
'LNSTATICS' : 400,
'MTRAN' : 112,
'DCEIG' : None,
}
# 'HEAT', 'ANALYSIS', 'MFREQ', 'STATICS', 'MODES', 'DFREQ',
# 'MTRAN', 'BUCK', 'MCEIG', 'DCEIG', 'SAERO', 'NLSTATIC', 'NLSTAT',
# 'STATIC', 'MTRANS', 'MODE', 'FLUTTER', 'DIVERG', 'NLTRAN', 'FLUT',
#self.debug = True
#: stores a single copy of 'BEGIN BULK' or 'BEGIN SUPER'
self.begin_bulk = ['BEGIN', 'BULK']
# allows BEGIN BULK to be turned off
self.write_begin_bulk = True
self._begin_count = 0
self.lines = lines
self.subcases = {0: Subcase(id=0)}
self._read(self.lines)
示例9: add_dummy_gui_functions
def add_dummy_gui_functions(test):
def removeOldGeometry(self):
pass
def cycleResults(self):
pass
def TurnTextOn():
pass
def TurnTextOff():
pass
def update_axes_length(value):
pass
def passer():
pass
def passer2(a, b):
pass
class Grid(object):
def Reset(self):
pass
def Allocate(self, nelements, delta):
pass
def InsertNextCell(self, *cell):
pass
def SetPoints(self, *cell):
pass
def Modified(self):
pass
def Update(self):
pass
class ScalarBar(object):
def VisibilityOff(self):
pass
def VisibilityOn(self):
pass
def Modified(self):
pass
test._finish_results_io2 = passer2
test.grid = Grid()
test.grid2 = Grid()
test.scalarBar = ScalarBar()
test.alt_geometry_actor = ScalarBar()
test.log = get_logger(log=None, level='debug')
test.log_info = print
test.removeOldGeometry = removeOldGeometry
test.cycleResults = cycleResults
test.TurnTextOn = TurnTextOn
test.TurnTextOff = TurnTextOff
test.update_axes_length = update_axes_length
test.cycleResults_explicit = passer
示例10: __init__
def __init__(self, infileName, log=None, debug=True):
assert os.path.exists(infileName), print_bad_path(infileName)
self.infileName = infileName
self.nNetworks = 0
self.patches = {}
self.lines = []
self.alphas = [0.]
self.ncases = None
self.betas = [0.]
self.alphaC = 0.
self.betaC = 0.
self.sref = 1.
self.bref = 1.
self.cref = 1.
self.dref = 1.
self.xref = 0.
self.yref = 0.
self.zref = 0.
self.isings = 0.0
self.isingp = 0.0
self.igeomp = 0.0
self.icontp = 0.0
self.ibconp = 0.0
self.iedgep = 0.0
self.ipraic = 0.0
self.nexdgn = 0.0
self.ioutpr = 0.0
self.ifmcpr = 0.0
self.icostp = 0.0
self.isEnd = None
self.peaSection = ''
self.mach = 0.0
self.dataCheck = 2
self.titleSection = ''
self.xyzSection = ''
self.streamlineSection = ''
self.flowSection = ''
self.sectionalPropSection = ''
self.gridSection = ''
self.msg = ''
self.log = get_logger(log, 'debug' if debug else 'info')
示例11: __init__
def __init__(self, log=None, debug=False):
self.log = get_logger(log, 'debug' if debug else 'info')
self._endian = b''
self.n = 0
self.infile = None
# self.readHalf = False
# self.nPoints = None
# self.nElements = None
self.infilename = None
self.points = None
self.elements = None
self.regions = None
self.loads = {}
示例12: __init__
def __init__(self, log=None, debug=False):
ShabpOut.__init__(self, log, debug)
#self.xyz = {}
self.X = {}
self.Y = {}
self.Z = {}
self.trailer = None
self.component_name_to_patch = {}
self.patch_to_component_num = {}
self.component_to_params = {}
self.component_num_to_name = {}
self.component_name_to_num = {}
self.log = get_logger(log, 'debug' if debug else 'info')
示例13: __init__
def __init__(self, log=None, debug=False):
self.log = get_logger(log, 'debug' if debug else 'info')
self._endian = b''
self.n = 0
self.infile = None
self.readHalf = False
self.cartType = None # grid, results
self.nPoints = None
self.nElements = None
self.infilename = None
# updated later
self.nResults = 0
self.nElementsSkip = 0
self.nElementsRead = 0
示例14: __init__
def __init__(self, log=None, debug=False):
FortranFormat.__init__(self)
self.endian = b'<'
self.log = get_logger(log, 'debug' if debug else 'info')
self.debug = debug
self.xyz = array([], dtype='float32')
self.tet_elements = array([], dtype='int32')
self.hexa_elements = array([], dtype='int32')
self.quad_elements = array([], dtype='int32')
self.tri_elements = array([], dtype='int32')
self.results = array([], dtype='float32')
self.tecplot_filename = ''
self.variables = []
示例15: __init__
def __init__(self, log=None, debug=False):
#FortranFormat.__init__(self)
self.log = get_logger(log, 'debug' if debug else 'info')
self.debug = debug
self.n = 0
self.nodes = array([], dtype='float32')
self.tris = array([], dtype='int32')
self.quads = array([], dtype='int32')
self.pids = array([], dtype='int32')
self.tets = array([], dtype='int32')
self.penta5s = array([], dtype='int32')
self.penta6s = array([], dtype='int32')
self.hexas = array([], dtype='int32')
self.isort = None