Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
Hi Thierry,
You can find documentation on how to write an XML in our online documentation. It should be a good inspiring start.
You can also give a look at all the examples available in the source code of SOFA in the examples/ repository.As you might already know Thierry, specific training sessions can be proposed around SOFA.
You can find also plenty papers and reports as:
– a paper about SOFA
– a HDR about SOFA, collisions and constraints
– a thesis about electrophysiology (since it is your research focus)Best regards,
Hugo
HugoKeymasterCool good news @suhas1998 and thank you Marwa for your help.
Next time do not hesitate to close the topic yourself when it solves your problem.Best
Hugo
HugoKeymasterDear @ealkhteeb
Thank you for reaching us through the forum!
I am sorry that you did not get any reply yet, but things are pretty busy currently around SOFA!I am no Windows expert, but here is what I noticed from your files.
In the CMakeCache, this appears://Path to a file. Boost_INCLUDE_DIR:PATH=C:/local/boost_1_67_0
It seems that you installed correctly boost, but you should definitely set this Boost_DIR variable. I think this is usually automatically detected.
Moreover, regarding the runSofa.exe message, it mentions “… code execution cannot proceed because boost_program_options-vc141-mt-x6-1_67.dll …”
Actually the name of the library should be boost_program_options-vc141-mt-x64-1_67.dll. Do you have any idea about this mis-spelling?I hope these clues will help you in any way.
Best,Hugo
HugoKeymasterThanks a lot for the notice Noura
HugoKeymasterDo you mean this is working:
self.forceField.findData('totalForce').value = [0, force, 0]
?Did you solve your problem then ?
Best
HHugoKeymasterHi Agniv,
The code you got inspired from is a template : it means you need to implement it your own way. Especially the function addMyComponent in which you need to add a SOFA component that does exist or that you implemented.
First of all, I would for instance remove unnecessary includes e.g.:
#include <SofaComponentCommon/initComponentCommon.h> #include <SofaComponentBase/initComponentBase.h> #include <SofaComponentGeneral/initComponentGeneral.h> #include <SofaComponentAdvanced/initComponentAdvanced.h> #include <SofaComponentMisc/initComponentMisc.h>
and remove this from the code:
sofa::component::initComponentBase(); sofa::component::initComponentCommon(); sofa::component::initComponentGeneral(); sofa::component::initComponentAdvanced(); sofa::component::initComponentMisc();
Since the code uses ArgumentParser, Node, possibly PluginManager etc. you need to declare the associated package dependencies in your CMakeLists.txt:
cmake_minimum_required(VERSION 3.1) project(Sofa) set(CMAKE_PREFIX_PATH "/path/to/sofa/build/install/lib/cmake") find_package(SofaFramework) find_package(SofaSimulation) add_executable(${PROJECT_NAME} Main.cpp) target_link_libraries(${PROJECT_NAME} SofaComponentCommon SofaHelper SofaDefaultType SofaCore SofaSimulationCommon SofaSimulationTree SofaSimulationGraph)
and you need then to run:
1. cmake-gui ../path_to_the_source and set the path to SOFA build dir for all *_DIR required
2. make
3. run your executable generated in your buildNote that you also can get inspired from the Main.cpp of runSofa (sofa/applications/projects).
Cheers,Hugo
HugoKeymasterHi Bruno,
At my best knowledge, in SOFA you can find:
– isotropic elastic materials
– isotropic elasto-plastic materials
– anisotropic hyperelastic materialsMaybe someone did implement such a anisotropic elasto-plastic materials, as the one you are looking for ..
If so, please anyone let us know.
Best regards,Hugo
HugoKeymasterHi Quentin
Have you tried to use this instead:
forceToSet = self.forceField.findData('totalForce').value forceToSet[1] = force
or
self.forceField.findData('totalForce').value[1] = force
Let me know how this works
CheersHugo
HugoKeymasterHi Noura,
Strange that this error is not detected..
The correct typo isSearchUp
and notsearchUp
. Can you give it a try ?Best,
Hugo
HugoKeymasterWhat simulation do you want to do exactly with this Main.cpp ?
Could you please paste all #include of your Main?
HugoKeymasterHum ..
first of all you can simply write for the target_link_libraries:
target_link_libraries(${PROJECT_NAME} SofaComponentCommon)
does this help in anyway?HugoKeymastercan you tell us more about your error?
HugoKeymasterHi @agniv,
This is indeed the variable SofaFramework_DIR that you have to fill with the path to the build directory of SOFA.
Hugo
HugoKeymasterHi @agniv,
You are here creating a project that is based on SOFA (more especially the SofaFramework package). Therefore cmake is asking for the path to the library. At the configure time, you need to specify the path to SofaFramework. Best
Hugo
HugoKeymasterHi @agniv,
Indeed these folders contains scenes that can be run with runSofa. These are not cpp scenerio.
To write a scene in cpp have you looked in the doc: How to write a scene in CPP ?Best
Hugo
HugoKeymasterHi @agniv,
Welcome to the SOFA forum!
The tutorial chainHybrid is an old C++ tutorial that has been deprecated in the v17.12. It was previously a project directly in SOFA that could be compiled by activating the flag BUILD_TUTORIALS.I would rather advise to have a look at the tutorial-scenes in examples/Tutorials/
Best
Hugo
HugoKeymasterHi @suhas1998
It seems you are compiling in debug mode (since runSofa is looking for _d debug libraries). Is that correct?
Hugo
HugoKeymasterDear Rene Thierry,
As I said above, documentation is a good start. A good background in numerical analysis, finite element methods and computer science is important for developing your own algorithms in SOFA.
Trainings are usually done in France. It is possible to make “on-site” trainings, however, traveling costs are additional charges.Best,
Hugo
HugoKeymasterDear Rene Thierry,
Welcome to the SOFA forum!
Modeling the electromechanical coupling of the human heart is possible with SOFA. If you already know the model / have an implementation in Matlab, programming it in C++ into SOFA might not be that complicated.
To start with SOFA, I would recommend:
- to read the online documentation (for building SOFA and understanding its main physics principle)
- to browse the SOFA API documentation
- to keep in touch if you have any question
Note that the SOFA Consortium provides specific trainings to start learning and developing simulations with SOFA.
Best regards,
Hugo
28 May 2018 at 21:47 in reply to: [SOLVED] Binary release linux libs – libicui18n.so.55 missing #11132HugoKeymasterDear @wakko,
Very good news! Congratulations to you and Guillaume for this nice effort!
No sooner said than done, a nice open-source item on the SOFA Marketplace: Qtetramesher
Do not hesitate to share the page!
BestHugo
HugoKeymasterWhat about the first command:
find /lib -name "*pthread*"
?HugoKeymasterHi @adrien,
I don’t see in your above posts any reference to the link we sent you.
Have you checked Edit 1, 2 and 3 ?find /lib -name "*pthread*"
then test:
nm /lib/x86_64-linux-gnu/libpthread.so.0 | grep "pthread_create"
Use a minimal CMakeLists.txt to test:
cmake_minimum_required (VERSION 2.8.7) find_package(Threads)
Check whether there is any version mismatch.
Best,Hugo
25 May 2018 at 09:40 in reply to: [SOLVED] Binary release linux libs – libicui18n.so.55 missing #11111HugoKeymasterDear @wakko
Correct, but as soon as you get it running, it would be our pleasure to advertise it for you!Best
Hugo
HugoKeymasterhey @adrien
did you take the time to look at Guillaume’s link? I am pretty sure clues in this thread may help you in solving you config problem. Are you able to find pthread somewhere on your system?
-
AuthorPosts