Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Challenging program, easy solution?

$
0
0

Hi everyone, I'm having some issues with a very large and complex program. I'm working with very little steps of time and I have to do more or less like 600.000 iterations to get a good result. The problem is that I'm working with matrices and at the end of the program I get results of the different variables wich are displacement, speed, acceleration and force in a vector that contains 3 components for each iteration that represents the displacements, speed... of 3 masses. I want to represent these results and I need to get for each step of time the result of the correspondent vector.

 

Actually the program does what I want (take it as an exmple of what I want to obtain) but in a very inneficient way, it trasnpose the big matrix and extracts each element of it, and creates a new vector with these elements, but it doesn't allow me to increase the numbers of iterarions needed to solve the problem because my computer runs out of memory in that step.

 

So, finally, please don't pay much attention on the rest of the code, (if you don't want) and please take into account what I've said. There has to be a way to get the elements of the matrices in some other more efficient way.

 

In summary. 1st don't be scared, there are only 2 things to check.

 

I need nf to be 600.000 (changing the number is easy, be able to get a result changing it, is the challenging part)

 

nf.jpg

And change this part of the code, to make the same, but more efficiently.

 

trasnp.jpg

 

 

THX in advance. Sorry for my grammar, spelling, etc. I'm not a native english speaker.


Viewing all articles
Browse latest Browse all 12488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>