本文整理汇总了Python中Interpreter.build_QM_dirichlet_eq方法的典型用法代码示例。如果您正苦于以下问题:Python Interpreter.build_QM_dirichlet_eq方法的具体用法?Python Interpreter.build_QM_dirichlet_eq怎么用?Python Interpreter.build_QM_dirichlet_eq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interpreter
的用法示例。
在下文中一共展示了Interpreter.build_QM_dirichlet_eq方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Simulation
# 需要导入模块: import Interpreter [as 别名]
# 或者: from Interpreter import build_QM_dirichlet_eq [as 别名]
#! /usr/bin/python
"""
Created on Tue Feb 12 09:51:01 2013
@author: santiago
"""
from Classes import *
from Interpreter import *
from Solver import *
from utils import substract_1
from write import write_vtk
simulation = Simulation()
simulation.read_solver_input('square.msh')
simulation.domain.read_mesh_file('square.msh')
simulation.domain.read_bc_file('square.bc')
interpreter = Interpreter()
equation = interpreter.build_QM_dirichlet_eq(simulation)
solver = Solver()
solution = solver.solve_spectral(simulation, equation)
nodes_coords = simulation.domain.nodes.coords
triangles = simulation.domain.elements.triangles.el_set
triangles = substract_1(triangles)
triangles = triangles[:, 1:]
write_vtk('square_from_OOP.vtk','this shit','',nodes_coords,\
triangles,['SCALARS',['solution'],[solution[1]]])