Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writeSubfaceFamily does not work when the BC is defined in patches #72

Open
anilyil opened this issue Jun 19, 2024 · 0 comments
Open

writeSubfaceFamily does not work when the BC is defined in patches #72

anilyil opened this issue Jun 19, 2024 · 0 comments

Comments

@anilyil
Copy link
Contributor

anilyil commented Jun 19, 2024

Description

writeSubfaceFamily call does not work if the target BC is already defined as a collection of patches. This check to find the target BC only picks up the first patch:

https://github.com/mdolab/cgnsutilities/blob/main/cgnsutilities/cgnsutilities.py#L391-L404

        # Locate the Boco we're replacing
        boco = None
        for i in range(len(self.blocks[blockID].bocos)):
            r = self.blocks[blockID].bocos[i].ptRange  # get the point range for existing boco
            if (
                (r[0][0] == r[0][1] == 1 and face == "ilow")
                or (r[0][0] == r[0][1] == self.blocks[blockID].dims[0] and face == "ihigh")
                or (r[1][0] == r[1][1] == 1 and face == "jlow")
                or (r[1][0] == r[1][1] == self.blocks[blockID].dims[1] and face == "jhigh")
                or (r[2][0] == r[2][1] == 1 and face == "klow")
                or (r[2][0] == r[2][1] == self.blocks[blockID].dims[2] and face == "khigh")
            ):
                boco = i
                break

If a grid comes from a parallel pyHyp run (most of our volume grids), then the BC is written in patches that are divided during the parallel load balancing. As a result, the writeSubfaceFamily only works if it is preceded by a complete overwrite of BCs.

Expected behavior

The writeSubFaceFamily should first find all patches on a BC, and overwrite all of it. This should be communicated in the documentation as well.

Code versions

  • Operating System:
  • Python:
  • OpenMPI:
  • CGNS:
  • PETSc:
  • Compiler:
  • This repository:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant