debugging ogs - nod_val_vector.size()



I am currently working on the coupling between the latest OGS version and Eclipse (Up to this day the coupling only works with the 5.3.3 version of OGS).

    While debugging I encountered something which caused problems in several functions/loops and therefore I was asked to share it with you all since it might affect you as well.

    In the old version of OGS (5.3.3) the array nod_val_vector, or to be exact its .size(), was used to run loops over all nodes of the mesh

    (e.g. copying the pressure data of all nodes from Eclipse to OGS). However, compared to the old 5.3.3 version the nod_val_vector array is flipped in the current trunk version of OGS

    (the size of each entry of nod_val_vector now corresponds to the total number of nodes in the mesh and not the number of entries in nod_val_vector as such).

    So if you have to run a loop over all nodes of the mesh a possible solution to the problem is to save the number of nodes in the mesh in a long int like this:

            ᅵᅵᅵᅵ long nnodes = fem_msh_vector[0]->GetNodesNumber(false);

  and use it instead of nod_val_vector.size(). Or of course something similar...

  Happy debugging and kindest regards,

  Wolf Tilmann


-- Wolf Tilmann Pfeiffer Geohydromodelling Institute of Geoscience Christian-Albrechts-University of Kiel Ludewig-Meyn-Strasse 10, 24118 Kiel, Germany phone.: 0049 (0)431 880-4805 mail: