Hi,
I'm using CUBIT for mesh generating, but also I can add BCs and loads and also assign types of elements that I want to the mesh file. The question is, how mfem handle these attributes from CUBIT Genesis file for examples? Let's say for example 19, I have my own Genesis file that is defined with BCs and loadings in the the .g file. What should I change in the code (in terms of applying BCs) that I allow me to run it with my own geometry and loadings?
It would be nice if there was an example for this.
Thanks
Saman
As a general comment: the mfem mesh readers do not import any specific boundary condition infomation -- only attributes (integer tags) associated with the boundary elements. Therefore, the boundary conditions are imposed in MFEM, typically using the boundary attributes. Depending on the PDE and the discretization method these can be imposed as essential (fixed value for a set of dofs), or weak (imposed by adding term(s) to the r.h.s. linear form and/or the bilinear form).
I think @jandrej can tell you more about setting the boundary attributes in Cubit for proper export to mfem.
OK thanks. So basically the question is now how from CUBIT mesh one can assign mfem boundary attributes? Let's say I have a block with 6 sidesets and I want to fix one s0ide. Is the sideset number from CUBIT is the attribute number in mfem?
OK thanks. So basically the question is now how from CUBIT mesh one can assign mfem boundary attributes? Let's say I have a block with 6 sidesets and I want to fix one s0ide. Is the sideset number from CUBIT is the attribute number in mfem?
Yes, this is correct. Make sure your numbering starts low (I start from 1 and not exodus format convention from 100). Then you can access the boundary attribute in MFEM with bdr_attributes[0]. If you would start from 100, we create 99 empty attributes before that.
Thanks for the help Andrej. I'm making progress.
Most helpful comment
Yes, this is correct. Make sure your numbering starts low (I start from 1 and not exodus format convention from 100). Then you can access the boundary attribute in MFEM with bdr_attributes[0]. If you would start from 100, we create 99 empty attributes before that.