Hello all,

This is more of a discussion than a question.

I was wondering if there is a need for a new class which does something 
like Assert (Lets call it myAssert for now). Its function is as defined 
below.

While developing an application code, once I am confident that I am not 
making a mistake using any of the deal.ii functions (no Asserts are 
triggered), I switch to release mode.However, there can still be bugs in my 
own code: physical  or just programming based.

So, lets say my code is bug free from deal.ii point of view (No internal 
Asserts), I want to find a problem in my own code. 
Lets say that I want to find when in time does a variable become negative 
and why?


I dont want to use Assert as it causes huge overhead which is not needed at 
the moment. So, the best thing would be to run code in release mode
and use AssertThrow or print commands to find source of error. Now, once 
the bug is fixed, all the manual Asserthrow needs to be removed or 
commented. If they are ever needed again, they need to be uncommented again 
and this could span several files.

So, my point is if there is a new class "myAssert" that can function just 
like Assert but in release mode.

One solution could be having a new mode : like *debug* and *release*,  "
*Moderate*" mode, where only user-defined myAsserts + AsserThrow will be 
checked.

*So when build in moderate mode*:  myAssert (+ Asserthrow) would work like 
"Assert". This is just to avoid huge overhead that debug mode will cause 
because of all internal checks.

*When built in release mode*: No myAssert would be checked. (AssertThrow 
will still be active).

The other way to thing about this is to have a new mode "*Mode 3*": where 
no Asserts or AssertThrow will be checked. In this case, AssertThrow 
behaves as "myAssert" class.

At the moment, I am not sure if that would be helpful to everyone or not 
but I am certainly interested in something like that.
If there exists something like that in deal.ii currenlty, please let me 
know. 

Thanks.




-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to