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

Rename Executables, improve logging for tools #86

Closed
wants to merge 6 commits into from

Conversation

kursatyurt
Copy link
Collaborator

As discussed in #73, #83 ASTE needs to new more self-explained executable names. While doing that structure of tools is also changed to the OOP approach which allows using customized logger.

List of changes:

  • Name of the main tool of ASTE changed from preciceMap to aste-run.
  • The calculator tool name changed from vtk_calculator.py to asteEvalute.py
  • The mesh joiner tool name changed from join_mesh.py to asteJoin.py
  • The mesh partitioner tool name changed from partition_mesh.py to astePartition.py
  • A new superset of tools named aste-tools.py was added as a wrapper around the above-mentioned tools.
  • Tools are moved from src directory to tools directory.

Example output of tools:

❯ ./aste-tooling.py evaluate --mesh turbineFine.vtk --data "xx"
---[ASTE-Evaluate] INFO : No output mesh name is given turbineFine.vtk will be used.
---[ASTE-Evaluate] INFO : Reading input mesh "turbineFine.vtk"
---[ASTE-Evaluate] INFO : Mesh contains 2534 points.
---[ASTE-Evaluate] INFO : Evaluated "-x*sin(sqrt(abs(x-y-47)))-(y+47)*sin(sqrt(abs(0.5*x+y+47)))-y*sin(sqrt(abs(y-z-47)))-(z+47)*sin(sqrt(abs(0.5*y+z+47)))" on the input mesh "turbineFine.vtk".
---[ASTE-Evaluate] INFO : Evaluated function saved to "xx" variable on output mesh "turbineFine.vtk"
---[ASTE-Evaluate] INFO : Written output to "turbineFine.vtk".
❯ ./aste-tooling.py evaluate --mesh turbineFine.vtk --data "xx" --diff --diffdata "xx"
---[ASTE-Evaluate] INFO : No output mesh name is given turbineFine.vtk will be used.
---[ASTE-Evaluate] INFO : Reading input mesh "turbineFine.vtk"
---[ASTE-Evaluate] INFO : Mesh contains 2534 points.
---[ASTE-Evaluate] INFO : Evaluated "xx"-"(-x*sin(sqrt(abs(x-y-47)))-(y+47)*sin(sqrt(abs(0.5*x+y+47)))-y*sin(sqrt(abs(y-z-47)))-(z+47)*sin(sqrt(abs(0.5*y+z+47))))" on the mesh "turbineFine.vtk".
---[ASTE-Evaluate] INFO : Vertex count 2534
---[ASTE-Evaluate] INFO : Relative l2 error 0.0
---[ASTE-Evaluate] INFO : Maximum error per vertex 0.0
---[ASTE-Evaluate] INFO : Minimum error per vertex 0.0
---[ASTE-Evaluate] INFO : Median error per vertex 0.0
---[ASTE-Evaluate] INFO : 99th percentile of error per vertex 0.0
---[ASTE-Evaluate] INFO : 95th percentile of error per vertex 0.0
---[ASTE-Evaluate] INFO : 90th percentile of error per vertex 0.0
---[ASTE-Evaluate] INFO : Written output to "turbineFine.vtk".
❯ ./aste-tooling.py partition -m turbineFine.vtk -n 5 --dir part
---[ASTE-Partition] INFO : No algorithm given. Defaulting to "meshfree"
---[ASTE-Partition] INFO : Processing mesh turbineFine.vtk
---[ASTE-Partition] INFO : Writing output to partitioned_mesh
❯ ./aste-tooling.py join -m part/partitioned_mesh
---[ASTE-Join] INFO : Recovery data found. Full recovery will be executed
---[ASTE-Join] INFO : Starting full mesh recovery

Open questions for the reviewer :

  • Should we keep tools are executable separately like aste<toolname>.py [args] or not?

@fsimonis
Copy link
Member

See #83 (comment)

@davidscn
Copy link
Member

Would it be possible to open a separate PR for the logging in order to have clean feature contributions? Otherwise the history becomes too messy.

@kursatyurt kursatyurt closed this Feb 22, 2022
@kursatyurt kursatyurt deleted the rename_executable branch February 22, 2022 22:19
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.

3 participants