Search found 59 matches

by shiro
Wed Jun 29, 2022 2:29 pm
Forum: OpenSees.exe Users
Topic: Question about ”sp command”
Replies: 0
Views: 12117

Question about ”sp command”

Hello.

When the following cyclic loading is performed,
the output reaction is not incrementally analyzed with the horizontal force sp command
while maintaining the value after 10 steps of the vertical load.

The sp command ran correctly in Python code, but not in Tcl code.

I'm using opensees 3.2.0. and Tcl8.6.

I would appreciate it if you could tell me the solution.

Thanks.

・Tcl

pattern Plain 1 Linear {
load 77 0 -200000 0 0 0 0
}

recorder Node -file Disp.txt -time -node 77 -dof 1 disp

constraints Plain
numberer RCM
system BandGeneral
test NormDispIncr 1.0e-4 200 ;
algorithm BFGS -count 100
integrator LoadControl 0.1;
analysis Static
analyze 10;

puts "gravity analyze ok..."
loadConst -time 0.0;

recorder Node -file out.txt -time -node 1 2 3 4 5 -dof 1 reaction

timeSeries Path 1 -dt 0.1 -filePath wave.txt ;
pattern Plain 2 1 {

sp 77 1 1

}

constraints Penalty 1e20 1e20;
numberer RCM;
system BandGeneral;
test NormDispIncr 1.0e-5 1000 1;
algorithm KrylovNewton;
integrator LoadControl 0.1;
analysis Static ;
analyze 500


・out.txt

0.1 -2.09572 -3.48868 -4.85834e-13 3.48868 2.09572
0.2 -4.23147 -7.05771 2.50999e-12 7.05771 4.23147
0.3 -6.40679 -10.7071 -1.32339e-13 10.7071 6.40679
0.4 -8.62178 -14.4367 3.09086e-13 14.4367 8.62178
0.5 -10.8765 -18.2464 -3.06599e-12 18.2464 10.8765
0.6 -13.1705 -22.1367 -1.70175e-12 22.1367 13.1705
0.7 -15.5038 -26.1072 -1.15818e-12 26.1072 15.5038
0.8 -17.8767 -30.154 -2.09965e-12 30.154 17.8767
0.9 -20.288 -34.2837 -9.166e-13 34.2837 20.288
1 -22.7325 -38.4837 5.97566e-12 38.4837 22.7325
0.1 -22.7342 -38.489 -2.84217e-12 38.489 22.7342
0.2 -22.734 -38.4888 -1.5703e-12 38.4888 22.734
0.3 -22.734 -38.4888 2.40874e-12 38.4888 22.734
0.4 -22.734 -38.4888 -9.25127e-12 38.4888 22.734
0.5 -22.734 -38.4888 7.74492e-12 38.4888 22.734
0.6 -22.734 -38.4888 -7.62412e-12 38.4888 22.734
0.7 -22.734 -38.4888 -5.55644e-12 38.4888 22.734
0.8 -22.734 -38.4888 -7.80886e-12 38.4888 22.734
0.9 -22.734 -38.4888 -2.96296e-12 38.4888 22.734

・・・・・・
by shiro
Tue Jun 07, 2022 1:09 am
Forum: OpenSees.exe Users
Topic: How to input response spectrum txt file.
Replies: 1
Views: 1804

Re: How to input response spectrum txt file.

I can read "designspectra(0).

And the calculation was done.

However, I get an error and stop at the following points.


*********************************************


Calculating ductility...

Level 1 Deformation: 1.34585
Level 2 Deformation: 1.06504
Level 3 Deformation: 0.672844
Level 4 Deformation: 0.404818
Level 5 Deformation: 0.0950619
Level 6 Deformation: 0.096868
Level 7 Deformation: 0.301676
Level 8 Deformation: 0.08662
Level 9 Deformation: 0.0525909
Level 10 Deformation: 0.0895018
Level 11 Deformation: 0.121067
Level 12 Deformation: 0.04377
Level 13 Deformation: 0.0383664

missing operand at _@_
in expression "abs(-_@_)"


*********************************************


I couldn't solve it because I didn't understand the meaning of this error.

There was a corresponding code in AppAnalysis_area.v6.tcl.

I would be grateful if you could give me some advice.



・「AppAnalysis_area.v6.tcl」


