本文整理汇总了Python中Solver.solve_mesh方法的典型用法代码示例。如果您正苦于以下问题:Python Solver.solve_mesh方法的具体用法?Python Solver.solve_mesh怎么用?Python Solver.solve_mesh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solver
的用法示例。
在下文中一共展示了Solver.solve_mesh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: import Solver [as 别名]
# 或者: from Solver import solve_mesh [as 别名]
# Nodal Solver
# ==============================================================================
start_time = time.time()
flux_nodal = Solver.solve_nodal_circuit(A, Yb, F)
nodal_time = time.time() - start_time
# ==============================================================================
# Mesh solver - B manually defined
# ==============================================================================
# flux_mesh_manually=Solver.solve_mesh(B,Zb,F)
# ==============================================================================
# Mesh Solver - Tree algo
# ==============================================================================
start_time = time.time()
flux_mesh_welsch = Solver.solve_mesh(B, Zb, F)
# flux_mesh_welsch=Solver.solve_mesh_circuit(A,Zb, F)
loop_time = time.time() - start_time
both_fluxes = np.concatenate((flux_nodal, flux_mesh_welsch), axis=1)
print("Done")
print(both_fluxes)
# ==============================================================================
# Comparison
# ==============================================================================
# print("Nodal \t \t Mesh man. \t \t Mesh Welsch")
# for counter,each in enumerate(flux_mesh_manually):
# print(str(flux_nodal[counter,0])+" \t " + str(each[0]) +" \t "+ str(flux_mesh_welsch[counter,0]))
#