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

Update doc for adaptVerbose and mark it deprecated #447

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

joshia5
Copy link

@joshia5 joshia5 commented Aug 16, 2024

There are differences in adapt and adaptVerbose function as it is now (apart from printing out the mesh and other print statements) which include additional iteration(s) of refine+snap

core/ma/ma.cc

Lines 106 to 107 in 8959c59

refine(a);
snap(a);

and calling fixelementShapes Niter times

core/ma/ma.cc

Line 85 in 8959c59

fixElementShapes(a);

This PR attempts to improve the function documentation in the header stating the above-mentioned differences and mark function deprecated for potential upcoming name-change (breaking)

@joshia5 joshia5 changed the title Updat doc for adaptVerbose and mark it deprecated Update doc for adaptVerbose and mark it deprecated Aug 16, 2024
@joshia5 joshia5 requested a review from cwsmith August 16, 2024 17:02
Copy link
Contributor

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This looks good. A few comments:

~/develop/core (develop)$ git grep adaptVerbose 
capstone_clis/capStoneAnisoAdapt.cc:  ma::adaptVerbose(in, false);
capstone_clis/capStoneAnisoAdaptWing.cc:  ma::adaptVerbose(in, false);
capstone_clis/capStoneAttachSolution.cc:  ma::adaptVerbose(in, false);
capstone_clis/capStoneAttachSolution2.cc:  ma::adaptVerbose(in);
capstone_clis/capStoneAttachSolutionStrandOnly.cc:  ma::adaptVerbose(in, false);
capstone_clis/capStoneAttachSolutionUni.cc:  ma::adaptVerbose(in, true);
capstone_clis/capStoneIsoAdaptB737.cc:  ma::adaptVerbose(in, false);
ma/ma.cc:void adaptVerbose(Input* in, bool verbose)
ma/ma.cc:void adaptVerbose(const Input* in, bool verbose)
ma/ma.cc:  adaptVerbose(makeAdvanced(in), verbose);
ma/ma.h:void adaptVerbose(Input* in, bool verbosef = false);
ma/ma.h:void adaptVerbose(const Input* in, bool verbosef = false);
python_wrappers/apf.i:  void adaptVerbose(Input* in, bool verbosef = false);
test/capVol.cc:    ma::adaptVerbose(in, false);
test/highOrderSizeFields.cc:  ma::adaptVerbose(inAdv);

@jacobmerson
Copy link
Contributor

@joshia5 @cwsmith you may want to check if intel support the C++14 standard deprecated attribute

see: https://en.cppreference.com/w/cpp/language/attributes/deprecated

If it doesn't you could define a PUMI_DEPRACATED macro that's compiler dependent.

@cwsmith
Copy link
Contributor

cwsmith commented Aug 20, 2024

Yeah, I like the idea of having the macro. Unfortunately, I don't see the 'deprecated' attribute (old or new C++14) listed in the oneAPI Intel compiler reference (linked above).

@jacobmerson
Copy link
Contributor

C++ 17 guarantees

All attributes unknown to an implementation are ignored without causing an error.
https://en.cppreference.com/w/cpp/language/attributes

it may be worth checking if intel safely ignores [[deprecated]]. Or, are we not compiling core in 17 mode yet?

@cwsmith
Copy link
Contributor

cwsmith commented Aug 21, 2024

We require C++11 but optionally enable C++14. Our local systems don't currently have access to the new Intel oneAPI compilers, but it looks like we may be able to download them:
https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler-download.html?operatingsystem=linux&distribution-linux=offline

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

Successfully merging this pull request may close these issues.

3 participants