<div style="font-family: Arial, sans-serif; font-size: 14px;"></div><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: Arial, sans-serif; font-size: 14px; line-height: normal; font-weight: 400;"></span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">Hi,</span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">I hope this message finds you all in good health and high spirits.</span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">I wanted to discuss an approach problem input file reading/processing in a solver which is using PETSc DMPlex. In our team we have a range of solvers, they are not built on PETSc except this one, but they all share a common problem input format. This format includes essential data such as node coordinates, element connectivity, boundary conditions based on elements, and specific metadata related to the problem. </span><span style="font-family: "Trebuchet MS", sans-serif;">I create an array for boundary points on each rank and utilize them in our computations, I am doing it hardcoded currently but I need to start reading those input files, But I am not sure about the approach. </span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif;">Here's what I have in mind:</span></p><ol style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; list-style: none; margin: 1.25em 0px; counter-reset: list-number 0; display: flex; flex-direction: column;" data-listchain="__List_Chain_344"><li style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 0.375em; counter-increment: list-number 1; display: block; min-height: 28px; font-family: "Trebuchet MS", sans-serif; font-size: 14px; font-weight: 400;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">- Begin by reading the node coordinates and connectivity on a single core.</span><div style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 0.375em; counter-increment: list-number 1; min-height: 28px; font-family: "Trebuchet MS", sans-serif; font-size: 14px; font-weight: 400;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">- Utilize the DMPlexCreateFromCellListPetsc() function to construct the DMPlex.</span></div><div style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 0.375em; counter-increment: list-number 1; min-height: 28px; font-family: "Trebuchet MS", sans-serif; font-size: 14px; font-weight: 400;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">- Distribute the mesh across processors.</span></div><div style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; padding-left: 0.375em; counter-increment: list-number 1; min-height: 28px; font-family: "Trebuchet MS", sans-serif; font-size: 14px; font-weight: 400;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">- Proceed to read and process the boundary conditions on each processor. If the global index of the boundary element corresponds to that processor, we process it; otherwise, we pass.</span></div></li></ol><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">Additionally, maybe I need to reorder the mesh. In that case I think I can use the point permutation IS obtained from the DMPlexGetOrdering() function while processing boundary conditions.</span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">Also I have another approach in my mind but I don't know if it's possible: Read/construct DMPlex on single core including boundary conditions. Store BC related data in Vec or another appropriate data structure. Then distribute this BC holding data structure too as well as DMPlex. </span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif;">I would greatly appreciate your thoughts and any suggestions you might have regarding this approach. </span><span style="font-family: "Trebuchet MS", sans-serif;">Looking forward to hearing your insights.</span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif; font-size: 14px; line-height: normal; font-weight: 400;">Best regards,</span></p><p style="border: 0px solid rgb(217, 217, 227); box-sizing: border-box; margin: 1.25em 0px;"><span style="font-family: "Trebuchet MS", sans-serif;">Onur</span></p><div><div><span style="font-family: Arial, sans-serif; font-size: 14px; line-height: normal; font-weight: 400;"></span>
</div>
</div>