puts " Calculating ductility..."
for {set level 1} {$level <= $NumStories} {incr level} {
set Ductility($ii,$level) -$DBL_MAX
}
# Method from Graham Oxborrow on 4/2/09
for {set level 1} {$level <= $NumStories} {incr level} {

# puts "$ii $level $j"
set Deformation($ii,$level,[expr $j+1]) -$DBL_MAX
#puts $Deformation($ii,$level,[expr $j+1])
if {[catch {open "$dataDir/$FileName/$ii/BraceDeform$level Eq[expr $j+1].out" r 0666} fileID]} {
puts "Cannot open $dataDir/$FileName/$ii/BraceDeform$level Eq[expr $j+1].out"
} else {
foreach line [split [read $fileID] \r\n] {
set bracedeform [split $line]
set x [lindex $bracedeform 1]
if {$x != ""} {
set brdf [expr abs($x)]
if {$brdf > $Deformation($ii,$level,[expr $j+1])} {
set Deformation($ii,$level,[expr $j+1]) $brdf;
#puts $Deformation($ii,$level,[expr $j+1])
# this will turn out to be the max deformation on that level
}
}
}
}
puts "Level $level Deformation: $Deformation($ii,$level,[expr $j+1])"
close $fileID
}
by shiro
Tue May 31, 2022 1:13 am
Forum: OpenSees.exe Users
Topic: How to input response spectrum txt file.
Replies: 1
Views: 1804

How to input response spectrum txt file.

I have something to ask and I will post.

The following useful code causes an error in "Eqscaling.tcl" when reading a seismic wave.

can't read "designspectra(0)": no such element in array

The seismic wave was used as the response spectrum, and the acceleration was stored in the first column
and the period was stored in the second column, and saved as "Eighteen_Stories.txt".

In what format should the given txt file be given so that the error disappears?

I would appreciate it if you could tell me.


https://scholarsarchive.byu.edu/cgi/vie ... ontext=etd

   Minimizing Base Column Demands in Multi-Story Buckling Restrained Braced Frames Using Genetic Algorithms


$Designfile.txt = Eighteen_Stories.txt

0.01 0.44
0.02 0.48
0.022 0.488
0.025 0.5
0.029 0.516
0.03 0.52
0.032 0.528
0.035 0.54
0.036 0.544
0.04 0.56
0.042 0.568
0.044 0.576
0.045 0.58
0.046 0.584
0.048 0.592
0.05 0.6
0.055 0.62
0.06 0.64
0.065 0.66
0.067 0.668
0.07 0.68
0.075 0.7
0.08 0.72
0.085 0.74
0.09 0.76
0.095 0.78
0.1 0.8




(sec  ACC)





proc EqScaling {} {

global Designfile GMfile GMdir
puts "Scaling EQ"
set file $GMdir/$Designfile.txt
ReadDesignSpectraFile $file; # assembles array of design spectra
set number 1
foreach GM $GMfile {
#puts $GM
set file "$GMdir/$GM"
append file "_050.txt"
puts $file
ReadSpectraFile $file $number; # assembles array of earthquake spectra
incr number
}
puts "EQ Scaled"
}





proc ReadDesignSpectraFile {inFilename} {

# Formal arguments
# inFilename -- file which contains PEER strong motion record
# outArrayname -- file to be written in format .txt can read
global designspectra designspectranum
# Open the input file and catch the error if it can't be read
if {[catch {open $inFilename r} inFileID]} {
puts stderr "Cannot open $inFilename for reading"
} else {
# Flag indicating spectra values are found and that ground motion
# values should be read -- ASSUMES spectra values are at end of file
set flag 0
set i 0
#puts $i
# Look at each line in the file
foreach line [split [read $inFileID] \n] {
if {[llength $line] == 0} {
# Blank line --> do nothing
continue
} else {
split $line
# Find the first line of data values and set the flag
if {[string match [lindex $line 0] "0"] == 1} {set flag 1}
if {$flag == 1} {
incr i
set designspectra($i) [lindex $line 1]; # first value is the acc
lappend designspectra($i) [lindex $line 0]; # second value is period
#puts $designspectra($i)
}
}

#puts "$i $flag"
}
close $inFileID; # Close the input file
set designspectranum $i
#puts $designspectranum
}
}




