Commit Graph

3728 Commits

Author SHA1 Message Date
Uwe
c5191b152a [skip CI] [FEM] results dialog: fix layout issued reported by Qt Designer 2022-03-25 23:41:58 +01:00
Uwe
ccbeedb4e4 [FEM] fix missing recompute
as reported here: https://forum.freecadweb.org/viewtopic.php?p=582525#p582525

- also fix potential issue that FemGui is used by the script but not loaded
2022-03-25 21:22:15 +01:00
Uwe
5f3b9d42ff [FEM] fix missing recompute
after the ccx_dat_file object has been changed, the analysis must be recomputed
2022-03-25 21:05:43 +01:00
Uwe
26faa6a43f [FEM] remove new framework CCX from toolbar
"new framework" implies especially to new users that this is the CCX of choice. But it is not, since you cannot Since we keep it in the menu and experienced users will find it.
2022-03-25 20:00:39 +01:00
Uwe
650eac3a56 [FEM] fix broken Z88 part 5/5: add missing toolbar icon
- now that it is working, expose Z88 to the toolbar as well
2022-03-25 19:55:32 +01:00
Uwe
fdd103814c [FEM] fix broken Z88 part 4: don't hardcode memory for iterative solvers
- we must not hardcode the number of coincidence vector places
The user must have a chance to change this setting for the iterative solvers according to the Z88 docs.
We use as default the number Z88 uses in its distributed example.
2022-03-25 19:28:24 +01:00
Uwe
db3e261653 [FEM] update Z88 tests
(I doubt that it is sensible to check if a hardcoded memory value is written. The test will fail if you use a non-default memory setting on your FreeCAD. The CI uses of course the default)
2022-03-25 19:04:21 +01:00
Uwe
b186269f54 [skip CI] [FEM] some style changes by MSVC
- to avoid annoying unnecessary diffs while working on the FEM module
2022-03-25 18:55:33 +01:00
Uwe
f88c95d743 [FEM] fix broken Z88 part 3: don't hardcode memory
- we must not hardcode the number of stiffness matrix places, especially not for the Cholesky solver
The user must have a chance to change this setting in case of a solver error. This is also according to the Z88 docs that says it is a two step process:
- the solver first computed the necessary places
- the user must set the value accordingly in case it is too low

- also some code style fixes
2022-03-25 18:40:12 +01:00
Uwe
b3208f643e [FEM] fix broken Z88 part 2: fix error handling
- when the solver failed, we cannot return a non-existing res_obj
2022-03-25 18:01:12 +01:00
Uwe
e9835c0b10 [FEM] fix broken Z88 part 1: don't hardcode solver
- especially don't hardcode the choly solver that fails quickly for finer meshes
- setting sorcg as default since it shows the best performance with the cantilever tests
2022-03-25 16:49:03 +01:00
wmayer
54a5114d71 Fem: split strings with placeholders to make sure it's still created correctly if translation is broken 2022-03-25 15:48:46 +01:00
Uwe
0e98485112 [FEM] fix Gmsh deletion handling
- fixes the issue that one could accidentally delete a mesh despite it has submeshes

- also a coding style improvement
2022-03-25 05:50:31 +01:00
Uwe
58c020b47f [FEM] mechanical result: add proper deletion handling
- use a warning with possibility to cancel like for the C++ FEM objects
2022-03-25 05:38:49 +01:00
Uwe
8bd4bb9c6d [skip CI] [FEM] remove unused comment 2022-03-25 05:35:44 +01:00
Uwe
80a828af39 [FEM] handle Elmer result mesh zoom properly
- also fix an issue that after a successful simulation, no result was visible
2022-03-24 22:01:45 +01:00
wmayer
076501b73b FEM: include header with export macros 2022-03-24 20:47:56 +01:00
wmayer
ee28112968 Fem: include Python.h before any vtk headers to fix compiler warnings 2022-03-24 20:05:27 +01:00
Uwe
6abef5bee1 [FEM] re-add a header as compile fix 2022-03-24 19:10:39 +01:00
Uwe
c9ac61408c [FEM] TaskPostBoxes: remove unused headers
- also some sorting
2022-03-24 18:58:01 +01:00
Uwe
4d3a963864 [FEM] add missing functions deletion handling
as it was, one could delete the functions container breaking the simulation. Now you get a warning.

- also remove unused includes
2022-03-24 16:17:44 +01:00
Uwe
f95e76843c [FEM] add missing analysis deletion handling
as it was, one could delete the analysis container breaking everything. Now you get a warning.

