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

add a CLI tool "queryMesh" #665

Closed
wants to merge 2 commits into from
Closed

Conversation

norihiro-w
Copy link
Collaborator

Add the new CLI tool "queryMesh" with which one easily get information of specific elements and nodes.
This PR includes #664

Example: queryMesh 1d_tet.msh -e 0 -e 1 -n 0 -n 1
Output

info: Reading OGS legacy mesh ... 
info:   ... finished.
info: Nr. Nodes: 804.
info: Nr. Elements: 1200.
--------------------------------------------------------
# Element 0
Type : TET4
Mat ID : 0
Nodes: 
44 2.200000000000e+01 0.000000000000e+00 0.000000000000e+00 
648 2.250000000000e+01 5.000000000000e-01 5.000000000000e-01 
447 2.250000000000e+01 0.000000000000e+00 5.000000000000e-01 
649 2.300000000000e+01 5.000000000000e-01 5.000000000000e-01 
Content: 2.083333333333e-02
Neighbors: 615 413 none 950 
--------------------------------------------------------
# Element 1
Type : TET4
Mat ID : 0
Nodes: 
200 1.000000000000e+02 0.000000000000e+00 0.000000000000e+00 
401 1.000000000000e+02 5.000000000000e-01 0.000000000000e+00 
199 9.950000000000e+01 0.000000000000e+00 0.000000000000e+00 
803 1.000000000000e+02 5.000000000000e-01 5.000000000000e-01 
Content: 2.083333333333e-02
Neighbors: none none 1196 2 
--------------------------------------------------------
# Node0
Coordinates: 0.000000000000e+00 0.000000000000e+00 0.000000000000e+00 
Connected elements: 42 52 78 993 1001 1002 
--------------------------------------------------------
# Node1
Coordinates: 5.000000000000e-01 0.000000000000e+00 0.000000000000e+00 
Connected elements: 42 78 92 104 210 981 995 1023 

@TomFischer
Copy link
Member

Just a wish: Maybe it is possible to write the choosen elements to a new mesh file for visual inspection with paraview?

@norihiro-w
Copy link
Collaborator Author

@TomFischer why not directly use the query function in Paraview?

@endJunction
Copy link
Member

Looks good and useful. Nice macro for type to string conversion.
I have seen only the std::cout being used, so maybe logog is not needed then, or one could tweak logog's output for desired precision...

@TomFischer
Copy link
Member

@TomFischer why not directly use the query function in Paraview?

Yes, you are right. No need to (re)implement my wish.

@TomFischer
Copy link
Member

I think the PR is ready for merge. Unfortunately there seems to be some problems to do this automatically. @norihiro-w Can you fix this, please?

@endJunction
Copy link
Member

Rebased and merged w/o conflicts.

@endJunction endJunction closed this May 4, 2015
@norihiro-w norihiro-w deleted the query-mesh branch May 20, 2015 15:20
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

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.

4 participants