Commit Graph

3915 Commits

Author SHA1 Message Date
Uwe
4a5bf895ed [FEM] [skip CI] inform user about used CPU cores for Elmer
Since the number of used cores can for Elmer have the impact that a solver run converges or not, output this info prominently
2022-07-16 19:46:46 +02:00
Uwe
3542c73966 [FEM] [skip CI] tell user when Elmer write succeeded
At the moment the user gets no feedback, while for Z88 and CCX he gets a result
2022-07-16 19:41:43 +02:00
Uwe
146e5508aa [FEM] [skip CI] fix wording
Calculix will not be broken, but stopped. After clicking the button your will also get a message that it has been 'stopped'
2022-07-16 19:33:02 +02:00
Uwe
2782d09dee [FEM] [skip CI] fix a typo 2022-07-16 19:21:25 +02:00
Uwe
32ac6fa9fd [FEM] [skip CI] fix a string 2022-07-16 18:54:11 +02:00
Uwe
10301e7f75 [FEM] [skip CI] fix a typo 2022-07-16 16:01:38 +02:00
Uwe
6625281986 [FEM] enable to run Elmer multi-threaded
- this needs proper testing, especially on a non-Windows system

- note that for some tasks multi-threading requires non-standard additional solvers like MUMPS. Ideally the user should be informed about this, depending on the equations he uses. But this should not block this PR, meaning to use multi-threading in general.
2022-07-16 14:59:25 +02:00
wmayer
d1ef818f39 Fem: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 13:37:55 +02:00
Marshal Horn
cf27c91a2e Replaced python2 usage of next()
iterator.next() is deprecated in python3.
next(iterator) is the direct replacement.
In some cases a for() loop makes more sense
2022-07-14 01:28:10 +02:00
Uwe
d48fe836ca [FEM] femutils.py: style changes
- as requested
2022-07-14 01:21:54 +02:00
Bernd Hahnebach
edcd16afaf FEM: Python code formatting 2022-07-13 12:04:52 +02:00
Uwe
c7aca5b5d2 [FEM] [skip CI] electrostatic: remove unused code 2022-07-13 03:23:19 +02:00
Uwe
c8064ed059 [FEM] fix solver console bugs
- for Elmer and Z88 on Windows several windows pop up (console windows). This is maybe annoying and the user is wondering what is going on, but the main problem is that when you close them, you break the solving process.
Therefore, on Windows only, hide the empty popup windows.
2022-07-13 02:51:31 +02:00
Bernd Hahnebach
99262f6356 FEM: extend codespell command in code conventions 2022-07-12 15:04:26 +02:00
Bernd Hahnebach
bbbd4d07bf FEM: typos, found with:
codespell -q 2 -S *.ts -S *.dyn -S *.svg  -L childs,dof,dum,freez,methode,nd,normaly,programm,som,uint,vertexes,inout  src/Mod/Fem/
2022-07-12 15:04:26 +02:00
Bernd Hahnebach
e49abfb350 FEM: python code formatting 2022-07-12 15:04:26 +02:00
Bernd Hahnebach
ff802c7274 FEM: elmer solver writer, add some comment in the regard of units 2022-07-12 11:35:45 +02:00
Uwe
5d389e3835 [FEM] check if solver executables exist
- currently one can enter any path for the solver executables, a check is missing

- moreover for Z88 the executable name is error-prone (just happened to me and cost me half an hour to find out what is wrong), therefore check also the correct filename. For Elmer this cannot be done since there are different executables one can choose of (e.g. for multi-threading etc.)
2022-07-11 02:23:14 +02:00
Uwe
07fab3e4f8 [FEM] fix CCX multi-threading bug
- in the preferences one could specify more CPU cores than available

- also correct a label sine the number of cores are since FC 0.20 used for all CCX solver runs

- also remove unnecessary (doubled) slots from the UI file
2022-07-10 17:33:33 +02:00
Uwe
713e160731 [FEM] remove doubled slots from preferences UI files 2022-07-10 17:25:19 +02:00
wehrle
a236ca843f correction 2022-07-10 13:43:46 +02:00
Uwe
c0fa37cfa9 [FEM] update includes
- forgot to commit this in previous commit
2022-07-03 22:59:37 +02:00
Uwe
ef088674ba [FEM] fix wrong console outputs for fluid materials
- since a while ThermalExpansionCoefficient is used, VolumetricThermalExpansionCoefficient is only used for the material task panel
- as already stated in a code comment, the unit of VolumetricThermalExpansionCoefficient is ThermalExpansionCoefficient, therefore we must check for ThermalExpansionCoefficient
- we must also check if ThermalExpansionCoefficient exists

