TDycores-Project / TDycore

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

MPFA-O code modifications to be consistent with style guide #124

Closed bishtgautam closed 3 years ago

bishtgautam commented 3 years ago
  1. Changes initialization of local variables

Old way:

TDy_mesh *mesh;
mesh = tdy->mesh;

New way:

TDyMesh = &tdy->mesh;
  1. Changes TDy_mesh to TDyMesh

  2. Instead of tdydef _TDy_mesh TDyMesh, the struct is now defined as:

typedef struct {
...
...
} TDyMesh;
bishtgautam commented 3 years ago

Thanks for the detailed review comments. I will work on addressing them.

codecov-io commented 3 years ago

Codecov Report

Merging #124 (d362a7a) into master (ba83213) will increase coverage by 0.03%. The diff coverage is 90.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #124      +/-   ##
==========================================
+ Coverage   85.24%   85.28%   +0.03%     
==========================================
  Files          48       48              
  Lines       10623    10696      +73     
==========================================
+ Hits         9056     9122      +66     
- Misses       1567     1574       +7     
Impacted Files Coverage Δ
demo/steady/steady.c 51.32% <0.00%> (ø)
src/mpfao/3D/tdympfao3D_ts_dae.c 0.00% <0.00%> (ø)
src/mpfao/3D/tdympfao3D_ts_transientvar.c 0.00% <0.00%> (ø)
src/tdymemory.c 73.04% <28.57%> (ø)
src/mesh/tdycoremeshutils.c 64.81% <73.80%> (+0.02%) :arrow_up:
src/mesh/tdycoremesh.c 94.46% <98.18%> (+0.07%) :arrow_up:
src/mpfao/2D/tdympfao2D.c 100.00% <100.00%> (ø)
src/mpfao/3D/tdympfao3D_core.c 97.39% <100.00%> (+0.03%) :arrow_up:
src/mpfao/3D/tdympfao3D_snes.c 97.72% <100.00%> (+0.10%) :arrow_up:
src/mpfao/3D/tdympfao3D_steady.c 100.00% <100.00%> (ø)
... and 7 more

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 ba83213...10cd3ac. Read the comment docs.

bishtgautam commented 3 years ago

@jeff-cohere How about future PRs that (i) modify malloc, and (ii) moves declaration of local variable closer to their usage?

jeff-cohere commented 3 years ago

@jeff-cohere How about future PRs that (i) modify malloc, and (ii) moves declaration of local variable closer to their usage?

That sounds fine. I think we can move toward our style conventions as is convenient--it's not a super high priority as far as I know.