bernd wrote: ↑Fri Mar 29, 2019 6:04 am
Sudhanshu wrote: ↑Mon Mar 18, 2019 5:35 am
I have noticed that every solver has atleast the following files:
writer.py
solver.py
tasks.py
So can anyone give a brief description about these files and their purpose or maybe a link to their documentation ?
Mhh not easy do describe in a few words ... best is to have a look at this branch:
https://github.com/berndhahnebach/FreeC ... s/femoofem
it is the most up to date documentation on how to add a new solver. Just start with the first commit which starts with "FEM: oofem, ... " Check every commit step by step. You should do the same steps. The first two commits are the most important ones.
-
"FEM: oofem, add solver object"
-
"FEM: oofem, add task and input file writer modules (the solver runs with a given input file, a string in writer)"
Till now, I have read till the 4th commit: -
FEM: examples, oofem plane stress 2d and canti oofem solver
And it was really helpful.
Regarding the questions about the 3 files that I asked earlier, I think I have got the answer to some extent:
1. writer.py: It takes the FreeCAD.ActiveDocument as input, extracts data from it and creates an input file in the solver specific format.
One question here is that in the end you have defined an example_input_file and given data to it. Is that data in the specific format in which oofem takes its input?
2. tasks.py: It performs all the tasks related to solving such as checking for correct input, invoking writer.py, running the solver and then writing
results to FreeCAD Gui.
The question here is that is the result being written in a seperate file and then being exported to GUI via VTK or is it being directly written ActiveDocument?
3. solver.py: Actually I am not much clear regarding its function. It creates a solver object which is the first step in invoking a solver, but what is a
solver object in the first place?
bernd wrote: ↑Fri Mar 29, 2019 6:04 am
You could check these documentations ...
Extend_FEM_Module, the module names have changed to lower case character, but basically it is the same.
I am yet to read this one.
bernd wrote: ↑Fri Mar 29, 2019 6:04 am
I may give more informations later on over the weekend
I will be waiting.