ops_Dt does not work

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
suusie
Posts: 30
Joined: Mon May 21, 2012 4:16 am

ops_Dt does not work

Post by suusie »

Hi, I would like to make one question. I would appreciate if you could respond to this :idea:

I am a begginer in opensees material developing. I am interested in viscous damper material (ViscousDamper.cpp/.h).

I read the webinar document "Discovering OpenSees: Surfing the Waves of OpenSees Adding your Code to OpenSees" and the example implementation worked out well in my computer. (http://opensees.berkeley.edu/wiki/index ... r_own_Code)

Then, I tried to do the same thing (compiiling by Visual Studio and running analysis by OpenSees), modifying the already existing code from SVN folder.

I successfully did the things above except some of the materials that use "ops_Dt", which is ''current delta T for current domain doing an update".
I checked this "ops_Dt" and I found that it just gave me 0.0 for each time-step. :?

I would like to use "ops_Dt" for my future work. So I am wondering if you have any idea to get this problem settled.

I also tried using "double tCurrent=(this->getDomain())->getCurrentTime();" to get the Dt, but it gave me an error message "Error:class viscousDamper has no member getDomain". :(
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: ops_Dt does not work

Post by fmk »

you are experiencing a windows phenomenon .. ops_Dt is a global variable .. when you load a dll it uses it's own global variables and not the one used by the general program .. in the past i have used procedures to get around his problem, however none is available to get this particular variable. i will add it to the code for the next time i put out a minor release (sometime later this week i hope) .. in the meantie your only option would be to build the entire application and include your code in it.
suusie
Posts: 30
Joined: Mon May 21, 2012 4:16 am

Re: ops_Dt does not work

Post by suusie »

thanks for your reply!
o.k, I am looking forward to the next minor release :)
Post Reply