GSoC2020, FEM: extend examples

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: GSoC2020, FEM: extend examples

Post by bernd »

Ahh, yes will go for it tomorrow morning (Zürich Time)
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

bernd wrote: Fri Jun 26, 2020 9:00 am
Sudhanshu wrote: Thu Jun 25, 2020 12:24 am By the way, I find it an unnecessary and monotonous work to add each new example to the manager module

This is working nicely on my system and can be very easily integrated with the examplegui too:

....
+1 ... git commit c57c3cbcf63a
@bernd, do you think we can have a general method for testing examples, in test_ccxtools.py? Something similar to the general method in manager.py?

bernd wrote: Wed Jul 01, 2020 8:43 pm Ahh, yes will go for it tomorrow morning (Zürich Time)
Hmm, done?
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

Sudhanshu wrote: Thu Jul 02, 2020 7:44 pm Hmm, done?
Yes, done :!:
Next stop 3rd of July for the second evaluation.
BTW: Very good work so far, thanks :!:
Attachments
You means nothing here, Bernd did the evaluation.
You means nothing here, Bernd did the evaluation.
Screenshot_20200703-063856.png (107.16 KiB) Viewed 955 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GSoC2020, FEM: extend examples

Post by bernd »

unit tests should be explizit triggered. A method which simplifys the process exists already.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GSoC2020, FEM: extend examples

Post by bernd »

bernd wrote: Fri Jul 03, 2020 5:31 am unit tests should be explizit triggered. A method which simplifys the process exists already.
but with the latest changes it is very simple to trigger the unit test. Just a few lines of code are needed. https://github.com/FreeCAD/FreeCAD/blob ... #L176-L183

Would you rebase your branch on latest master and add a ccxtools unit test for every example? Furthermore some history rewriting would be needed too.

I would suggest two commits for each example, one commit which add the example, and one commit just behind the first, which adds the unit test for this example. Drop a note if you have problems with the history rewriting.

We could start to merge some of the examples into master than.

I'm still changing code in elmer unit tests. I will post a note if this is finished.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GSoC2020, FEM: extend examples

Post by bernd »

Furthermore a Z88 writing test. We should start with the static box example. A very good start to implement is the solver calcuix framework unit test module. See https://github.com/FreeCAD/FreeCAD/blob ... alculix.py Do not forget to register the new module here: https://github.com/FreeCAD/FreeCAD/blob ... App.py#L38

Lot's of stuff for the days to come ... :)
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GSoC2020, FEM: extend examples

Post by bernd »

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

Re: GSoC2020, FEM: extend examples

Post by bernd »

would it be possible to write setup instead of OK on the ok-button? Would look better beside the run on the button.
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

bernd wrote: Fri Jul 03, 2020 8:08 am
bernd wrote: Fri Jul 03, 2020 5:31 am unit tests should be explizit triggered. A method which simplifys the process exists already.
but with the latest changes it is very simple to trigger the unit test. Just a few lines of code are needed. https://github.com/FreeCAD/FreeCAD/blob ... #L176-L183

Would you rebase your branch on latest master and add a ccxtools unit test for every example? Furthermore some history rewriting would be needed too.

I would suggest two commits for each example, one commit which add the example, and one commit just behind the first, which adds the unit test for this example. Drop a note if you have problems with the history rewriting.

We could start to merge some of the examples into master than.
This should do, there are unit test for all ccx examples: https://github.com/Sudhanshu-Dubey14/Fr ... emexamples
There are some improvements in multibody face analysis and multibody analysis examples to pass the tests.
Also, I have changed this commit: https://github.com/Sudhanshu-Dubey14/Fr ... e11e54882c to be according to the new test methods.

When I run tests for all of FEM, I get:

Code: Select all

======================================================================
ERROR: test_pyimport_all_FEM_modules (femtest.app.test_common.TestFemCommon)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/build_nonetgen/Mod/Fem/femtest/app/test_common.py", line 142, in test_pyimport_all_FEM_modules
    im = __import__("{0}".format(mod))
  File "/run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/build_nonetgen/Mod/Fem/femsolver/elmer/equations/fluxsolver.py", line 41, in <module>
    class Proxy(linear.Proxy, equationbase.FluxsolverProxy):
AttributeError: module 'femsolver.equationbase' has no attribute 'FluxsolverProxy'

======================================================================
FAIL: test_femobjects_open_de9b3fb438 (femtest.app.test_open.TestObjectOpen)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/run/media/sudhanshu/Thunder/Repos/FreeCAD_sd/build_nonetgen/Mod/Fem/femtest/app/test_open.py", line 151, in test_femobjects_open_de9b3fb438
    self.assertEqual(
AssertionError: <class 'femsolver.elmer.equations.flux.Proxy'> != <class 'NoneType'>

----------------------------------------------------------------------
Ran 65 tests in 23.321s

FAILED (failures=1, errors=1)
But I think you will resolve them with your current work on elmer tests.
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

bernd wrote: Fri Jul 03, 2020 1:35 pm Furthermore a Z88 writing test. We should start with the static box example. A very good start to implement is the solver calcuix framework unit test module. See https://github.com/FreeCAD/FreeCAD/blob ... alculix.py Do not forget to register the new module here: https://github.com/FreeCAD/FreeCAD/blob ... App.py#L38

Lot's of stuff for the days to come ... :)
So if I am able to get you right, I need to:

1. Make a static box example for z88 or adopt the boxanalysis_static example for z88.
2. Take inspiration from calculix solver framework unit test module and make one for z88 too.

Right?
Which means I first need to install Z88 on my system.
Post Reply