proc ReadSpectraFile {inFilename j} {

# Formal arguments
# inFilename -- file which contains PEER strong motion record
# j -- earthquake number
#
# Assumptions
# The header in the PEER record is, e.g., formatted as follows:
# PACIFIC ENGINEERING AND ANALYSIS STRONG-MOTION DATA
# IMPERIAL VALLEY 10/15/79 2319, EL CENTRO ARRAY 6, 230
# ACCELERATION TIME HISTORY IN UNITS OF G
# NPTS= 3930, DT= .00500 SEC
global spectra spectranum
# Open the input file and catch the error if it can't be read

if {[catch {open $inFilename r} inFileID]} {
puts stderr "Cannot open $inFilename for reading"
} else {
# Flag indicating spectra values is found and that ground motion
# values should be read -- ASSUMES spectra values after last line
# of header!!!
set flag 0
set i 0
# Look at each line in the file
foreach line [split [read $inFileID] \n] {
if {[llength $line] == 0} {
# Blank line --> do nothing
continue
} else {
split $line
if {$flag == 1} {
incr i
set spectra($j,$i) [lindex $line 6]; # first one is acc
lappend spectra($j,$i) [lindex $line 8];# second one is period
#puts $spectra($j,$i)
}
# Find the first line of data values and set the flag
if {[string match [lindex $line 0] "1"] == 1} {set flag 1}
}
#puts "$i $flag"
}
close $inFileID; # Close the input file
set spectranum($j) $i
}
}
by shiro
Fri Aug 13, 2021 1:02 pm
Forum: OpenSees.exe Users
Topic: How to set Pin springs in 3D frame analysis
Replies: 0
Views: 9580

How to set Pin springs in 3D frame analysis

I posted a question about how to set Pin springs in 3D frame analysis.

As shown below, the X direction is the beams, the Z direction is the girders, and the height is the Y direction.

When I set the section Aggregator as follows, the linear analysis will reflect the bending stress results of the pins in the X direction.
However, when the force is applied in the Z direction by linear analysis, the bending stress result of the pin is not reflected and the result is rigid.

section Aggregator $SecTag1 $MatTagUbig P $MatTagUbig Vy $matID Mz;

In this case, if the following settings are made, the bending stress results of the pins are reflected in the Z direction for both columns and beams by linear analysis.
Is this setting method correct?

section Aggregator $SecTag1 $MatTagUbig P $MatTagUbig Vy $MatTagUbig Vz $matID Mz $matID My;

The matID is a Pinching 4 model with a bending spring as a pin.

I would appreciate it if you could give me some advice and reference materials.



# define section tags:
set ColSecTag 1
set BeamSecTag 2
set GirdSecTag 3


set IDColTransf 1;
set IDBeamTransf 2;
set IDGirdTransf 3;
set ColTransfType Linear ;


geomTransf PDelta $IDColTransf 0 0 1;
geomTransf PDelta $IDBeamTransf 0 0 1;
geomTransf PDelta $IDGirdTransf 1 0 0;


set Ubig 1e10;

set MatTagUbig 100;
uniaxialMaterial Elastic $MatTagUbig $Ubig;


set SecTag1 1;
section Aggregator $SecTag1 $MatTagUbig P $MatTagUbig Vy $matID Mz;

# section Aggregator $SecTag1 $MatTagUbig P $MatTagUbig Vy $MatTagUbig Vz $matID Mz $matID My;

set LCol1 130.0

set Lp_c1 [expr 0.004*$LCol1];

set LBeam 91.0

set Lp_b2 [expr 0.004*$LBeam];


#################
### columns ###
#################

# Frame Y direction

element beamWithHinges 1 1 2 $SecTag1 $Lp_c1 $SecTag1 $Lp_c1 $Es $Acol_1 $Icol_1 $Izcol_1 $Gs $Jcol_1 $IDColTransf;


###############
### beams ###
###############

##### beams -- parallel to X-axis########

element beamWithHinges 10 11 12 $SecTag1 $Lp_b2 $SecTag1 $Lp_b2 $Es $Abeam_12 $Ibeam_12 $Izbeam_12 $Gs $Jbeam_12 $IDBeamTransf;


#################
### girders ###
#################

########## girders -- parallel to Z-axis####

element beamWithHinges 20 21 22 $SecTag1 $Lp_b2 $SecTag1 $Lp_b2 $Es $Abeam_11 $Ibeam_11 $Izbeam_11 $Gs $Jbeam_11 $IDGirdTransf;
by shiro
Mon Jul 05, 2021 1:11 am
Forum: OpenSeesPy
Topic: About ops_vis
Replies: 4
Views: 5471

