Hello everyone. Appreciate any help.
I have a vtk mesh with contains a scalar number for each cell. Those numbers (scalars) are used to define subdomains. In a simple way, they are 1,3 or 4. So I have ordered for each cell this parameter (scalar). What I did so far is to save it in a .txt format.
I need help to define subdomains after loading the mesh. In a few words, I want to load the mesh (.xml or .xdmf format), read my .txt file, and create 2 subdomains: one if the respective cell the ID is 1, another if the specific cell is different from 1 (3 or 4).
I’ll try to illustrate below:
Here is my mesh:
Those are my IDs (scalars for subdomains):
I have each scalar (ID) saved for each cell number. So, I think I have to load the .txt data with the ID date and loop each cell assigning the respective ID.
My question is: how can I loop and assign my .txt data to each respective cell data?
Appreciate any help