本文整理匯總了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]]])