Is there any documentation on how to use the new mechanism to introduce user materials and elements in version 2.1.0 as .dlls? What are the major differences compared to what we currently write to introduce a new element/material? What classes have been written?
Thanks a lot!
Dynamically linked user elements/materials
Moderators: silvia, selimgunay, Moderators
example code can be found in OpenSees/PACKAGES/NewElement and NewMaterial .. there are cpp, c and fortran directories under each containing an example script, example code and a Makefile or windows project. if using windows there is a solution in OpenSees/PACAKES/Win32 to build all c & cpp lib & dll's required.
the difference in adding the code is that there is no reference to tcl in the code, there is a new procedural API to do the same stuff. again have a look at the examples. if cpp code there is 1 extra procedure OPS_ClassName in the .cpp file, the c & fortran routines just use an ISW switch of 1 to do their init.
there is also an extra procedure in the file localInit, this is for any local init yur routines may require (done once at initial load of dll), it can also be used as examples show to give yourself some credit as dll is loaded.
i will post a rough draft this afternoon of the documentation. i am still working on it and so it will be updated prety constantly over the next few weeks as i receive feedback on it (feel free to send any comments directly to me)
the difference in adding the code is that there is no reference to tcl in the code, there is a new procedural API to do the same stuff. again have a look at the examples. if cpp code there is 1 extra procedure OPS_ClassName in the .cpp file, the c & fortran routines just use an ISW switch of 1 to do their init.
there is also an extra procedure in the file localInit, this is for any local init yur routines may require (done once at initial load of dll), it can also be used as examples show to give yourself some credit as dll is loaded.
i will post a rough draft this afternoon of the documentation. i am still working on it and so it will be updated prety constantly over the next few weeks as i receive feedback on it (feel free to send any comments directly to me)
i have placed the draft document on-line. there is a link from the document page of the developer pages.
it is here
[url]
http://opensees.berkeley.edu/OpenSees/O ... micAPI.pdf
[/url]
it is here
[url]
http://opensees.berkeley.edu/OpenSees/O ... micAPI.pdf
[/url]