HyperHDG
Namespaces | Macros
tpp_assert.hxx File Reference

This file provides the function tpp_assert. More...

#include <iostream>
Include dependency graph for tpp_assert.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 TPP
 Contains the functionalities to evaluate and integrate tensor product type polynomials.
 

Macros

#define tpp_assert(Expr, Msg)   __TPP_Assert(#Expr, Expr, __FILE__, __LINE__, Msg)
 The assertion to be used within tpp — deactivate using -DNDEBUG compile flag. More...
 

Detailed Description

This file provides the function tpp_assert.


This is a wrapper file to provide a function that allows to use assertions that are similar to those provided by cassert. That is, we define a macro tpp_assert that implements assert. If a user wants to use assertions, it is recommended to use tpp_assert(Expr, Msg). The use of the function __TPP_Assert is not recommended.

Whether this functionality is active or not can be deduced via setting NDEBUG, when the code is compiled. Using this functionality makes your program significantly slower. However, usage is highly recommended for testing.

Authors
Andreas Rupp, Heidelberg University, 2021.

Macro Definition Documentation

◆ tpp_assert

#define tpp_assert (   Expr,
  Msg 
)    __TPP_Assert(#Expr, Expr, __FILE__, __LINE__, Msg)

The assertion to be used within tpp — deactivate using -DNDEBUG compile flag.


Parameters
ExprC++ Expression that can be evaluated to true or false.
MsgMessage that is to be displayed if Expr is evaluated to false.