Re: About ops_vis

Dear rafal and skypass


I use matplotlib ver. 3.2.1.

I updated to ver3.3.4 and it was successful.

Thank you for your advice.
by shiro
Wed Jun 30, 2021 1:51 pm
Forum: OpenSeesPy
Topic: About ops_vis
Replies: 4
Views: 5471

About ops_vis

Hello.

When I run the following example file, I get the following error:

https://openseespydoc.readthedocs.io/en ... ps-vis-ex2


Traceback (most recent call last):
File "demo_cantilever_3el_3d.py", line 69, in <module>
opsv.plot_model()
File "D:\Python38\lib\site-packages\openseespy\postprocessing\ops_vis.py", line 758, in plot_model
_plot_model_3d(node_labels, element_labels, offset_nd_label, axis_off,
File "D:\Python38\lib\site-packages\openseespy\postprocessing\ops_vis.py", line 706, in _plot_model_3d
ax.set_box_aspect((np.ptp(ax.get_xlim3d()),
AttributeError: 'Axes3DSubplot' object has no attribute 'set_box_aspect'


I would appreciate it if you could let me know.
by shiro
Thu May 27, 2021 2:13 am
Forum: OpenSees.exe Users
Topic: About Pinching4 negative gradient setting
Replies: 0
Views: 6555

About Pinching4 negative gradient setting

Hello!

In the Pinching4 setting, setting ePf4 and eNf4 to plus will succeed.
(ePd4,ePf4) , (eNd4,eNf4)

Setting ePf4 and eNf4 to negative gradient will result in an error
because we want to consider the negative gradient.

set pEnvelopeStress [list 31.19e3 55.00e3 80.00e3 32.00e3]
set nEnvelopeStress [list -31.19e3 -55.00e3 -80.00e3 -32.00e3]

When setting a negative gradient in the Pinching4 model,
how should the 4th node be set in the following example?

I would appreciate it if you could answer.


proc ch1 {matID} {

#stress1 stress2 stress3 stress4
set pEnvelopeStress [list 31.19e3 55.00e3 80.00e3 1200.00e3]
set nEnvelopeStress [list -31.19e3 -55.00e3 -80.00e3 -1200.00e3]

#strain1 strain2 strain3 strain4
set pEnvelopeStrain [list [expr 1.35] [expr 4.0] [expr 6.78] [expr 131.22]]
set nEnvelopeStrain [list [expr -1.35] [expr -4.00] [expr -6.78] [expr -131.22]]

#Pos_env. Neg_env.
set rDisp [list 0.5 0.5]

#Pos_env. Neg_env.
set rForce [list 0.25 0.25]

#Pos_env. Neg_env.
set uForce [list -0.05 -0.05]

#gammaK1 gammaK2 gammaK3 gammaK4 gammaKLimit
set gammaK [list 0.0 0.0 0.0 0.0 0.0]

#gammaD1 gammaD2 gammaD3 gammaD4 gammaDLimit
set gammaD [list 0.0 0.0 0.0 0.0 0.0]

#gammaF1 gammaF2 gammaF3 gammaF4 gammaFLimit
set gammaF [list 0.0 0.0 0.0 0.0 0.0]

set gammaE 100

set dam "cycle"

uniaxialMaterial Pinching4 $matID [lindex $pEnvelopeStress 0] [lindex $pEnvelopeStrain 0] [lindex $pEnvelopeStress 1] [lindex $pEnvelopeStrain 1] [lindex $pEnvelopeStress 2] [lindex $pEnvelopeStrain 2] [lindex $pEnvelopeStress 3] [lindex $pEnvelopeStrain 3] [lindex $nEnvelopeStress 0] [lindex $nEnvelopeStrain 0] [lindex $nEnvelopeStress 1] [lindex $nEnvelopeStrain 1] [lindex $nEnvelopeStress 2] [lindex $nEnvelopeStrain 2] [lindex $nEnvelopeStress 3] [lindex $nEnvelopeStrain 3] [lindex $rDisp 0] [lindex $rForce 0] [lindex $uForce 0] [lindex $rDisp 1] [lindex $rForce 1] [lindex $uForce 1] [lindex $gammaK 0] [lindex $gammaK 1] [lindex $gammaK 2] [lindex $gammaK 3] [lindex $gammaK 4] [lindex $gammaD 0] [lindex $gammaD 1] [lindex $gammaD 2] [lindex $gammaD 3] [lindex $gammaD 4] [lindex $gammaF 0] [lindex $gammaF 1] [lindex $gammaF 2] [lindex $gammaF 3] [lindex $gammaF 4] $gammaE $dam

}
by shiro
Tue May 18, 2021 3:04 am
Forum: Framework
Topic: How to adding New Classes to OpenSees.
Replies: 4
Views: 11586

Re: How to adding New Classes to OpenSees.

Dear Alvaro

Finally succeeded.

Thank you for the advice.
by shiro
Thu May 13, 2021 1:25 am
Forum: Framework
Topic: How to adding New Classes to OpenSees.
Replies: 4
Views: 11586

Re: How to adding New Classes to OpenSees.

When I ran it as follows, the error disappeared and the compilation was finished.


1)Added sectionforcedeformation.h and bool.h to the \core folder and source folder

2)Added CrdTransf.cpp and sectionforcedeformation.cpp to the \core folder and source folder

3)project properties>preprocessor definitions by adding "_CRT_SECURE_NO_WARNINGS"

