feature: general initial value and body source, to be tested

About the development of the FEM module/workbench.

Moderator: bernd

qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: feature: general initial value and body source, to be tested

Post by qingfeng.xia »

I will give it a try this weekend, we got bank holiday, will let you know the result.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: feature: general initial value and body source, to be tested

Post by bernd »

Would be great.

BTW: I have renamed all PythonFeatures in FEM, but did not renamed the dev branches. It will still work, but before merge we should rename them too. check femobjects and femguiobjects and femviewproviders directory.

I can do the renaming if everything else works fine.
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: feature: general initial value and body source, to be tested

Post by qingfeng.xia »

Thank you, I pull upstream master, the checkout my fembodyconstraint branch (left over in Feb, have not rebased to upstream master yet) then I pull your fembodyconstraint. I would expect no conflict, but I found still some conflict.

I also have feeling, my git status, show lot of added files, (should be I just pull upstream master), I have not rebased yet, how can them all appear in my trial to pull your branch (may be the change is from feb to March10, your last commit in that branch). Sorry for my poor git skills, that is why I am reluctant to do some fix :lol:

Unmerged paths:
(use "git add <file>..." to mark resolution)

both modified: src/Mod/Fem/CMakeLists.txt
both modified: src/Mod/Fem/Gui/Resources/Fem.qrc
both modified: src/Mod/Fem/Gui/Workbench.cpp
both modified: src/Mod/Fem/ObjectsFem.py
both modified: src/Mod/Fem/femcommands/commands.py
both added: src/Mod/Fem/femguiobjects/_ViewProviderFemConstraintGeneric.py
both added: src/Mod/Fem/femobjects/_FemConstraintGeneric.py
both modified: src/Mod/Fem/femtest/app/test_object.py


Shall I just merge those conflicts, them and later push to your " fembodyconstraint branch"

==update===

I pull your fembodycontraint, merge conflicts in the files above, I found 2 failure in unit test
I will try to rebase to upstream master, if too complicate, I will leave it to you.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: feature: general initial value and body source, to be tested

Post by qingfeng.xia »

bernd wrote: Sat May 23, 2020 7:52 am Would be great.

BTW: I have renamed all PythonFeatures in FEM, but did not renamed the dev branches. It will still work, but before merge we should rename them too. check femobjects and femguiobjects and femviewproviders directory.

I can do the renaming if everything else works fine.
I have renamed FemConstraintGeneric files to match the latest naming. json bugs gone, if I add back 2 set_state functions. I do not know why, but it works.

When you test, better to remove the Fem folder in build folder, it caused some hard to explain error, but gone if I rm -rf .../Fem

https://github.com/berndhahnebach/FreeCAD_bhb/pull/76

Thank you, hope to see it merge soon, so I will start to use it my Cfd.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: feature: general initial value and body source, to be tested

Post by bernd »

qingfeng.xia wrote: Sat May 23, 2020 2:25 pm
When you test, better to remove the Fem folder in build folder, it caused some hard to explain error, but gone if I rm -rf .../Fem
has to do with a migration class added lately. You should not have old modules in your build.

I will have a look at your PR.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: feature: general initial value and body source, to be tested

Post by bernd »

two branches:

https://github.com/berndhahnebach/FreeC ... traintqing your branch with some rebase errors reverted.

https://github.com/berndhahnebach/FreeC ... constraint completly rebased and all commits squashed, only bodyconstraint changes.

Would you give it a try?
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: feature: general initial value and body source, to be tested

Post by bernd »

qingfeng.xia
Posts: 227
Joined: Tue Sep 22, 2015 1:47 pm
Location: Oxford UK/Shenzhen China
Contact:

Re: feature: general initial value and body source, to be tested

Post by qingfeng.xia »

bernd wrote: Sat May 23, 2020 7:31 pm two branches:

https://github.com/berndhahnebach/FreeC ... traintqing your branch with some rebase errors reverted.

https://github.com/berndhahnebach/FreeC ... constraint completly rebased and all commits squashed, only bodyconstraint changes.

Would you give it a try?
I think the first is identical as the one shown me yesterday night, I tested by unit test and manually it works .
I am going to test the second one, I guess it has been rebased to upstream master?

If you think necessary, A in-source documentation should be added to the class ConstraintGeneric to outline how to use this class, or add those doc into freecad wiki directly?

Tested by unit test and manually on json saving and reload. I pull your branch into my new local branch (from my latest upstream master), it is working, no confliction to pull yours.

Thank you
Last edited by qingfeng.xia on Sun May 24, 2020 12:25 pm, edited 1 time in total.
Ubuntu 18.04 LTS 64bit, python3, always work with latest FreeCAD daily build
Working on Cfd module for FreeCAD, FreeCAD_Module_Develop_Guide
https://github.com/ukaea/parallel-preprocessor/
https://github.com/qingfengxia/Cfd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: feature: general initial value and body source, to be tested

Post by bernd »

qingfeng.xia wrote: Sun May 24, 2020 11:54 am I think the first is identical as the one shown me yesterday night, I tested by unit test and manually it works .
yes, if you have further changes make a PR to this branch


qingfeng.xia wrote: Sun May 24, 2020 11:54 am I am going to test the second one, I guess it has been rebased to upstream master?
yes, and it rebases on master like a charm ATM and it will be rebased all the time thus make a PR to the other if you have changes.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: feature: general initial value and body source, to be tested

Post by bernd »

qingfeng.xia wrote: Sun May 24, 2020 11:54 am If you think necessary, A in-source documentation should be added to the class ConstraintGeneric to outline how to use this class, or add those doc into freecad wiki directly?
I prefere in source.

But more important would be a real use of one of the constraints. ATM there are two new constraints which are new but not used. My be someone does implement them as real constraints. These ones which are based on the generic constraint would than not needed anymore.

Or do you use them in any solver not included in FEM already?
Post Reply