Dear, when others use dolfinx code to help me solve problems on forums, I still spend a lot of time understanding their answers, the biggest difficulty being unclear about the functions in dolfinx. So I want to know where I can quickly learn about the functions in dolfinx (such as necessary comments on function capabilities) to improve my work efficiency. Thank you all.
There are plenty of demos and tutorials available:
https://docs.fenicsproject.org/dolfinx/v0.8.0/python/
https://jsdokken.com/dolfinx-tutorial/
https://jsdokken.com/fenics22-tutorial/intro.html
http://jsdokken.com/FEniCS23-tutorial/README.html
https://bleyerj.github.io/comet-fenicsx/index.html
to mention a few, and the DOLFINx API itself:
https://docs.fenicsproject.org/dolfinx/v0.8.0/python/api.html
Learning about all functions in DOLFINx is no easy task, as you are likely to never use all of them for anything (alot of internal functions).
It is unclear what your confusion about functions is, as everything in DOLFINx is either a class or a function. Could you be more specific?
Here’s an example: In response to a specific problem, you have already provided an answer in someone else’s post. I just need to understand your code and make some simple modifications to solve my problem. However, due to my inability to quickly grasp the functionality of certain functions or classes (such as compute_incident_entities
, entities_to_geometry
), I am unable to effectively apply your code, leading me to post another question (as shown in the image)
Having something like a manual to look up functions or classes would greatly benefit many DOLFINx users and also alleviate your burden. I am already using the links you mentioned, including the DOLFINx API, but it seems that it is not very comprehensive. For example, the function
compute_incident_entities
lacks any textual explanation in its source code:
def compute_incident_entities(topology, entities: npt.NDArray[np.int32], d0: int, d1: int):
return _cpp.mesh.compute_incident_entities(topology, entities, d0, d1)
Please keep in mind that this is an open source project. In an optimal world every function is documented. However it requires alot of time and effort. We are happy to accept cobtributions to improve the docs.
That being said, by as you saw from the source code, it calls a C++ function, which is documented at
https://docs.fenicsproject.org/dolfinx/v0.8.0/cpp/mesh.html#_CPPv4N7dolfinx4mesh25compute_incident_entitiesERK8TopologyNSt4spanIKNSt7int32_tEEEii
Indeed, as an open-source project, I understand the challenges you face; perhaps I should indeed spend more time learning about these functions. Thank you for your response!