4)Rebuild solution.


It compiles succesfully without displaying errors in Visual Studio 2019.

I put the ElasticPPcpp.dll file in the same folder as example1.tcl and ran the calculation.
However, the calculation was not executed without recognizing ElasticPPcpp.


OpenSees > source example1.tcl
WARNING could not create uniaxialMaterial ElasticPPcpp


Since the project was compiled in 64-bit, debug mode, I tried compiling it in release mode, but the result was the same.

How do I compile ElasticPPcpp.dll to link when OpenSees.exe runs?

I would appreciate your advice.
by shiro
Thu May 13, 2021 1:23 am
Forum: OpenSees.exe Users
Topic: About Adding New Classes to OpenSees
Replies: 2
Views: 3244

Re: About Adding New Classes to OpenSees

When I ran it as follows, the error disappeared and the compilation was finished.


1)Added sectionforcedeformation.h and bool.h to the \core folder and source folder

2)Added CrdTransf.cpp and sectionforcedeformation.cpp to the \core folder and source folder

3)project properties>preprocessor definitions by adding "_CRT_SECURE_NO_WARNINGS"

4)Rebuild solution.


It compiles succesfully without displaying errors in Visual Studio 2019.

I put the ElasticPPcpp.dll file in the same folder as example1.tcl and ran the calculation.
However, the calculation was not executed without recognizing ElasticPPcpp.


OpenSees > source example1.tcl
WARNING could not create uniaxialMaterial ElasticPPcpp


Since the project was compiled in 64-bit, debug mode, I tried compiling it in release mode, but the result was the same.

How do I compile ElasticPPcpp.dll to link when OpenSees.exe runs?

I would appreciate your advice.
by shiro
Wed May 12, 2021 1:24 am
Forum: Framework
Topic: How to adding New Classes to OpenSees.
Replies: 4
Views: 11586

Re: How to adding New Classes to OpenSees.

As an alternative, I also tried the following methods.

https://opensees.berkeley.edu/OpenSees/ ... urCode.pdf

I connected to TortoiseSVN but couldn't.
Therefore, I could not download by accessing the following address.

svn://opensees.berkeley.edu/usr/local/svn/OpenSees/trunk/DEVELOPER


So, I tried to create ElasticPPcpp dll in Visual Studio 2019 as the text says.
I carried out from p21 to p36 of the text.

I was able to do the same up to p34, but I get a compile error at the last p35.
I get 54 errors as below.

I would be grateful if you could give me some advice on how to successfully compile the ElasticPPcpp.dll file.




error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\BinaryFileStream.cpp 121
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\BinaryFileStream.cpp 573
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 51
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 69
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 135
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 700
error C1083 include Unable to open the file. 'SectionForceDeformation.h':No such file or directory ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Domain.cpp 71
error C1083 include Unable to open the file. 'bool.h':No such file or directory ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\EigenSOE.h 24
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 423
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 432
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 443
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 453
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 463
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 105
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 106
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 107
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 110
error C4996 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 126
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 127
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 130
error C4996 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 148
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 149
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 163
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 164
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 166
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 167
error C1083 include Unable to open the file. 'bool.h':No such file or directory ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\EigenSOE.h 24
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Information.cpp 175
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Information.cpp 179
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Information.cpp 183
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Node.cpp 1841
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Renderer.cpp 94
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 50
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 51
error C4996 'ctime': This function or variable may be unsafe. Consider using ctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 104
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 105
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 112
error C4996 'ctime': This function or variable may be unsafe. Consider using ctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 124
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 125
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 149
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 169
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 189
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 209
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 229
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 249
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 269
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 410
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 415
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\StandardStream.cpp 40
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\StringContainer.cpp 98
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 275
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 276
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 283
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 284
by shiro
Wed May 12, 2021 1:21 am
Forum: OpenSees.exe Users
Topic: About Adding New Classes to OpenSees
Replies: 2
Views: 3244

Re: About Adding New Classes to OpenSees

As an alternative, I also tried the following methods.

https://opensees.berkeley.edu/OpenSees/ ... urCode.pdf

I connected to TortoiseSVN but couldn't.
Therefore, I could not download by accessing the following address.

svn://opensees.berkeley.edu/usr/local/svn/OpenSees/trunk/DEVELOPER


So, I tried to create ElasticPPcpp dll in Visual Studio 2019 as the text says.
I carried out from p21 to p36 of the text.

I was able to do the same up to p34, but I get a compile error at the last p35.
I get 54 errors as below.

I would be grateful if you could give me some advice on how to successfully compile the ElasticPPcpp.dll file.




error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\BinaryFileStream.cpp 121
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\BinaryFileStream.cpp 573
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 51
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 69
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 135
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\DataFileStream.cpp 700
error C1083 include Unable to open the file. 'SectionForceDeformation.h':No such file or directory ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Domain.cpp 71
error C1083 include Unable to open the file. 'bool.h':No such file or directory ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\EigenSOE.h 24
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 423
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 432
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 443
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 453
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Element.cpp 463
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 105
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 106
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 107
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 110
error C4996 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 126
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 127
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 130
error C4996 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 148
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 149
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 163
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 164
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 166
error C4996 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\File.cpp 167
error C1083 include Unable to open the file. 'bool.h':No such file or directory ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\EigenSOE.h 24
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Information.cpp 175
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Information.cpp 179
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Information.cpp 183
error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Node.cpp 1841
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\Renderer.cpp 94
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 50
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 51
error C4996 'ctime': This function or variable may be unsafe. Consider using ctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 104
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 105
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 112
error C4996 'ctime': This function or variable may be unsafe. Consider using ctime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 124
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 125
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 149
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 169
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 189
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 209
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 229
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 249
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 269
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 410
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\SimulationInformation.cpp 415
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\StandardStream.cpp 40
error C4996 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\StringContainer.cpp 98
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 275
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 276
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 283
error C4996 'strtok': This function or variable may be unsafe. Consider using strtok_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. ElasticPPcpp C:\Users\777\Desktop\DEVELOPER\core\UniaxialMaterial.cpp 284
by shiro
Sun Apr 25, 2021 2:21 am
Forum: Framework
Topic: How to adding New Classes to OpenSees.
Replies: 4
Views: 11586

How to adding New Classes to OpenSees.

I would like to adding New Classes to OpenSees.

I would like to adding the new class to the VisualStudio 2019 project
and Makefiles to be compiled/linked with the rest of the OpenSees classes.

I referred to the following workshop materials.

 ・QuakeCoRE OpenSees Training Workshop 2016

   Adding a New Material or Element to OpenSees


The files I want to add are:

 777.h
 777.cpp

p10:

class 777 : public UniaxialMaterial


The following parts have been added with reference to the material.


(1)TclModelBuilderUniaxialMaterialCommand.cpp


p25

extern void *OPS_777(void);

p26

else if (strcmp(argv[1], "777") == 0) {
void *theMat = OPS_777();

if (theMat != 0)
theMaterial = (UniaxialMaterial *)theMat;
else
return TCL_ERROR;
}


(2)classTags.h

p27

#define MAT_TAG_777 1


(3)SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp

#include <777.h>


When I modify the above and compile with VisualStudio 2019 project,
the following error will occur.


/**********************************************************************************************************************/

error LNK2019

