我试着在ipython上用solve\u pde运行its2D\u 2.py,但没有发现模块错误。脚本下的子文件夹一切都在那里,但我不能搞清楚
----> 1 pb, state = solve_pde('its2D_2.py')
~\Anaconda3\lib\site-packages\sfepy\applications\pde_solver_app.py in solve_pde(conf, options, status, **app_options)
30 if not isinstance(conf, ProblemConf):
31 required, other = get_standard_keywords()
---> 32 conf = ProblemConf.from_file(conf, required, other)
33
34 opts = conf.options = (dict_to_struct(app_options, flag=(1,),
~\Anaconda3\lib\site-packages\sfepy\base\conf.py in from_file(filename, required, other, verbose, define_args, override, setup)
344 that should be defined using the `define_args` tuple or dictionary.
345 """
--> 346 funmod = import_file(filename, package_name=False)
347
348 if "define" in funmod.__dict__:
~\Anaconda3\lib\site-packages\sfepy\base\base.py in import_file(filename, package_name, can_reload)
177
178 else:
--> 179 mod = __import__(name)
180
181 if (name in sys.modules) and can_reload:
ModuleNotFoundError: No module named 'its2D_2'
看起来它的2d_2.py脚本有问题或者无法加载它。但每个文件夹和文件都在目录中。任何帮助都将不胜感激 its2.py脚本
from __future__ import absolute_import
from examples.linear_elasticity.its2D_1 import *
from sfepy.mechanics.matcoefs import stiffness_from_youngpoisson
def stress_strain(out, pb, state, extend=False):
"""
Calculate and output strain and stress for given displacements.
"""
from sfepy.base.base import Struct
...
目前没有回答
相关问题 更多 >
编程相关推荐