Skip to content
New issue

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

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

Already on GitHub? # to your account

Make avtUnstructuredDomainBoundaries.C better #20125

Open
JustinPrivitera opened this issue Dec 13, 2024 · 0 comments
Open

Make avtUnstructuredDomainBoundaries.C better #20125

JustinPrivitera opened this issue Dec 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JustinPrivitera
Copy link
Member

The code in avtUnstructuredDomainBoundaries.C is the stuff of nightmares.

  • Quadruple pointer indirection int ****cellPoints;,
  • variables that are declared and used for a bit before being used again for entirely different purposes (size_t nPts = givenPoints[index].size(); and then later nPts = idList->GetNumberOfIds(); in a loop),
  • strange vector semantics givenPoints.resize(givenPoints.size() + 1);,
  • redundancies int index = GetGivenIndex(fromDom, toDom); and a few lines later int sIndex = GetGivenIndex(fromDom, toDom);,
  • poor choices #define ExchangeData_unsigned_char ExchangeData<unsigned char>,
  • inconsistent operators nGainedPoints[sendDom][recvDom] += (int) nPts; versus nGainedTuples[sendDom][recvDom] = nTuples; (+= is wrong in this case)

Let's make it better.

@JustinPrivitera JustinPrivitera added the enhancement New feature or request label Dec 13, 2024
@JustinPrivitera JustinPrivitera self-assigned this Dec 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant