TDycores-Project / TDycore

BSD 2-Clause "Simplified" License
4 stars 0 forks source link

Updates the code to use refactored mesh functions #156

Closed bishtgautam closed 3 years ago

bishtgautam commented 3 years ago

The code changes include:

  1. Use of refactored mesh functions to access various member variables of TDy mesh elements to avoid using *Offset*. e.g.

Old approach

PetscInt sOffsetFace = subcells->face_offset[subcell_id];

for (iface=0;iface<subcells->num_faces[subcell_id];iface++) {
  PetscInt face_id = subcells->face_ids[sOffsetFace + iface];
  ...
}

New approach:

PetscInt *face_ids, num_faces;
ierr = TDyMeshGetSubcellFaces(mesh, subcell_id, &face_ids, &num_faces); CHKERRQ(ierr);

for (iface=0;iface<subcells->num_faces[subcell_id];iface++) {
  PetscInt face_id = face_ids[iface];
}
  1. Conversion of TDySubcell and TDyVector data to a compressed format.

Note:

codecov-io commented 3 years ago

Codecov Report

Merging #156 (b8f951c) into master (ee00448) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #156   +/-   ##
=======================================
  Coverage   67.73%   67.73%           
=======================================
  Files           7        7           
  Lines        1221     1221           
=======================================
  Hits          827      827           
  Misses        394      394           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ee00448...b8f951c. Read the comment docs.

bishtgautam commented 3 years ago

@jeff-cohere I too agree that these changes improve code readability.