FEM Unit tests

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

FEM Unit tests

Post by ulrich1a »

When trying to write a ccx-input-file from the test cases for the unit test, I do get:

Code: Select all

Traceback (most recent call last):
  File "/home/ulrich/Sourcen/FreeCAD/Build_0.17/Mod/Fem/_TaskPanelFemSolverCalculix.py", line 186, in write_input_file_handler
    if self.check_prerequisites_helper():
  File "/home/ulrich/Sourcen/FreeCAD/Build_0.17/Mod/Fem/_TaskPanelFemSolverCalculix.py", line 210, in check_prerequisites_helper
    message = fea.check_prerequisites()
  File "/home/ulrich/Sourcen/FreeCAD/Build_0.17/Mod/Fem/FemTools.py", line 366, in check_prerequisites
    if mat_obj.Category == 'Solid':
AttributeError: 'FeaturePython' object has no attribute 'Category'
Activate the analysis this solver belongs to!
This test cases needs to be updated. Would it not be better, to generate every time fresh test cases via a python-script? The python-code of the FEM-workbench got so many updates, that it takes extra effort, to check if the test cases are still valid.

Ulrich
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Unit tests

Post by bernd »

I do not really understand your problem? Could you post step by step what you did to break the unit test?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM Unit tests

Post by bernd »

ahh I may know what you tried! Did you use the fcstd files from https://github.com/FreeCAD/FreeCAD/tree ... _files/ccx ? They are outdated. I'm gone update them.

You should:
- start FC
- chang to test frame work
- click on self test
- change to TestFem
- start tests
- if they run without error
- go to your tmp, there is a folder Fem unit test
- you will find python generated inp and fcstd files :D

bernd
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: FEM Unit tests

Post by ulrich1a »

bernd wrote:Did you use the fcstd files from https://github.com/FreeCAD/FreeCAD/tree ... _files/ccx ?
Yes, this is what I tried.

Thanks for the info.

Ulrich
Post Reply