pyfem.utils package

Submodules

pyfem.utils.IntKeyDict module

class pyfem.utils.IntKeyDict.IntKeyDict[源代码]

基类:dict

关键字只能为整数(Integer)类型的字典,已经存在的键值无法通过赋值方法(__setitem__)更改。

add_item_by_id(id_: int, item: Any) None[源代码]
get_ids_by_indices(indices: List[int]) List[int][源代码]
get_indices_by_ids(ids: List[int]) List[int][源代码]
get_items_by_ids(ids: List[int]) List[Any][源代码]
ids_to_indices: Dict[int, int]
indices_to_ids: Dict[int, int]
update_indices() None[源代码]

pyfem.utils.colors module

pyfem.utils.get_vtk_cell_type module

pyfem.utils.get_vtk_cell_type.get_vtk_cell_type(dimension, nodes_number)[源代码]

根据维度和节点数判断VTK单元格类型

参数: dimension: 单元格维度 (0, 1, 2, 3) nodes_number: 单元格的节点数

返回: cell_type_name: 单元格类型名称 cell_type_int: 单元格类型整数值

pyfem.utils.logger module

pyfem.utils.logger.set_logger(logger: Logger, abs_input_file: Path, level: int = 10) Logger | None[源代码]

设置 logging 模块的基础配置,并返回一个 logger 对象。

参数:
  • logger – 要配置的logger对象

  • abs_input_file – Job配置文件的绝对路径

  • level – 输出日志的最低级别,默认是 DEBUG 级别

pyfem.utils.logger.set_logger_sta(logger: Logger, abs_input_file: Path, level: int = 20) Logger | None[源代码]

设置 logging 模块的基础配置,并返回一个 logger 对象。

参数:
  • logger – 要配置的logger对象

  • abs_input_file – Job配置文件的绝对路径

  • level – 输出日志的最低级别,默认是 DEBUG 级别

pyfem.utils.mechanics module

pyfem.utils.visualization module

pyfem.utils.wrappers module

Module contents