State variable name

Report and track bugs

State variable name

Postby vorelj » Tue Mar 22, 2016 6:28 pm

Hi,
I have some problem with assigning the state variable names and their output.

If I use:
setTnsrSV(1, "XX-Stress", "stress");

to assign the variable name and then ask for the history output as
hx-PRTC 1 sv 1

it doesn't output the name at all, but this name is assigned to the output:
hx-PRTC 1 sv 2

Therefore, it is shifted by value 1.
How is it possible, can you please check it? How is the standard function: virtual string getHxStVarLabel(int) const; defined? Do I need to overload it to get the correct behavior?

Thx,
Honza

PS. To make sure I attached the input file too for the microplane M7

cubeM7.mrs
Attachments
cubeM7.mrs
inputFile
(2.23 KiB) Downloaded 834 times
vorelj
 
Posts: 12
Joined: Tue Mar 22, 2016 5:45 pm

Re: State variable name

Postby ES3 » Wed Mar 23, 2016 6:26 am

The bug is fixed in version 2016.1.00.

The index of state variables starts from 1.

Therefore,
Code: Select all
setTnsrSV(1, "XX-Stress", "stress");
and
Code: Select all
hx-PRTC 1 sv 1
are the correct.
ES3
 
Posts: 42
Joined: Thu Jul 09, 2015 9:36 pm

Re: State variable name

Postby vorelj » Wed Mar 23, 2016 8:51 am

Thx for the change, but this version doesn't work with the git version of Mars. There are some changes which are not reflected in the git library

Honza
vorelj
 
Posts: 12
Joined: Tue Mar 22, 2016 5:45 pm

Re: State variable name

Postby vorelj » Wed Mar 23, 2016 9:03 am

I pushed new version of numerical.cpp to the git library. This should fix the problem caused by the new version of mars

Honza
vorelj
 
Posts: 12
Joined: Tue Mar 22, 2016 5:45 pm

Re: State variable name

Postby ES3 » Wed Mar 23, 2016 2:44 pm

vorelj wrote:Thx for the change, but this version doesn't work with the git version of Mars. There are some changes which are not reflected in the git library

Honza


The new version was tested on MARS-UD-100, it does give the correct labels in the hime history file. Did you check the time history file and not giving your correct labels?
ES3
 
Posts: 42
Joined: Thu Jul 09, 2015 9:36 pm

Re: State variable name

Postby ES3 » Wed Mar 23, 2016 2:49 pm

vorelj wrote:I pushed new version of numerical.cpp to the git library. This should fix the problem caused by the new version of mars

Honza


You should not directly include numerical.cpp into your project. It is intended for your reference to see how things are done.

numerical.cpp is irrelevant to the bug you are reporting.
ES3
 
Posts: 42
Joined: Thu Jul 09, 2015 9:36 pm

Re: State variable name

Postby vorelj » Wed Mar 23, 2016 3:08 pm

ES3 wrote:
vorelj wrote:I pushed new version of numerical.cpp to the git library. This should fix the problem caused by the new version of mars

Honza


You should not directly include numerical.cpp into your project. It is intended for your reference to see how things are done.

numerical.cpp is irrelevant to the bug you are reporting.


It is irrelevant to the bug, but not to the update u did to fix the bug. The new mars.h omits some of the functions previously defined in numerical.cpp. And if it shouldn't be included why it is in the "lib" folder. In that case,move it into the folder unused (the same should be probably applied to materials.cpp as well). Why do you place unused files into the source folders? And if this shouldn't be used where can we find the promised mathematical functions?

Regards,
Honza
vorelj
 
Posts: 12
Joined: Tue Mar 22, 2016 5:45 pm

Re: State variable name

Postby zhouxinwei » Wed Mar 23, 2016 3:18 pm

vorelj wrote:
ES3 wrote:
vorelj wrote:I pushed new version of numerical.cpp to the git library. This should fix the problem caused by the new version of mars

Honza


You should not directly include numerical.cpp into your project. It is intended for your reference to see how things are done.

numerical.cpp is irrelevant to the bug you are reporting.


It is irrelevant to the bug, but not to the update u did to fix the bug. The new mars.h omits some of the functions previously defined in numerical.cpp. And if it shouldn't be included why it is in the "lib" folder. In that case,move it into the folder unused (the same should be probably applied to materials.cpp as well). Why do you place unused files into the source folders? And if this shouldn't be used where can we find the promised mathematical functions?

Regards,
Honza



mars.h and MARS libraries should be used together from the package you download from our server, I guess you already know that, then you don't need to make any changes in your code.

You don't need to change anything in your numerical.cpp, because it should not be included in your project. I am saying you just use the functions in it, but not include the file itself into your project, which of course will cause conflicts.

Xinwei
zhouxinwei
 
Posts: 208
Joined: Thu Jul 09, 2015 7:12 pm

Re: State variable name

Postby zhouxinwei » Wed Mar 23, 2016 3:28 pm

vorelj wrote:
ES3 wrote:
vorelj wrote:I pushed new version of numerical.cpp to the git library. This should fix the problem caused by the new version of mars

Honza


You should not directly include numerical.cpp into your project. It is intended for your reference to see how things are done.

numerical.cpp is irrelevant to the bug you are reporting.


It is irrelevant to the bug, but not to the update u did to fix the bug. The new mars.h omits some of the functions previously defined in numerical.cpp. And if it shouldn't be included why it is in the "lib" folder. In that case,move it into the folder unused (the same should be probably applied to materials.cpp as well). Why do you place unused files into the source folders? And if this shouldn't be used where can we find the promised mathematical functions?

Regards,
Honza


Did I put unused folder into the repository?

We shouldn't include the unused files into the tracking repository in the first place.

If some one wants to keep the unused files for his/her reference, he/she should keep such files locally and use .gitignore to remove them from Git.

Xinwei
zhouxinwei
 
Posts: 208
Joined: Thu Jul 09, 2015 7:12 pm

Re: State variable name

Postby vorelj » Wed Mar 23, 2016 3:30 pm

zhouxinwei wrote:
vorelj wrote:
ES3 wrote:I pushed new version of numerical.cpp to the git library. This should fix the problem caused by the new version of mars

Honza

You should not directly include numerical.cpp into your project. It is intended for your reference to see how things are done.

numerical.cpp is irrelevant to the bug you are reporting.


It is irrelevant to the bug, but not to the update u did to fix the bug. The new mars.h omits some of the functions previously defined in numerical.cpp. And if it shouldn't be included why it is in the "lib" folder. In that case,move it into the folder unused (the same should be probably applied to materials.cpp as well). Why do you place unused files into the source folders? And if this shouldn't be used where can we find the promised mathematical functions?

Regards,
Honza



mars.h and MARS libraries should be used together from the package you download from our server, I guess you already know that, then you don't need to make any changes in your code.

You don't need to change anything in your numerical.cpp, because it should not be included in your project. I am saying you just use the functions in it, but not include the file itself into your project, which of course will cause conflicts.

Xinwei


I got it, but my issues are:
1) Why do we have them (numerical.cpp, materials.cpp) in the source folder, place it into the "unused" folder, so it is clear that they are not part of the project
2) If they are not used and you wanted to convince us to use your math libraries then there should be some file which can be extended (adjusted, updated) by any user and where you place the functions you typically use. Or are the functions included in numerical.cpp all the functions you have for the vector, tensor, etc. operations?
3) numerical.cpp is still included in mars.pro

Regards,
Honza
vorelj
 
Posts: 12
Joined: Tue Mar 22, 2016 5:45 pm

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests

cron