Commit Graph

169 Commits

Author SHA1 Message Date
marioalexis
d018b3f8fb Fem: Add method to rename mesh group 2025-10-30 10:47:10 -03:00
Markus Reitböck
c1be416c7f Fem: 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-23 00:51:00 +02:00
marioalexis
105e918594 Fem: Acquire the GIL before running Python code 2025-08-27 14:58:06 +02:00
wwmayer
8944fd7d5e Fem: Fix crash when writing mesh to z88 file
For the z88 export the FemMesh must be passed to its Python wrapper which will increase the counter upon construction and decrease it upon destruction. If the counter becomes 0 the FemMesh will be destroyed too which causes a crash.

To fix the crash the counter must be increased and safely decreased after the lifetime of the Python wrapper.

This fixes https://github.com/FreeCAD/FreeCAD/issues/23380
2025-08-27 14:57:50 +02:00
Chris Hennes
f5806841b6 Merge pull request #19907 from benj5378/getAttribute
Base: make getAttribute template
2025-05-12 10:39:55 -05:00
Benjamin Bræstrup Sayoc
492b8312b3 Base: make getAttribute template 2025-05-09 15:54:57 +02:00
Stefan Tröger
4a78446e84 FEM: Fix test if VTK or VTK python is not available (#21168)
* FEM: Fix test if VTK or VTK python is not available
* FEM: Make test work if vtk python not installed
2025-05-08 15:55:45 -05:00
bofdahof
998f4e4d45 Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Chris Hennes
fabe25bd06 FEM: myStudyId not needed when SMESH >= 9
Put guards not just around its use, but also its creation.
2025-03-23 08:56:31 +01:00
bofdahof
4dd92724b6 FEM: apply std::ranges 2025-03-16 17:16:30 -05:00
marioalexis
a58c3caac1 Fem: Fix mesh export to vtk formats 2024-12-20 11:46:46 -05:00
mosfet80
8f0e61bffd [Mod] clean FemMesh.cpp
Removed dead code
2024-11-18 18:01:59 +01:00
marioalexis
56001d3f74 Fem: Add FemMeshShapeBaseObject and fix FemMeshShapeObject meshing 2024-07-28 16:27:20 -03:00
lyphrowny
cc8a0c529c FEM: remove trailing spaces and newlines when writing input files for solvers 2024-06-23 16:27:20 +03:00
marioalexis
f8027a16d0 Fem: Force z=0 for plane stress, plane strain and axisymmetric elements in writeABAQUS - fixes #12875 2024-06-17 10:57:31 -05:00
marioalexis
087788cb36 Fem: Add element types to ABAQUS writer 2024-04-16 11:28:52 -03:00
mosfet80
ab89eb0cfd [MOD] clean SMESH (#12754)
removed old smesh CODE <7
2024-03-11 12:13:00 -05:00
Ladislav Michl
e4d304f934 Base: Implement TimeElapsed
Some instances of TimeInfo serve the sole purpose of measuring time
duration. Using system time is unfortunate as it returns wall clock,
which is not guaranteed to be monotonic. Replace such a usage with
the new TimeElapsed class based on steady clock.
2024-03-05 12:29:24 +01:00
wmayer
e57a1fe02e Fixes #12586: FEM requires OpenMP 5.0 (e.g. GCC >= 9) 2024-02-24 21:11:06 +01:00
mosfet80
eda7e134ea casts clean (#11548)
* remove unecessary casts

clean unused code

revert  example py code

* [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>
2023-12-04 10:51:36 -06:00
DeflateAwning
8de6db3e97 Find and replace http://freecad.org to https://freecad.org
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Done in all remaining files (after doing it in SVGs in the last commit)
2023-10-29 22:39:22 -06:00
wmayer
91a40b2007 Fem: Apply clang-format 2023-09-25 14:50:43 +02:00
wmayer
009f9f2222 FEM: modernize C++: use range-based for loop 2023-08-15 01:09:53 +02:00
Benjamin Bræstrup Sayoc
33384cff9c [Everywhere] FileInfo::hasExtension for multiple values (#9774)
* [Base] Add hasExtension for multiple values

* [Gui] Use hasExtension for multiple values

* [Drawing] Use hasExtension for multiple values

* [Fem] Use hasExtension for multiple values

* [Import] Use hasExtension for multiple values

* [Mesh] Use hasExtension for multiple values

* [Part] Use hasExtension for multiple values

* [TechDraw] Use hasExtension for multiple values
2023-08-07 09:55:19 -06:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
wmayer
afd59cbe82 FEM: implement interface of ComplexGeoData 2023-03-03 18:17:54 +01:00
marioalexis
976b0b8d3f Fem: Implement getNodeElements function 2023-02-21 03:13:13 +01:00
Uwe
c8630fec0a [FEM] shorten too long lines
- reformatting was done by the MSVC formatter according to our current clang file
2023-02-06 23:12:53 +01:00
Uwe
a96a3a505f use explicit prefix std:: for vectors
- also add potentially missing include
- this commit is an attempt to fix #7585
2022-10-11 01:44:24 +02:00
Uwe
3b4cbbb943 [FEM] FemMesh*: remove unused includes
- also sort includes
2022-10-03 00:47:24 +02:00
wmayer
e205daa43d Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 16:21:46 +02:00
wmayer
5014bab534 Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-08-21 12:46:53 +02:00
berniev
ddafb98813 Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
berniev
915369d8a2 Mod: Redundant_string_initialization 2022-08-08 16:52:42 +02:00
wmayer
55fa3d8a77 Mod: [skip ci] improve whitespace 2022-08-08 10:46:04 +02:00
berniev
da9ebc572f Mod: redundant void 2 2022-08-08 10:27:50 +02:00
luz paz
d02f6330fc FEM: remove trailing whitespace from various FEM files 2022-08-08 02:10:17 +02:00
berniev
b796a0d376 Mod: use empty 2022-08-06 19:30:13 +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
1aa897d450 Fem: remove some superfluous const_cast 2022-06-24 19:43:33 +02: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
d4da6b21e2 Fem: include Python.h before any vtk headers to fix compiler warnings 2022-03-24 20:05:27 +01:00
Uwe
d3bd8141f9 [FEM] App headers: remove unused headers 2022-03-24 15:35:32 +01:00
wmayer
7ae9fc0d67 Fem: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
Uwe
d5604e0e89 [FEM] remove Python.h and Xerces 2022-03-21 01:22:59 +01:00
Ajinkya Dahale
8a59607517 [FEM] Use OpenMP for FemMesh::{getNodesByEdge, getNodesByVertex} 2022-01-07 01:23:01 +01:00
Ajinkya Dahale
147f2a0b07 [FEM] Possibly fix race conditions
Race conditions introduced after using OpenMP in `FemMesh::getNodesByFace` and
`FemMesh::getNodesBySolid` because of which nodes were randomly added or removed
from sets. Solved by replacing `SMDS_MeshNode::X()` etc., which are not thread
safe, with the thread-safe `SMDS_MeshNode::GetXYZ()`.
2022-01-07 01:23:01 +01:00
Philipp Knechtges
8087b34840 [FEM] OpenMP-parallelize FemMesh::{getNodesBySolid,getNodesByFace}
Projecting nodes onto TopoDS_Shapes is a costly task, which can
potentially take a lot of time, so let's parallelize it.
2022-01-07 01:23:01 +01:00
wmayer
b6634e041b Fem: refactor FemMesh::readNastran95 2021-03-11 01:26:19 +01:00
wmayer
38b54de578 Fem: refactor FemMesh::readNastran 2021-03-10 22:56:08 +01:00