Commit Graph

891 Commits

Author SHA1 Message Date
marioalexis
d018b3f8fb Fem: Add method to rename mesh group 2025-10-30 10:47:10 -03:00
marioalexis
5e42f6a48d Fem: Add ParaView .pvd file importer 2025-10-30 10:47:09 -03:00
luzpaz
42cf50cc57 FEM: fix source comment typos
Fix various source comment typos introduced recently.
2025-09-29 08:47:20 -05:00
marioalexis
633817ceac Fem: Add tensor components to calculator variables 2025-09-28 18:55:48 -05:00
marioalexis
b9ab71e606 Fem: Fix memory leaks and error handling 2025-09-26 14:41:43 -05:00
Chris Hennes
02bbc77f3c Merge pull request #23823 from marioalexis84/fem-remove_elmer_filter_parameter
Fem: Remove dependency of the ViewProviderFemPostObject class on user parameters
2025-09-24 22:18:19 -05:00
Chris Hennes
d1ca523ca7 Merge pull request #24107 from mrpilot2/cmake_pch_mods
Mods (Part 1): use CMake to generate precompiled headers on all platforms
2025-09-23 08:35:43 -05:00
marioalexis
def22ad234 Fem: Better VTK version check 2025-09-22 22:46:20 -05: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
0c5746fe7a Fem: Remove dependency of the ViewProviderFemPostObject class on user parameters 2025-09-22 18:27:18 -03:00
marioalexis
b9129f4453 Fem: Add upstream vtkCleanUnstructuredGrid class source files 2025-09-22 18:27:18 -03:00
marioalexis
3e1741dfea Fem: Move FemFrameSourceAlgorithm class to its own source files 2025-09-22 18:27:18 -03:00
Markus Reitböck
749ac36615 do not use precompiled header for setting global compiler definitions and to disable compiler warnings
only 4 of these warnings are still relevant, CMake shall be used to disable them

Compiler definitions:

  NOMINMAX:
    * is already globally defined in SetGlobalCompilerAndLinkerSettings.cmake

  WIN32_LEAN_AND_MEAN:
    * use CMake target_compile_options on relevant targets

Warnings that still occur:

  C4251, C4273, C4275: all related to dllimport / export
    * use CMake target_compile_options on relevant targets

  C4661: no suitable definition provied for explicit template instantiation request
    * triggered in Mesh because of Vector3D in Base - not all functions are defined in header
    * use CMake target_compile_options on relevant targets

Warnings that are Currently not triggered (fix code if they appear again):

  C4005: macro redefinition

  C4244: argument conversion, possible loss of data

  C4267: conversion from size_t to type, possible loss of data

  C4305: truncation from type1 to type2
    * only occurrence disabled in Reader.cpp

  C4522: multiple assignment operator specified

  C5208: unnamed class in typedef name

Obsolete Compiler warnings:

  C4181: not mentioned in Microsoft docs anymore

  C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    * throw(optional_type_list)  deprecated in C++17

  C4482: nonstandard extension used: enum 'enumeration' used in qualified name
    * not generated for compilers that support C++11

  C4503: 'identifier': decorated name length exceeded, name was truncated
    * obsolete since Visual Studio 2017

  C4786: not mentioned in Microsoft docs anymore
