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

[WIP] pywrapper - custom source terms for all solvers #2388

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

Conversation

bigfooted
Copy link
Contributor

Proposed Changes

Introduce custom source terms for all solvers through the python wrapper.

current status:
First proof of concept, reproduces the laminar buoyancy driven cavity testcase

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
TestCases/py_wrapper/custom_source/run.py Fixed Show fixed Hide fixed
SU2_CFD/include/drivers/CDriverBase.hpp Fixed Show fixed Hide fixed
SU2_CFD/src/drivers/CDriverBase.cpp Fixed Show fixed Hide fixed
SU2_CFD/src/numerics/flow/flow_sources.cpp Fixed Show fixed Hide fixed
unsigned long CDriver::GetNumberInnerIter() const { return config_container[selected_zone]->GetnInner_Iter(); }
unsigned long CDriver::GetNumberOuterIter() const { return config_container[selected_zone]->GetnOuter_Iter(); }

unsigned long CDriver::GetDensity_FreeStreamND() const { return config_container[selected_zone]->GetDensity_FreeStreamND(); }

Check warning

Code scanning / CodeQL

Lossy function result cast Warning

Return value of type double is implicitly converted to unsigned long.
unsigned long CDriver::GetNumberOuterIter() const { return config_container[selected_zone]->GetnOuter_Iter(); }

unsigned long CDriver::GetDensity_FreeStreamND() const { return config_container[selected_zone]->GetDensity_FreeStreamND(); }
unsigned long CDriver::GetForce_Ref() const { return config_container[selected_zone]->GetForce_Ref(); }

Check warning

Code scanning / CodeQL

Lossy function result cast Warning

Return value of type double is implicitly converted to unsigned long.
@@ -66,6 +72,11 @@

string CDriver::GetSurfaceFileName() const { return config_container[selected_zone]->GetSurfCoeff_FileName(); }

unsigned long CDriver::GetSolution(unsigned short iSOLVER, unsigned long iPoint, unsigned short iVar) {
auto solver = solver_container[iZone][INST_0][MESH_0][iSOLVER];
return solver->GetNodes()->GetSolution(iPoint,iVar);

Check warning

Code scanning / CodeQL

Lossy function result cast Warning

Return value of type double is implicitly converted to unsigned long.
bigfooted and others added 2 commits December 3, 2024 16:18
… type in loop condition

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant