Prescribed Displacement Testing and Advice

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Postby makkemal » Thu Oct 29, 2015 5:24 am

Ok seems I did something wrong and committed it to the wrong branch

https://github.com/makkemal/FreeCAD/com ... adc8960f2a

hmm
please help
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Prescribed Displacement Testing and Advice

Postby bernd » Thu Oct 29, 2015 6:06 am

makkemal wrote:Ok seems I did something wrong and committed it to the wrong branch ... please help

Code: Select all

# make a new branch from the master branch and push it to github
git checkout master
git checkout -b predeformation3
git log -1 predeformation3  # should show your commit
git push https://github.com/makkemal/FreeCAD.git   predeformation3
# check with the webbrowser if the new branch and the commit is on github
fix master branch lokal (use a temporary branch for this, save method)

Code: Select all

# fetch up to date FreeCAD   (fcmaster if you copied it from my former posts)
git fetch fcmaster

git checkout -b tmp remotes/fcmaster/master
git status          # you should be on branch tmp
git log -5 --oneline
# should show you the same commits on the web as https://github.com/FreeCAD/FreeCAD/commits/master

# delete lokal master
git branch -D master

# checkout new master
git status    # still on branch tmp
git log -5 --oneline    # still shows the latest 5 commit from FreeCAD github master
git checkout -b master  # new lokal master branch from tmp
git status              # yor are on your new master
git log -5 --oneline    # shows the latest 5 commits from FCmaster --> lokal master should be fixed

# delete your wrong master branch on github
# in your webbrowser
# log in to github --> browse to YOUR repo --> click on branches  --> delete master branch (ONLY this one)

# push the fixed local master to github
git push https://github.com/makkemal/FreeCAD.git   master
git status  # still on your new master
git branch -D tmp   # delete your temporary branch
you should be fine :-)
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Postby makkemal » Thu Oct 29, 2015 7:09 am

On checkout master I get following problem
Already on 'master'
Your branch and 'fcmaster/master' have diverged,
and have 1 and 47 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
makke@makke-17-ubuntu:~/Freecad/fc_source$ git pull
error: Your local changes to the following files would be overwritten by merge:
src/Mod/Fem/FemTools.py
src/Mod/Fem/InitGui.py
src/Mod/Fem/ccxInpWriter.py
Please, commit your changes or stash them before you can merge.
Aborting
??
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Prescribed Displacement Testing and Advice

Postby bernd » Thu Oct 29, 2015 7:36 am

post the following output:

Code: Select all

git status
git branch
git branch -a
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Postby makkemal » Thu Oct 29, 2015 8:09 am

makke@makke-17-ubuntu:~/Freecad/fc_source$ git status
On branch master
Your branch and 'fcmaster/master' have diverged,
and have 1 and 47 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)

Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

modified: src/App/PropertyStandard.h
modified: src/Gui/DlgActionsImp.cpp
modified: src/Gui/FileDialog.cpp
modified: src/Gui/FileDialog.h
modified: src/Mod/Arch/Resources/ui/preferences-ifc.ui
modified: src/Mod/Arch/importIFC.py
modified: src/Mod/Fem/App/AppFem.cpp
modified: src/Mod/Fem/App/FemAnalysis.cpp
modified: src/Mod/Fem/App/FemAnalysis.h
modified: src/Mod/Fem/FemBeamSection.py
modified: src/Mod/Fem/FemShellThickness.py
modified: src/Mod/Fem/FemTools.py
modified: src/Mod/Fem/Gui/AppFemGui.cpp
modified: src/Mod/Fem/Gui/DlgSettingsFem.ui
modified: src/Mod/Fem/Gui/DlgSettingsFemImp.cpp
modified: src/Mod/Fem/InitGui.py
modified: src/Mod/Fem/MechanicalMaterial.py
modified: src/Mod/Fem/TestFem.py
modified: src/Mod/Fem/_FemAnalysis.py
modified: src/Mod/Fem/_JobControlTaskPanel.py
modified: src/Mod/Fem/_ResultControlTaskPanel.py
modified: src/Mod/Fem/ccxFrdReader.py
modified: src/Mod/Fem/ccxInpWriter.py
modified: src/Mod/Fem/test_files/cube_frequency.inp
modified: src/Mod/Fem/test_files/cube_static.inp
modified: src/Mod/Fem/test_files/static_analysis.inp
modified: src/Mod/OpenSCAD/OpenSCADFeatures.py
modified: src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp
deleted: src/Mod/ReverseEngineering/App/AppReverseEngineeringPy.cpp
modified: src/Mod/ReverseEngineering/App/ApproxSurface.cpp
modified: src/Mod/ReverseEngineering/App/ApproxSurface.h
modified: src/Mod/ReverseEngineering/App/CMakeLists.txt
modified: src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp
modified: src/Mod/ReverseEngineering/App/SurfaceTriangulation.h
modified: src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp
deleted: src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGuiPy.cpp
modified: src/Mod/ReverseEngineering/Gui/CMakeLists.txt
modified: src/Mod/Sketcher/App/Sketch.cpp
modified: src/Mod/Sketcher/App/SketchObject.cpp
modified: src/Mod/Sketcher/App/SketchObject.h
modified: src/Mod/Sketcher/App/SketchObjectPyImp.cpp
modified: src/Mod/Sketcher/App/planegcs/GCS.h
modified: src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
modified: src/Mod/Spreadsheet/CMakeLists.txt
modified: src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp
deleted: src/Tools/_TEMPLATE_/App/App_TEMPLATE_Py.cpp
modified: src/Tools/_TEMPLATE_/App/CMakeLists.txt
modified: src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp
deleted: src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_GuiPy.cpp
modified: src/Tools/_TEMPLATE_/Gui/CMakeLists.txt

