First time here? Checkout the FAQ!
x
0 votes
by (220 points)
retagged by
I am trying to speed up the implementation of my own eikonal model in the source code.

At the moment I am using inefficient for loops over the "con" list of the intracellular mesh to check element by element if they contain my node of interest and then I get all the nodes in each one of the elements that contain my node of interest. Before coming up with my own solution I want to check if there is something already available in the source code.

Thanks in advance

Cristian

1 Answer

0 votes
by (8.1k points)

Hi!

You can use

transpose_connectivity(const vector<T> & a_cnt, const vector<T> & a_con,
                       vector<T> & b_cnt, vector<T> & b_con)

where a_cnt, would be generated from mesh.dsp with cnt_from_dsp(), a_con would be mesh.con. (b_cnt, b_con) is the graph from nodes to elements. This means, row i contains all elements connected to node i.

Best, Aurel

Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...