- also fix typos
2022-03-24 15:56:08 +01:00
Uwe
e8d64631ad [FEM] App headers: remove unused headers 2022-03-24 15:35:32 +01:00
Uwe
59b48d4192 [FEM] handle deletion of solver objects
As it was, a deletion of non-empty solver could not be stopped, one could only decide if childs would be deleted too
Now you get a warning and can stop the deletion
2022-03-24 14:55:40 +01:00
Uwe
5212bd79fe [skip CI] [FEM] fix a comment
- remove misleading comment
- add a comment
2022-03-24 14:52:28 +01:00
Uwe
0a52649d9d [FEM] ViewProviderDocumentObject: fix compiler warning and error
- add missing include
- compare string properly
2022-03-24 06:13:45 +01:00
Uwe
a8d398e896 [FEM] fix deletion issue
- as reported here: https://forum.freecadweb.org/viewtopic.php?p=582532#p582532

Now only a warning is issued if the user tries to delete the main PostObject if it is not empty.
2022-03-24 05:44:02 +01:00
Uwe
c9f2c1d40c [FEM] fix transparency bug
- as reported here: https://forum.freecadweb.org/viewtopic.php?p=582526#p582526
After setting the transparency, the object has to be redrawn

- also remove a doubled header
2022-03-24 04:50:54 +01:00
Uwe
d62d495f2b [FEM] remove unused header introduced by previous commit 2022-03-24 03:05:48 +01:00
Uwe
89d1446a13 [FEM] scale fix for post meshes
- post result meshes must inherit the parent scaling
- also change Scale to enum as proposed by @wwmayer
2022-03-24 02:37:10 +01:00
luz paz
d021a2035a FEM: minor fix in warning text [skip ci] 2022-03-23 23:59:22 +01:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
Uwe
a3780fc127 [FEM] post object: some whitespace and style fixes
all made by MSVC
2022-03-23 21:51:25 +01:00
wmayer
bde17e1b9f Fem: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
Uwe
8a8a1f83fb [FEM] header files: remove unused includes 2022-03-23 17:36:08 +01:00
Uwe
e09383ce6f [FEM] revert incorrect header removal
- also add comment to prevent this in future
2022-03-23 16:22:57 +01:00
Uwe
fa8d89a108 [FEM] Electrostatic: read values with its unit 2022-03-23 16:03:35 +01:00
Yorik van Havre
1563822763 Translations: Merged crowdin strings 2022-03-23 10:37:50 +01:00
Uwe
a908e6fece [FEM] remove some unused includes 2022-03-23 05:43:40 +01:00
Uwe
fb3aa74a5e [skip CI] [FEM] whitespace fix 2022-03-23 05:21:48 +01:00
Uwe
80ad680dc9 [FEM] SI unit fixes for Elmer
- since we use consistently SI units (as recommended my the Elmer forum), we need to scale the input mesh (we use ElmerGrid that has an option fur this purpose)
- Since the result will be in the scaled mesh, we need to scale it back

With this PR, one gets now correct result independent of
- the used unit scheme
- the simulation type (electrical or thermo-mechanical)
2022-03-23 05:00:40 +01:00
Uwe
6252a902de [FEM] fix unit for Elmer
to assure we use SI units
2022-03-22 05:11:02 +01:00
Uwe
d3595f267b [FEM] remove Python.h and Xerces 2022-03-21 01:22:59 +01:00
Ajinkya Dahale
e0f96afb35 [FEM] Refactor TaskFemConstraintOnBoundary (#6615)
* Now the behavior is consistent with behavior of PD fillets, for example.
See https://forum.freecadweb.org/viewtopic.php?f=18&t=67135#p580192. In the
future it may be possible to reuse some code from there.

* When the last selected item is removed we need to reset the existing
highlighting separately.

* Use `Gui::ButtonGroup` in `TaskFemConstraintOnBoundary`
2022-03-21 01:02:10 +01:00
wmayer
1a62c2024d lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
wmayer
fd8ce30575 Fem: [skip ci] change include order to fix compiler warning due to a re-defition of a macro in a Python header 2022-03-20 13:44:55 +01:00
Uwe
be99144c91 [FEM] adapt a test to previous commit
(I run of course all tests using the Test Framework WB but did not get an error.)
2022-03-19 18:09:14 +01:00
Uwe
842b781a41 [FEM] proper Elmer input file write solution
- assure that independent on the used unit scheme, SI units are written to the Elmer input file
- reverts commits https://github.com/FreeCAD/FreeCAD/commit/9db165b24b and https://github.com/FreeCAD/FreeCAD/commit/c707d192e
2022-03-19 17:48:11 +01:00
wmayer
dd28df0a69 Fem: replace raw pointer with WeakPtrT to check if the object has been deleted, fix crash in destructor of TaskFemConstraintOnBoundary 2022-03-19 15:37:31 +01:00
Uwe
31645fc5bc [FEM] change example to fit with Elmer's tutorial
- this example is the Elmer tutorial number 13: https://www.nic.funet.fi/pub/sci/physics/elmer/doc/ElmerTutorials.pdf and they use a potential of 1.0, since Elmer uses SI units, it is 1.0 V
2022-03-19 15:29:55 +01:00