Commit Graph

73 Commits

Author SHA1 Message Date
PeterfoxUwU ecb188fe4c Base: Added Quantities for Optic/Chemical mechanics (#27944)
* Base: Added Quantities for Optic/Chemical mechanics

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-07 21:10:40 +01:00
pre-commit-ci[bot] 25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
marioalexis 06131ce8b5 Base: Restore schema spec for electromagnetic potential unit - fix #25093 2025-11-06 15:05:25 +01:00
Markus Reitböck f0eca551b3 Base: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:01 +02:00
bofdahof 847e2f5c85 Base: Units: refactor
Refactor Units making it constexpr, immutable, with repetition reduced.
Separate data from code.

Constexpr constructed units allow constructing predefined Quantities
from predefined unit types.
2025-06-03 09:31:38 +02:00
Ladislav Michl f8d2789a43 Base: Units: introduce unit one
Dimensionless quantities have all exponents equal to zero.
Such quantities are simply numbers. The associated unit is
the unit one, symbol 1, although this is rarely explicitly
written.

See chapter 2.3.3 Dimensions of quantities, The International
System of Units, 9th edition.
2025-06-03 09:31:38 +02:00
marioalexis 406a834a6d Base: Add volume charge density unit 2025-03-27 21:13:21 +01:00
Benjamin Bræstrup Sayoc dda05369c4 Base: remove unneeded includes 2025-02-18 11:07:57 -06:00
tritao e94d1cf872 Base: Remove Boost-based filesystem and switch to standard <filesystem> 2025-02-10 10:48:54 -06:00
André Kapelrud 39a5fdc315 Base: Add surface charge density unit 2025-01-22 11:17:59 -03:00
Ladislav Michl 2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl 0907c7bfda Base: Units: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl 6b6e1fbd26 Base: Units: reimplement getTypeString() using container 2024-12-23 17:48:42 +01:00
Ladislav Michl 2d0ce24496 Base: Units: hide internals 2024-12-23 17:48:42 +01:00
marioalexis 7550d54a01 Base: Add electromagnetic potential unit 2024-12-13 11:49:44 -05:00
FEA-eng 4c0ae6122f Base: Add moment unit 2024-05-16 12:51:37 -05:00
marioalexis c2fbee6be4 Base: Add stiffness per unit area unit 2024-01-26 13:44:16 -03:00
wmayer 43642a54f3 Base: fix cppcoreguidelines-avoid-non-const-global-variables 2023-11-22 14:06:06 +01:00
wmayer 08b10cd287 fix cppcoreguidelines-*
* cppcoreguidelines-init-variables
* cppcoreguidelines-c-copy-assignment-signature
* cppcoreguidelines-macro-usage
* cppcoreguidelines-non-private-member-variables-in-classes
* cppcoreguidelines-pro-type-member-init
* cppcoreguidelines-slicing
* cppcoreguidelines-special-member-functions
* cppcoreguidelines-virtual-class-destructor
2023-11-16 01:22:09 +01:00
wmayer e4975f0153 fix readability-braces-around-statements 2023-11-16 01:22:08 +01:00
wmayer e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer 2bc90e6090 Base: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
wmayer daa23162a4 Base: fix pow() of Unit 2023-02-27 20:07:01 +01:00
Uwe 1032fe4468 [Base] fix issues with new units
- also sort units for better overview
2023-02-26 22:19:31 +01:00
Uwe 2a098b1471 [Core] add missing velocity property
- fixes compilation because declared in header but no code
- also sort the properties to keep the overview
2023-02-26 16:38:02 +01:00
Oliver Oxtoby 9d5ab79a4c [App] [Base] Add missing Property classes for all Units (#6717)
- Add missing Property classes for all Units
- Add missing units to unit calculator, as well as some missing string representations
- also change units used for dynamic viscosity to the customary Pa*s
2023-02-26 15:28:28 +01:00
Uwe 201b95a5b2 [Core] add quantity Magnetization
- needed for FEM and Material
2023-02-08 20:33:58 +01:00
Uwe 2880a5ca2a [Core] add current density
- necessary to implement electromagnetic features to the FEM WB
2023-02-04 03:22:24 -06:00
Chris Hennes 3b42d4afac Base: PR6497 move return statement to new line 2022-03-29 12:34:34 -05:00
wmayer e4435cdcba Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
Uwe 9ec0bcdcf2 [Base] Units and Uui: remove unused includes 2022-02-24 11:08:56 +01:00
wmayer 4d87039635 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer 88ded38ca1 Base: only handle Base::ParserError exceptions for quantity expressions 2022-01-22 01:15:12 +01:00
Preslav 4ab37fc0ca Added stiffness units to FreeCAD [mN/m, N/m, kN/m, MN/m] 2021-08-16 12:27:41 +01:00
donovaly bcc669b930 [Base] add electrical conductivity
- this is necessary to perform electrodynamics simulations. Since the typical values are in the range of 1e6 S/m, we need the new units kS and MS

- since this is for simulations, also add electrical conductivity to the FEM material cards
2021-03-25 17:13:52 +01:00
luz paz d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
qingfengxia 5da01ab8b0 Base: add VolExpansionCoeff and complete KinematicViscosity unit 2020-05-23 00:03:09 +02:00
luz.paz d36c3ebe57 Trivial code formatting for some {.cpp,.h} files 2020-04-06 12:55:27 +02:00
donovaly 66354b3c58 add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly 05dadb4c75 add the units Ohm and Siemens 2020-01-05 15:00:46 +01:00
luz.paz 6f11ed298a src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
donovaly 82dc8e88f5 add the following units:
- mmol
- ml
- bar
- mbar
- kJ
- kWh
- eV
- C
- T
- F (p, n, u, m)
- H (n, u, m)
2019-12-19 13:31:12 +01:00
wmayer 3500451a04 Basic support for Frequency as unit 2019-10-20 18:14:56 +02:00
Dietmar Czekay c3f0288ea5 add VacuumPermittivity and fix adding user values to material editor in FEM 2019-09-04 11:29:09 -03:00
Bernd Hahnebach aa67d56361 Units: add AngleOfFriction as another parameter with Angle unit 2019-04-30 07:41:56 +02:00
wmayer 239c20b71f PVS: V705 It is possible that 'else' block was forgotten or commented out, thus altering the program's operation logics. 2019-02-17 19:54:24 +01:00
Bernd Hahnebach 57a0acffc0 Units: add various Material stress properties 2019-02-14 21:11:22 +01:00
wmayer 71f0f1a6d5 density is not an SI base unit 2018-03-28 11:47:08 +02:00
wmayer 7480544967 fix typo 2018-03-11 18:34:18 +01:00
Frederic Bonnard 651d2fd751 Fix "Unit overflow in pow()" error
During tests on Debian/Ubuntu :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836983 a problem was
found when raising a unit to a negative power on some architectures.
By default some architectures have "char" being
unsigned such as the ones listed here and others (
https://wiki.debian.org/ArchitectureSpecificsMemo ).
I just forced the sign-ness of pow()'s argument which fixes the issue.
2017-12-08 17:38:35 +01:00