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

Get Interface Extrema #8

Closed
araeli opened this issue Jul 19, 2018 · 3 comments
Closed

Get Interface Extrema #8

araeli opened this issue Jul 19, 2018 · 3 comments

Comments

@araeli
Copy link

araeli commented Jul 19, 2018

Hello,

I'm trying to optimize my code on non-conforming regions of Cartesian hierarchical meshes, using the Volctree data structure.

In this context I would ask the extremal points of an interface, can you help me to make it easier than expected? I can't find if there is a direct access function to this infomation.

Given the index of an interface I can get the centroid and the size, it is necessary to compute myself the extremals using these informations?
I was familiar with the getNodes of PABLO, but currently I'm interested also to intersection points, and I would prefer using the Interface or the Cell (it is coherent with the remaining part of the code).

Thank you in advance,
Alice

@marcocisternino
Copy link
Member

Hi Alice,
what do you mean with "extremal points" of an interface? Do you mean its vertices? If yes, here an example is:
Let's extract an interface from a voloctree object (here patch is a pointer to a voloctree object) using its id (be id a consistent long) and ask for its vertices:
ConstProxyVector interfaceVertexIds = patch->getInterface(id).getVertexIds();
loop over the obtained vertices and ask for their coordinates storing them in an array<double,3>
const int nCellVertices = interfaceVertexIds.size();
for(int k = 0; k < nCellVertices; ++k){
std::array<double,3> v_coord = patch->getVertexCoords(interfaceVertexIds[k]);
}

If you meant something else, please explain me exactly what you mean with "extremal points" of an interface.
Marco

@marcocisternino
Copy link
Member

Sorry, obviously nCellVertices is not an happy choice, but it is not wrong. I should use something less cryptic like nInterfaceVertices. Anyway...

@araeli
Copy link
Author

araeli commented Jul 24, 2018

Hello Marco,

sorry I am late for answering. Yes it was that I meant; thank you so much for your help, I was pretty sure there was a better manner to study the vertices of an interface. I am still testing and it is very helpful for me now.

Alice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants