### Documentation

237

views

1

Where can I find a list of all functions with a description of what they do exactly? For example, FacetFunction(), genrate_mesh(),.....

Here https://fenicsproject.org/documentation/ I don't seem to find anything useful a part from examples.

Thanks a lot.

Here https://fenicsproject.org/documentation/ I don't seem to find anything useful a part from examples.

Thanks a lot.

Community: FEniCS Project

### 1 Answer

3

In terminal, you can do

```
import fenics
dir(fenics)
```

and then

`help(fenics.FunctionName)`

Try to run python in Docker, i.e.,

`fenicsproject run python`

, then you should be able to `import fenics`

within the running python instance.
written
8 months ago by
Adam Janecka

Thanks :)

Also, I was interested in the documentation of generate_mesh, for which I imported mshr. However, the help is empty. Do you know what it does exactly? I use it in the following way:

Thanks a lot

Also, I was interested in the documentation of generate_mesh, for which I imported mshr. However, the help is empty. Do you know what it does exactly? I use it in the following way:

```
xlim, ylim = 1., 1.
size = 60
domain = Rectangle(Point(0., 0.), Point(xlim, ylim))
mesh = generate_mesh(domain,size)
```

But when looking at the mesh, I see that each side is not divided in 60 points, rather 65. Any idea?Thanks a lot

written
8 months ago by
caterinabig

1

The

In your example, the cell size would be then \(\sqrt{2}/60\) which can be checked by setting

`resolution`

in `generate_mesh(geometry, resolution)`

is not exactly the number of cells / divisions. It is just somehow related to the cell size approximately given by the diameter of the domain divided by the `resolution`

, see https://github.com/FEniCS/mshr/blob/a0c63564445bfa2bfbc8cd50605b28edbf8a58ac/src/MeshGenerator.cppIn your example, the cell size would be then \(\sqrt{2}/60\) which can be checked by setting

`set_log_level(TRACE)`

.
written
8 months ago by
Adam Janecka

Please login to add an answer/comment or follow this question.

I use fenics in a docker environment, i.e. to run codes I have to open docker and then type "fenicsproject run".

If I then try to type "import fenics", I get the following error: "bash: import: command not found"

Thanks