- Adapt the existing fluid material cards to use the ThermalExpansionCoefficient
2022-07-02 05:36:43 +02:00
Mihail
8afc5d3f0a FEM WB Elmer viscosity bug fix.
In Elmer there was errors "Viscosity not found" if used mixed solid and flow calculation.
This fix disables Stokes-Navier eruation for Solid objects.

	modified:      src/Mod/Fem/femsolver/elmer/writer.py
2022-07-02 05:16:50 +02:00
Uwe
7001caea9a [FEM] [skip CI] fix a typo
- spot by the spellchecker CI
2022-07-01 03:12:15 +02:00
wmayer
9b2b0e0acf modernize C++: replace boost::function with std::function 2022-06-30 20:31:55 +02:00
mosfet80
d162d9371c Remove old msc ver. Freecad 0.20 require 64 bit and windows 7 or higher. For this reason, msc libraries less than 1800 will no longer be used. (#7036)
* remove msc<1800
2022-06-28 00:42:33 +02:00
Uwe
e8f3227191 [FEM] fix point filter initialization issue
- on opening the task dialog of existing point filter, the point value must be displayed
2022-06-27 01:07:36 +02:00
wmayer
7db925d991 App: fix memory leaks in Enumeration class and simplify code 2022-06-25 18:18:57 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00
wmayer
1aa897d450 Fem: remove some superfluous const_cast 2022-06-24 19:43:33 +02:00
wmayer
5234d9bc67 App: add pure virtual methods to PropertyGeometry to delegate it to the geometry of sub-classes
Following the law of Demeter add some wrapper methods to PropertyGeometry and implement them in sub-classes. As a side-effect this makes some const_cast obsolete
2022-06-24 16:15:02 +02:00
wmayer
c955372ecf cppcoreguidelines-pro-type-union-access
According to https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md using union for type-punning is undefined behaviour.
 Replace it with std::memcpy
2022-06-24 14:29:50 +02:00
Yorik van Havre
830b3944db Merge pull request #7067 from Kuzma30/add_ts
Crowdin Add "new" WB to translations.
2022-06-24 13:50:43 +02:00
mosfet80
620c273c4e Boost version <=1.60 is never used in freecad 0.20 (#7038)
* Boost version 1.60 is never used in freecad 0.20
2022-06-24 02:20:26 +02:00
Kuzemko Alexsandr
e678620cbd Crowdin Update .ts files with current source. 2022-06-21 17:31:06 +03:00
Uwe
8e253cb4c8 [FEM] fix a variable casting
- reported by MSVC not to cast a float to a double but as double directly

- also remove some superfluous Boolean comparisons
2022-06-19 15:15:18 +02:00
wmayer
68e337670e Fem: remove string from translation 2022-06-14 01:43:45 +02:00
wmayer
3158be46ad Fem: added signals and slots to notify when first function is added 2022-06-14 01:38:55 +02:00
Uwe
74c2ad4bf0 [FEM] point filter: use a LineEdit to output value
- that one copy the result to the clipboard
- also fix a typo
2022-06-14 01:21:17 +02:00
Uwe
522c91ce79 [FEM] next try to proper revert 2022-06-14 00:58:08 +02:00
Uwe
e8d65c22d6 Revert "Fixing principal stress plots part 2"
This reverts commit 166eee5eed.
2022-06-14 00:40:51 +02:00
FEA-eng
166eee5eed Fixing principal stress plots part 2
https://forum.freecadweb.org/viewtopic.php?f=18&t=69385
2022-06-13 19:52:16 +02:00
FEA-eng
3af54a7dda Fixing principal stress plots part 1
https://forum.freecadweb.org/viewtopic.php?f=18&t=69385
2022-06-13 19:51:53 +02:00
wmayer
7fa294fd7a Fem: for PointMarker and DataMarker use the internal name instead of label, in customEvent() do not expect a fix name 2022-06-13 17:37:26 +02:00
wmayer
7400b11870 Fem: in FEM_PostFilterLinearizedStresses command do not use a hard-coded object name but that of the selected FemPostDataAlongLineFilter 2022-06-13 17:08:58 +02:00
wmayer
915371aa70 Fem: do not use the Label property but the internal name to access an FEM post object via Python 2022-06-13 17:01:38 +02:00
wmayer
7b225789da Fem: do not access the active document but the document the FEM post object is part of 2022-06-13 16:46:15 +02:00
wmayer
9aa14b36a3 Fem: use WeakPtrT classes instead of raw pointers to avoid possible dangling pointers and to avoid undefined behaviour if a wrong static_cast is performed 2022-06-13 14:21:18 +02:00
wmayer
27a36156f6 Fem: improve TaskPostDataAtPoint:
* refactor TaskPostDataAtPoint::on_Field_activated()
* show results in a label instead of message box to reduce clicks
* in output window also print field and position as the pure values are useless
2022-06-13 12:31:37 +02:00