I want to make a parametrisation study of a channel length (L). I am defining length as L=Constant(value) where value is a number at the beginning of my code.
Then, when I need to define the boundaries I have `outflow = ‘near(x[0], L)’.
This gives me the following error:
------------------- Start compiler output ------------------------
/tmp/tmp8dma58xo/dolfin_subdomain_351ee9b816aebffd744e4e69091dcb79.cpp: In member function ‘virtual bool dolfin::dolfin_subdomain_351ee9b816aebffd744e4e69091dcb79::inside(Eigen::Ref<const Eigen::Matrix<double, -1, 1> >, bool) const’:
/tmp/tmp8dma58xo/dolfin_subdomain_351ee9b816aebffd744e4e69091dcb79.cpp:63:28: error: ‘L’ was not declared in this scope
63 | return near(x[0], L);
| ^
------------------- End compiler output ------------------------
I think it has to do with C++ strings and variables but I haven’t found a way to write it.
That is great, thank you very much! I used near instead of np.isclose just consistency with my other commands.
I am new to Fenics, so could you please break-up for me the components of this class? In particular, the use of the keyword SudDomain and the command(?) on_boundary.
In this case you do not need it, as there are no other possible dofs close to this point and are not on the boundary. In general you should add an and on_boundary