Closed ktbolt closed 1 year ago
@ktbolt Can you elaborate a little bit on the best practices you have in mind? Might be useful to have this documented somewhere for posterity.
@menon-karthik Some of these are stated in Coding Guidlines but most are C++ practices that everybody knows.
I should create a Lab document for this with links to appropriate websites and such.
Note that developers will look at the current code to see how things are done.
@ktbolt, it would be great to add your C++ standards to https://github.com/SimVascular/.github on the off chance that not everybody has the same ideas as you. The one you linked is very svFSI/FORTRAN specific.
Can you briefly say what you plan for 0D+
specifically?
@mrp089 These are not really my standards.
C++ best practices have been developed over the years by the C++ community, Bjarne Stroustrup, Herb Sutter, Scott Meyers and others.
I will try to produce a document that distills the essence of the C++ best practices.
Cool!
Specifically for 0D+
, what are your plans?
I have no grand plan for the ZeroDSolver. I will just go through the code and add/modify it as needed.
However, a couple of things I have noticed when removing templates and testing
main
(svzerodsolver segfaults when given no arguments, input files are not checked if they exist, catch nlohmann::json parse errors, etc.)calibrate
I've made several changes
svzerodcalibrator
and svzerodsolver
main
functions.enum class BlockType
names more readable
closed_loop_coronary_lefT_bc
replaces CLOSEDLOOPCORONARYLEFTBC
unsigned int
with int
std::map<std::string, int> num_triplets
map with TripletsContributions
struct
num_triplets.F
replaces num_triplets["F"]
I've made some more changes
this->
from vessel blocks This all I'm going to do for this Issue.
There are other specific parts of the implementation that I would like to improve like removing the heavy use for string literals in the code to identify parameters, types and such. I'll open separate Issues for those improvements.
Merge into main
.
I will clean up the code a bit to follow best practices and such.