The unresolved external symbol "void * __cdecl OPS_777 (void)" (? OPS_777 @@ YAPEAXXZ) is referenced by the function
"int __cdecl TclModelBuilderUniaxialMaterialCommand (void *, struct Tcl_Interp *, int, char const * *, class Domain *)"
(? TclModelBuilderUniaxialMaterialCommand @@ YAHPEAXPEAUTcl_Interp @@ HPEAPEBDPEAVDomain @@@ Z)

OpenSees C: \ Users \ *** \ Documents \ OpenSees-3.2.0 \ Win64 \ proj \ openSees
\ material.lib (TclModelBuilderUniaxialMaterialCommand.obj)

/**********************************************************************************************************************/


I would appreciate it if you could tell me how to compile successfully.
by shiro
Thu Apr 22, 2021 8:51 pm
Forum: OpenSees.exe Users
Topic: About Adding New Classes to OpenSees
Replies: 2
Views: 3244

About Adding New Classes to OpenSees

I would like to adding New Classes to OpenSees.

I would like to adding the new class to the VisualStudio 2019 project
and Makefiles to be compiled/linked with the rest of the OpenSees classes.

I referred to the following workshop materials.

 ・QuakeCoRE OpenSees Training Workshop 2016

   Adding a New Material or Element to OpenSees


The files I want to add are:

 777.h
 777.cpp

p10:

class 777 : public UniaxialMaterial


The following parts have been added with reference to the material.


(1)TclModelBuilderUniaxialMaterialCommand.cpp


p25

extern void *OPS_777(void);

p26

else if (strcmp(argv[1], "777") == 0) {
void *theMat = OPS_777();

if (theMat != 0)
theMaterial = (UniaxialMaterial *)theMat;
else
return TCL_ERROR;
}


(2)classTags.h

p27

#define MAT_TAG_777 1


(3)SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp

#include <777.h>


When I modify the above and compile with VisualStudio 2019 project,
the following error will occur.


/**********************************************************************************************************************/

error LNK2019

The unresolved external symbol "void * __cdecl OPS_777 (void)" (? OPS_777 @@ YAPEAXXZ) is referenced by the function
"int __cdecl TclModelBuilderUniaxialMaterialCommand (void *, struct Tcl_Interp *, int, char const * *, class Domain *)"
(? TclModelBuilderUniaxialMaterialCommand @@ YAHPEAXPEAUTcl_Interp @@ HPEAPEBDPEAVDomain @@@ Z)

OpenSees C: \ Users \ *** \ Documents \ OpenSees-3.2.0 \ Win64 \ proj \ openSees
\ material.lib (TclModelBuilderUniaxialMaterialCommand.obj)

/**********************************************************************************************************************/


I would appreciate it if you could tell me how to compile successfully.
by shiro
Fri Jan 22, 2021 2:40 am
Forum: OpenSees.exe Users
Topic: About SAWSMaterial FORTRAN SUBROUTINE(HYSTR)
Replies: 0
Views: 6279

About SAWSMaterial FORTRAN SUBROUTINE(HYSTR)

I posted something I would like to ask.

In the SAWSMaterial.cpp file, it says that it was migrated from FORTRAN to C++.

I'm new to C++, so I'd like to study the original FORTRAN code.
Is the FORTRAN code published somewhere?

I've heard that OpenSees are related to DRAIN-DX(2D・3D).
I bought it in 2008 and it was the FORTRAN source code.

Are HYSTR subroutines included in DRAIN-DX(2D・3D) ?
I searched for it, but there was no such subroutine file.

I would appreciate your advice.


・SAWSMaterial.cpp


// The following has been converted from SAWS (originally written in
// FORTRAN by Bryan Folz), converted by Patxi Uriz 6/12/2006
/* -----------------------------------------------------------------------
* SUBROUTINE HYSTR CALCULATES THE FORCE-DISPLACEMENT RESPONSE
* BASED ON A MODIFIED STEWART HYSTERETIC MODEL. IN THIS MODEL THE
* ENVELOPE CURVE IS THE FOSCHI EXPONENTIAL CURVE WITH A LINEAR
* SOFTENING BRANCH. FORCE AND STIFFNESS ARE RETURNED FOR AN
* INPUTTED DISPLACEMENT.
*-----------------------------------------------------------------------
*/

Code Developed by: Patxi Uriz, Exponent (Converted from FORTRAN code originally written by Bryan Folz)


https://opensees.berkeley.edu/wiki/inde ... S_Material