Where can i find informaton on the functions used to define domains?

I am new to Fenics. My aim is to construct a domain which is formed by subtracting a cylindrical shape from a cubic domain. Where can i find a list of all the functions used to define domains with a description of what they produce and the arguments they take?

Geometry definition and meshing should be carried out with dedicated CAD/meshing software, e.g., https://gmsh.info/. It is straightforward to read these generated meshes and associated data using FEniCS. FEniCS has some utility methods for creating very simple inteval, rectangle and box meshes for testing and proof of concept.

1 Like

Hey, thanks for your response. I actually have a mesh generated in comsol, so should be able to use that. I need to assign different boundary conditions to different boundaries. Could you please direct me towards a page where I can see how to read a mesh file and interpret each boundary in order to do this?

I don’t know in which format COMSOL outputs its generated meshes. But see for example, Section 2 of @dokken’s tutorial, which interprets data read using meshio for DOLFINx. There’s also a long tutorial in Section 2, which covers the case where meshio is not available and how to handle index permutations etc.

1 Like

Unfortunately these tutorials are for .msh files. COMSOL can only export the mesh to .nas, .3mf, .ply or .stl file formats. I’m not sure if these tutorials would still work in this case.

nevermind, was being dim. You can use meshio to convert to .xdmf as required by fenics.