OOFem

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
Kunda1
Posts: 5799
Joined: Thu Jan 05, 2017 9:03 pm

Re: OOFem

Postby Kunda1 » Mon Oct 08, 2018 2:29 pm

HarryvL wrote:
Mon Oct 08, 2018 2:10 pm
I pulled freecad/freecad to my local system and then pushed that to my repository. Do I need fork on Github and then pull from there instead?
Checkout GitHub
It's how I set up my environment when I work with Github or Gitlab
I fork via the GUI (Pressing the 'Fork' button). Then I clone the fork to my local machine. And then I set the 'upstream' manually to point to the upstream repo.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: OOFem

Postby HarryvL » Mon Oct 08, 2018 2:36 pm

Kunda1 wrote:
Mon Oct 08, 2018 2:29 pm
HarryvL wrote:
Mon Oct 08, 2018 2:10 pm
I pulled freecad/freecad to my local system and then pushed that to my repository. Do I need fork on Github and then pull from there instead?
Checkout GitHub
It's how I set up my environment when I work with Github or Gitlab
I fork via the GUI (Pressing the 'Fork' button). Then I clone the fork to my local machine. And then I set the 'upstream' manually to point to the upstream repo.
The "upstream repo" being your Github fork ?!
User avatar
Kunda1
Posts: 5799
Joined: Thu Jan 05, 2017 9:03 pm

Re: OOFem

Postby Kunda1 » Mon Oct 08, 2018 2:47 pm

HarryvL wrote:
Mon Oct 08, 2018 2:36 pm
Kunda1 wrote:
Mon Oct 08, 2018 2:29 pm
HarryvL wrote:
Mon Oct 08, 2018 2:10 pm
I pulled freecad/freecad to my local system and then pushed that to my repository. Do I need fork on Github and then pull from there instead?
Checkout GitHub
It's how I set up my environment when I work with Github or Gitlab
I fork via the GUI (Pressing the 'Fork' button). Then I clone the fork to my local machine. And then I set the 'upstream' manually to point to the upstream repo.
The "upstream repo" being your Github fork ?!
upstream is the original repo you forked
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
PrzemoF
Posts: 2654
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: OOFem

Postby PrzemoF » Mon Oct 08, 2018 3:50 pm

(0) FreeCAD github repository.
(1) my github FreeCAD fork
(2) my local copy

My setup:
- the master branch of my github fork of FreeCAD (1) is kept in sync with the main FreeCAD repository (0)
- local copy on my linux box (2) with pull url pointing to the main FreeCAD repo on github (0), and push url pointing to my FreeCAD fork (1):

Code: Select all

$ git config --local --list | grep origin | grep github
remote.origin.url=https://github.com/FreeCAD/FreeCAD.git
remote.origin.pushurl=git@github.com:PrzemoF/FreeCAD.git
So I can pull latest changes from the FreeCAD repositoty to my local master branch, do development on some other branch (i.e. devel) and then push it all to my github FreeCAD repository. then when something is worth including in the main repo (0) I do a Pull Request using github GUI. It also triggers some testing and gives information if the Pull Request can be easily included. If I keep working on something for longer period of time I need to:
1. pull changes from the main FreeCAD repo (0) to my local copy (2)
2. rebase my devel branch to top of the laster changes in the master branch
3. Force push to my github repo (1)

My advice: do not do any development in the master branch. The branch should be kept in sync with the master FreeCAD repo used for testing if your changes can be easily merged. Nothing more.
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: OOFem

Postby HarryvL » Mon Oct 08, 2018 6:48 pm

Thanks, that's really clear. I tried to set it up like that and you should be able to see a forked repository HarryvL/FreeCAD with branch "assess" that has some embryonic changes in ../Mode/Fem/femsolver/oofem
User avatar
bernd
Posts: 8441
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: OOFem

Postby bernd » Mon Oct 08, 2018 8:19 pm

branch assess looks good to me. To get it first started I would go for the following.

- in module src/Mod/Fem/femsolver/oofem/writer.py define a string testinputfile = ''' an simple complete oofem input file '''
- in method def write_OOFEM_input(self): ( https://github.com/HarryvL/FreeCAD/blob ... py#L64-L81 ) you gone write the string testinputfile
- means no matter what FreeCAD analysis for objects has, if it has an oofem solver object in any case your testinputfile will be written.
- With this you can test if the new solver object works at all.
- if it works you can start to step by step implement the writer for oofem which does write the real FreeCAD object data to the oofem input file.

Hope you got my point. It is just an idea, how I did it when I mplemented the Z88.
User avatar
bernd
Posts: 8441
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: OOFem

Postby bernd » Mon Oct 08, 2018 8:20 pm

Ahh but your master branch is wrong. Your master branch should have exact the same commit id than FreeCAD master
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: OOFem

Postby HarryvL » Mon Oct 08, 2018 8:27 pm

Bernd, I am ploughing through the solver framework. In writer.py class FemInputWriterZ88 refers to self.femmesh.Nodes. Can you give me a hint where this attribute gets defined / initiated. Thanks. Harry
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: OOFem

Postby HarryvL » Mon Oct 08, 2018 8:33 pm

bernd wrote:
Mon Oct 08, 2018 8:20 pm
Ahh but your master branch is wrong. Your master branch should have exact the same commit id than FreeCAD master
I updated my fork today as per the following advice: https://github.com/KirstieJane/STEMMRol ... he-browser
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: OOFem

Postby HarryvL » Mon Oct 08, 2018 8:36 pm

bernd wrote:
Mon Oct 08, 2018 8:19 pm
branch assess looks good to me. To get it first started I would go for the following.

- in module src/Mod/Fem/femsolver/oofem/writer.py define a string testinputfile = ''' an simple complete oofem input file '''
- in method def write_OOFEM_input(self): ( https://github.com/HarryvL/FreeCAD/blob ... py#L64-L81 ) you gone write the string testinputfile
- means no matter what FreeCAD analysis for objects has, if it has an oofem solver object in any case your testinputfile will be written.
- With this you can test if the new solver object works at all.
- if it works you can start to step by step implement the writer for oofem which does write the real FreeCAD object data to the oofem input file.

Hope you got my point. It is just an idea, how I did it when I mplemented the Z88.
I get the point :D. Thanks for the tip. It's going to be one heck of a dive at the deep end for me.