8000 请教原始b(u^0)^3,v)的组装代码是否有误 · Issue #623 · weihuayi/fealpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

请教原始b(u^0)^3,v)的组装代码是否有误 #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jibingquanm opened this issue Apr 1, 2024 · 1 comment
Open

请教原始b(u^0)^3,v)的组装代码是否有误 #623

jibingquanm opened this issue Apr 1, 2024 · 1 comment

Comments

@jibingquanm
Copy link

[魏老师原始组装代码图片],见网页链接(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)

@weihuayi
Copy link
Owner
weihuayi commented May 14, 2024

@jibingquanm 上面的代码比较旧了,我安排了一个学生基于最新的接口来写上面的代码,这一周应该可以完成。非常抱歉,这一段事情很多,没有及时回复您。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0