27 Commits

Author SHA1 Message Date
Julien Marrec
05c8cf503b Lint: use automated tooling to reformat C++ and CMakeLists files (#2103)
* Add initial clang tidy / clang format config files

* Clang format the entire codebase

```
find ./src -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./include -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./Web -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./dev -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./wrappers -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
```

* Add a .cmake-format file and reformat CmakeLists.txt with it

https://github.com/cheshirekow/cmake_format

* Add a clang-format workflow


only runs on PRs, only on touched files
2022-03-31 10:51:48 -04:00
Jorrit Wronski
458ee9469e Added a check for the inputs to calc_Tfreeze, solves #1137 2016-07-17 01:21:41 +02:00
Ian Bell
116cafcd8a Fixed a few things that coverity didn't like 2015-12-12 13:29:01 -07:00
mikekaganski
28691e8e75 const, ref and iterator optimization
1. Another set of arguments optimized:
* args-by-val converted to args-by-ref
* in some cases, reverse has been done, if that is better: if the
object's copy is modified in the func, it's better to avoid extra copy
from arg to local var
2. some const functions marked as such (this is just a beginning)
3. iterators were replaced with const_iterators where applicable
4. catches that catch std::exception& changed to catch (...) - that is
safer; if exception handling is restructured, this will have to be
reconsidered anyway
5. removed some basic structures' constructors; changed them to hold
const char*s to avoid unnecessary string constructions;
6. in some places, moved variable declarations to their definitions, to
avoid calling default constructors and then assigning
7. removed some unnecessary shared_pointers in favor of local objects;
8. in FORTRAN-style functions, added const specifiers to input doubles;
9. fixed a place where values were inserted into a map while iterating
through it
10. fixed is_valid_*_derivative: they could accept incorrect values and
throw when upper index is less than lower
2015-03-01 10:51:01 +10:00
Jorrit Wronski
9738503e0c Moved reference state from fluid to state object, incompressibles do internal caching now. 2015-02-11 14:48:04 +01:00
Jorrit Wronski
c9c29eadd1 Added partial derivatives for incompressible fluids. Tests need to be updated and the docs are outdated... 2015-02-10 16:43:29 +01:00
Jorrit Wronski
792c466c3d I hope this is the last commit to fix #429 and to fix #413 2015-01-27 20:44:05 +01:00
Jorrit Wronski
104175dfa1 Trying to fix #413 2015-01-20 11:01:34 +01:00
Jorrit Wronski
04c26a7ebe New reference state calculations seem to work fine and employ fewer calls to property functions 2014-12-17 13:08:21 +01:00
Jorrit Wronski
f594136451 Fixed the docs, changed the calculation of the reference state, we are half - does not work properly 2014-12-17 11:23:43 +01:00
Ian Bell
3bcc83a3e4 convert assert to cassert to make VxWorks happier
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-19 22:14:16 -05:00
Ian Bell
8327d54ea2 Replaced all tabs with spaces (finally) in C++ files
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-11-19 12:16:14 -05:00
jowr
165298d41e Renamed the enumeration and still no luck 2014-08-01 15:44:02 +02:00
jowr
eddeee54e0 Added more fitting stuff, still some problems with the enumerations in C++ 2014-08-01 15:15:35 +02:00
jowr
8ff8332e77 Added some reporting to Python. Untested changes in C++ 2014-08-01 15:13:48 +02:00
jowr
6360e84a54 Added some new functions to handle volume fractions, hope this does not cause any trouble other places 2014-07-22 17:29:01 +02:00
jowr
8e66da5d09 Added LiBr and some more fitting scripts 2014-07-17 15:27:40 +02:00
jowr
2bb3e182e5 Fitting works, some tests do not pass. 2014-07-17 11:52:12 +02:00
jowr
e946d84dec Incompressible library and backend work, still need to convert the coefficients from v4. 2014-07-16 13:18:45 +02:00
jowr
943eb86d2e Added some more tests and prepared the backend. Example fluids load properly, but there are some bugs. Calculations work, but give wrong results. 2014-07-13 21:04:11 +02:00
jowr
ed35139d8a Implement new, more general solvers for the polynomials. Added solvers for rho, c, u and s to the incompressibles. T as function of h is still missing, should got to the backend... 2014-07-10 13:25:17 +02:00
jowr
00f0672f0f Basic incompressible structure running. 2014-07-09 21:18:30 +02:00
Ian Bell
f4764eb929 Incompressibles load and run! ExamplePure works.
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-07-09 18:06:21 +02:00
jowr
10a7fa5a41 MatrixMath tests work 2014-07-09 10:14:40 +02:00
jowr
00e9ddf291 Added 2D function to JSON readers, fixed 2D polynomial fitting 2014-06-29 18:03:37 +02:00
jowr
de03057f48 Added the first incompressible test cases and it seems to work... 2014-06-23 17:34:37 +02:00
Ian Bell
3bfbecd6f8 Added IncompressibleFluid.h
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-06-08 21:31:47 +02:00