Untracked files:
(use "git add <file>..." to include in what will be committed)

src/Mod/Fem/FemTools.py.orig
src/Mod/Fem/InitGui.py.orig
src/Mod/Fem/ccxInpWriter.py.orig

makke@makke-17-ubuntu:~/Freecad/fc_source$ git branch
* master
predeformation
predeformation2
makke@makke-17-ubuntu:~/Freecad/fc_source$ git branch -a
* master
predeformation
predeformation2
remotes/fcmaster/master
remotes/fcmaster/releases/FreeCAD-0-13
remotes/fcmaster/releases/FreeCAD-0-14
remotes/fcmaster/releases/FreeCAD-0-15
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/predeformation
remotes/origin/predeformation2
remotes/origin/releases/FreeCAD-0-13
remotes/origin/releases/FreeCAD-0-14
remotes/origin/releases/FreeCAD-0-15
makke@makke-17-ubuntu:~/Freecad/fc_source$
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Prescribed Displacement Testing and Advice

Postby bernd » Thu Oct 29, 2015 10:05 am

Code: Select all

cd ~/Freecad/fc_source
git checkout -b origpyfiles
git add .    # do not forget the little dot :-)
git commit -m "original python files"
git status  # you should be on branch origfiles and nothing is to commit
post the following:

Code: Select all

git checkout master
git log -5 --oneline
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Postby makkemal » Thu Oct 29, 2015 10:37 am

makke@makke-17-ubuntu:~/Freecad/fc_source$ git checkout master
Switched to branch 'master'
Your branch and 'fcmaster/master' have diverged,
and have 1 and 47 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
makke@makke-17-ubuntu:~/Freecad/fc_source$ git log -5 --oneline
c8a599c Precribed displacement constraint
e7a3dc4 + support of Python feature classes without an execute() method + if execute() method of Python featur
169b2e3 + clean-up, fix and new methods added in unit test module
28abf35 FEM: remove comment lines for _CommandNewMechanicalAnalysis.py
ffdc7a4 FEM: change purge_results to operate on analysis document
The version I am trying to commit too is e7a3dc4
Version: 0.16.5794 (Git)
Build type: Release
Branch: master

Code: Select all

Hash: e7a3dc48e834591e5553d5c37ef997e70d177a94
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Prescribed Displacement Testing and Advice

Postby bernd » Thu Oct 29, 2015 12:43 pm

looks good, you should do the steps of post viewtopic.php?f=18&t=12883&start=20#p104348 now
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Prescribed Displacement Testing and Advice

Postby makkemal » Sat Oct 31, 2015 6:33 am

Holding thumbs I got it right now, I redid everything about 10 times

https://github.com/makkemal/FreeCAD/tree/predeformation
User avatar
bernd
Posts: 11096
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Prescribed Displacement Testing and Advice

Postby bernd » Sat Oct 31, 2015 8:28 am

makkemal wrote:Holding thumbs I got it right now, I redid everything about 10 times

https://github.com/makkemal/FreeCAD/tree/predeformation
Hopefully doing all the stuff 10 times helped yourself to get into git and at the end you understood what you did. :) I'll have a look at the code and will test it.