First time here? Checkout the FAQ!
x
0 votes
by (3.6k points)
Hi,

I am trying to extract information from the mesh registered for the intracellular physic (intra_mesh). If I run the code in serie I can get the coordinates, fibers, element, etc by using:

sf_mesh&  ref_mesh = get_mesh(intra_elec_msh);

coord      = ref_mesh.xyz;

connect    = ref_mesh.con;

elem_start = ref_mesh.dsp;

tag        = ref_mesh.tag;

fiber      = ref_mesh.fib;

sheet      = ref_mesh.she;

However, if I execute openCARP in parallel with 2 or more processes I only get the mesh information from one of the processes but not from the entire grid. Is there a way to create a global vector to store this information or do you have an example on how to extract this information?

Thank you in advance!

1 Answer

0 votes
by (8.0k points)

Hi!

The numberings help you relate the mesh (as defined in the input) with the current data layout.

SF::vector<mesh_int_t> & nbr = mesh.get_numbering(SF::NBR_REF); // vertex numbering
SF::vector<mesh_int_t> & enbr = mesh.get_numbering(SF::NBR_ELEM_REF); // element numbering
mesh_int_t local_idx = 10; // some local index
mesh_int_t global_idx = nbr[local_idx];

Hope that helps, 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
...