Search code examples
pythonnumerical-methods

how to use the function in Fenics?


I have the following question about using Fenics, namely how can I correctly use the function "as_tensor", "as_vector" and "dot"? what are the original codes for each function (how to open it) ?

e.g. if the input is as_tensor([[1,2],[3,4]]), what is the output?


Solution

  • The documentation can be found here: https://fenicsproject.org/docs/ufl/1.5.0/ufl.html#ufl.tensors.as_tensor

    and the source code at https://github.com/FEniCS/ufl/blob/master/ufl/tensors.py#L219