How to print dx value

Hi everybody,

I want to visualize the numerical value of the volume on which I compute the integral in order to compare with the hand-calculated.

I use dx volume and I can’t to visualize it’s numerical value in the python console.

Consider: print(assemble(1*dx(domain=mesh)))

1 Like

I obtain dx =6278670479.934861. this output hasn’t much sense, because my geometry consist in a cylinder with height =2m and radius = 2 m in which I’ve subtracted a sphere of radius 5cm then the volume must be equal to dx = 25,12m^3. What units of measure does fenics use?

FEniCS does noes use any units. Whatever unit you have consistently specified your mesh in, is the output unit.
i.e. If you define your external mesh in mm, say a rectangle that goes from [0,50]x[0,50] dolfin will print the area as
2500 (mm^2).
If you say that your input unit is meter in the external meshing tool, dolfin will still print 2500, but the unit will be m^2

1 Like