-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Description
[魏老师原始组装代码图片],见网页链接(https://github.com/weihuayi/fealpy/assets/89182142/0e75857e-b0ac-4e0c-ad93-9e9405ade8c6)
魏老师:
您好! 上图是在学习您网页(https://www.weihuayi.cn/fealpy/docs/zh/example/num-nonlinear-interface)中组装(b(u^0)^3,v)的相应代码,其中b为常系数,u^0为已知的迭代时的有限元函数。您网页中的组装代码部分如下:
space = uh.space
mesh = space.mesh
qf = mesh.integrator(q=2, etype='cell')
bcs, ws = qf.get_quadrature_points_and_weights()
cellmeasure = mesh.entity_measure('cell')
pp = mesh.bc_to_point(bcs)
cval = b(pp)*uh(bcs)**3
phii = space.basis(bcs)
phij = space.basis(bcs)
bb = np.einsum('q, qci, qc, qcj, c->cij',ws,phii,cval,phij,cellmeasure)
魏老师,我想向您请教一下,bb的组装是不是有误,应为如下的组装代码呀:
bb = np.einsum('q, qc, qcj, c->cj', ws, cval, phij, cellmeasure)
Metadata
Metadata
Assignees
Labels
No labels