Skipping line from unknown reason

Hello.

I have modified one of the C++ Openfoam's libraries. Everything compiles well, without errors. However, when I run program, it brakes with error. When I use debugger, I find that program skips command that I desperately need.
Here is the problematic block. Last line of the block is skipped from unknown reason to me.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
     {
        // Update momentum transfer
        td.cloud().UTrans()[cellI] += np0*dUTrans;

        // Update momentum transfer coefficient
        td.cloud().UCoeff()[cellI] += np0*Spu;
	
        // Update momentum transfer
        td.cloud().SumUTrans()[cellI] += np0*dUTrans;

        // Update momentum transfer coefficient
        td.cloud().SumUCoeff()[cellI] += np0*Spu;
	
	 // Update TKE - & inner product
        td.cloud().SourceTKEkepsilon()[cellI] += np0*(dUTrans & UTurb_);
	
         // Update source for Reynolds stress transport equation - * tensor 
         // product
	
	td.cloud().SourceTKELRR()[cellI] += np0*(twoSymm(UTurb_*dUTrans));

    }




The most important files with necessary information can be downloaded from here

https://www.dropbox.com/s/vu2azs65qgf5rbr/KinematicParcel.zip?dl=0



Any suggestion is appreciated. I've been trying whole day to find the error without success.

Darko
Last edited on
How do you know it's skipped?
In debugger I can put temporary break point and than there is an option step into.
I can do this for every line except for the last.
When I try to enter into the last command, it transfers me to the following block. The result of successful command should be one saved file, like for the other commands before this last problematic.
These commands are similar, but there is something that misses me.
is the previous funciton throwing an exception? That would cause the final function not to be executed.

I would also put a

cout << "End reached" << endl;

on line 21, to be absolutely sure. Stepping into functions with a debugger is not flawless.
I put info like you said, compiled library, run program and nothing happened. I did the same thing for lines before last problematic line, and again nothing happened.

Problem was that I compiled only library, and I thought that was enough. I had to compile whole program again.

Now it works.

Thank you so much! I am very, very grateful to you.

Best wishes,
Darko
Topic archived. No new replies allowed.