jorgensd / dolfinx-tutorial

A reimplementation of the Springer book: https://github.com/hplgit/fenics-tutorial/, covering new topics as well as transitioning from dolfin to dolfinx
https://jorgensd.github.io/dolfinx-tutorial/
110 stars 63 forks source link

Issue on page /chapter1/fundamentals_code.html : dolfinx.Constant or fem.Constant? #172

Closed tyagi-ankit closed 9 months ago

tyagi-ankit commented 9 months ago

Under the heading "Defining the source term" it says : "As the source term is constant over the domain, we use dolfinx.Constant".

But the code below uses fem.Constant, as in

from dolfinx import default_scalar_type
f = fem.Constant(domain, default_scalar_type(-6))

Again, in the callout --- "Compilation speed-up" --- just below, dolfinx.Constant is used. Please clarify.

jorgensd commented 9 months ago

Should be updated to fem.Constant