2025-09-11 20:21:04 -05:00
wmayer
b1a37aebbb CMake: Replace link_directories with target_link_directories 2025-09-08 19:04:38 +02:00
wmayer
93db4c7d8a CMake: Replace include_directories with target_include_directories 2025-09-08 19:04:34 +02:00
Chris Hennes
84c810dc4a Merge pull request #23521 from z0r0/python-interface-bindings-final
Core: Python interface bindings cleanup
2025-09-08 10:58:15 -05:00
FEA-eng
40011e8f7e FEM: Better defaults for mesh export (#23553)
* FEM: Update mesh_gmsh.py

* FEM: Update DlgSettingsFemExportAbaqus.ui

* FEM: Update DlgSettingsFemExportAbaqus.ui

* FEM: Update DlgSettingsFemExportAbaqusImp.cpp

* FEM: Update AppFemPy.cpp
2025-09-07 20:31:20 -05:00
FEA-eng
f00aa86afc FEM: Amplitude support for final temperature field (#23530)
* FEM: Update FemConstraintInitialTemperature.cpp

* FEM: Update FemConstraintInitialTemperature.h

* FEM: Update write_amplitude.py

* FEM: Update write_constraint_finaltemperature.py
2025-09-03 22:15:25 -05:00
Ian 'z0r0' Abreu
0217c1ef97 updating docblock locations. 2025-09-02 08:28:47 -04:00
Ian 'z0r0' Abreu
8d56e3e529 reverting author metadata 2025-09-02 08:25:37 -04:00
Ian 'z0r0' Abreu
b24040ee52 Adding license documentation to interface class docblocks. 2025-09-01 21:50:59 -04:00
FEA-eng
2244a16790 FEM: Add defined temperature field with CalculiX (*TEMPERATURE) (#23277)
* FEM: add write_constraint_finaltemperature.py

* FEM: Update CMakeLists.txt

* FEM: Update membertools.py

* FEM: Update FemConstraintInitialTemperature.cpp

* FEM: Update FemConstraintInitialTemperature.h

* FEM: Update write_constraint_initialtemperature.py

* FEM: Update write_femelement_material.py

* FEM: Update writer.py

* FEM: Update write_constraint_finaltemperature.py

* FEM: Update write_femelement_material.py

* FEM: Update write_femelement_material.py

* FEM: Update box_static.inp

* FEM: Update ccx_cantilever_beam_circle.inp

* FEM: Update ccx_cantilever_beam_pipe.inp

* FEM: Update ccx_cantilever_beam_rect.inp

* FEM: Update ccx_cantilever_ele_hexa20.inp

* FEM: Update ccx_cantilever_ele_quad4.inp

* FEM: Update ccx_cantilever_ele_quad8.inp

* FEM: Update ccx_cantilever_ele_seg2.inp

* FEM: Update ccx_cantilever_ele_seg3.inp

* FEM: Update ccx_cantilever_ele_tria3.inp

* FEM: Update ccx_cantilever_ele_tria6.inp

* FEM: Update ccx_cantilever_faceload.inp

* FEM: Update ccx_cantilever_nodeload.inp

* FEM: Update ccx_cantilever_prescribeddisplacement.inp

* FEM: Update constraint_contact_shell_shell.inp

* FEM: Update constraint_sectionprint.inp

* FEM: Update constraint_selfweight_cantilever.inp

* FEM: Update constraint_tie.inp

* FEM: Update constraint_transform_beam_hinged.inp

* FEM: Update constraint_transform_torque.inp

* FEM: Update material_multiple_bendingbeam_fiveboxes.inp

* FEM: Update material_multiple_bendingbeam_fivefaces.inp

* FEM: Update material_multiple_tensionrod_twoboxes.inp

* FEM: Update material_nonlinear.inp

* FEM: Update square_pipe_end_twisted_edgeforces.inp

* FEM: Update square_pipe_end_twisted_nodeforces.inp

* FEM: Update write_constraint_finaltemperature.py

* FEM: Update write_femelement_material.py

* FEM: Update write_constraint_finaltemperature.py

* FEM: Update FemConstraintInitialTemperature.cpp

* FEM: Update FemConstraintInitialTemperature.h
2025-08-31 23:28:56 -05:00
Ian 'z0r0' Abreu
2b889560d1 Finalizing Python interface bindings for Fem. 2025-08-31 15:27:21 -04:00
FEA-eng
076b0bb98f FEM: Add tied contact with CalculiX (#23327)
* FEM: Update FemConstraintContact.cpp

* FEM: Update FemConstraintContact.h

* FEM: Update write_constraint_contact.py

* [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>
2025-08-30 14:24:22 -05:00
Max Wilfinger
9cae60a70f Update UI strings from Crowdin reports for consistency 2025-08-28 11:45:38 -05: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
Ian Abreu
8533b4fbb8 Core: Fixing missing python bindings. (#23054)
* Adding missing python interfaces.

* fixing interface includes.

* attempting fix for CI build error related to path resolution.

* testing build

* More testing via Github Actions...

* renaming files

* fixing comparison operator.

* reverting...

* fixing CMakeLists

* fixing binding generation issue
2025-08-24 22:43:39 -05:00
Stefan Tröger
80f3b21184 FEM: Extract postprocessing data only if available. Fixes #22193 (#23127)
* FEM: Extract postprocessing data only if available. Fixes #22193

* [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>
2025-08-24 22:16:29 -05:00
Chris Hennes
5e4fe3a3c3 Merge pull request #23164 from ickby/FEM_post_fixes_4
Fem: Fix for 3 issues
2025-08-19 19:00:55 -05:00
Stefan Tröger
27c7eca010 FEM: Fix post processing branch working with data extraction. Fixes #23030 2025-08-18 10:35:42 -05:00
FEA-eng
b110102ca5 FEM: Amplitude support for rigid body constraint (#22898)
* FEM: Update FemConstraintRigidBody.cpp

* FEM: Update FemConstraintRigidBody.h

* FEM: Update write_constraint_rigidbody_step.py

* FEM: Update write_amplitude.py
2025-08-18 10:35:23 -05:00
Stefan Tröger
70685aaa5d FEM: Purge tool deletes all result objects. Fixes #23028
- Correctly deletes children of pipeline without error on delete
- Ensures visualizations are also deleted as they are result objects too
- Ensures purge tool uses a transaction, like all tools should
2025-08-17 18:29:31 +02:00
FEA-eng
f371622d6f FEM: Update FemConstraintDisplacement.cpp 2025-08-07 18:36:53 -05:00
Ian Abreu
4aa0aff389 Core: Generation of FEM interface bindings (#22581)
* Initial commit of FEM bindings.

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

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

* running black.

* Fixing imports.

* Update src/Mod/Fem/Gui/ViewProviderFemMeshPy.pyi

Co-authored-by: João Matos <joao@tritao.eu>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: João Matos <joao@tritao.eu>
2025-08-04 10:48:00 -05:00
FEA-eng
a83f34e31c FEM: Add support for amplitudes with CalculiX (#22851) 2025-08-01 15:22:01 -05:00
FEA-eng
fb4c739619 FEM: Add support for references for CalculiX's initial temperature (#22864)
* FEM: Update checksanalysis.py

* FEM: Update FemConstraintInitialTemperature.cpp

* FEM: Update meshsetsgetter.py

* FEM: Update writer.py

* FEM: Update write_constraint_initialtemperature.py

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

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

* FEM: Update thermomech_bimetal.inp

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-01 14:03:37 -05:00
FEA-eng
949767ea69 FEM: Add cavity radiation with CalculiX (#22593) 2025-07-20 21:26:03 -05:00
FEA-eng
fa694ff4c5 FEM: Add hard contact with CalculiX (#22513) 2025-07-18 09:56:39 -05:00
FEA-eng
18acfabea6 FEM: Add thermal contact with CalculiX (#22121) 2025-07-14 11:03:43 -05:00
Max Wilfinger
a0fe944393 Update src/Mod/Fem/App/AppFem.cpp
Co-authored-by: Ryan K <114723629+ryankembrey@users.noreply.github.com>
2025-06-30 10:35:42 -05:00
Max Wilfinger
dd702da1bc FEM: Update UI strings for consistency 2025-06-30 10:35:42 -05:00
Chris Hennes
a833ed0785 FEM: Fix missing VTK headers in PreCompiled.h 2025-06-28 16:21:25 +02:00
pre-commit-ci[bot]
da4d5c919f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-06-16 18:27:13 +00:00
Stefan Tröger
6ba5c0d0a5 FEM: port DataAlongLine filter to use arc length.
This makes it easier for the new data extraction to also plot data over line length.
2025-06-15 10:57:47 +02:00
Stefan Tröger
974f41fc96 FEM: Adopt post extraction code to updated main 2025-06-15 10:57:47 +02:00
Stefan Tröger
6e4fab1f50 FEM: Draft architecture of post data extraction with histogram example 2025-06-15 10:57:46 +02:00
Ladislav Michl
1c955c9347 Fem: get unit via quantity
Unit is interally using Quantity to parse string input, so use it
explicitely as string constructor for Unit is going to be dropped.
2025-06-03 09:31:38 +02:00
mosfet80
96c0acb825 FEM: clean code (#21526)
* FEM: clean code

clean 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>
2025-06-02 12:13:35 +02:00
marioalexis
b6da328bb7 Fem: Add support for VTK < 9.1 in calculator filter - fixes #21346 2025-05-19 17:50:17 +02:00