Select Git revision
Forked from
gmsh / gmsh
Source project has a limited visibility.
RNM.hpp 61.95 KiB
// ********** DO NOT REMOVE THIS BANNER **********
// ORIG-DATE: 29 fev 2000
// -*- Mode : c++ -*-
//
// SUMMARY : array modelisation
// USAGE : LGPL
// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
// AUTHOR : Frederic Hecht
// E-MAIL : frederic.hecht@ann.jussieu.fr
//
/*
Freefem++ is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
Freefem++ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Freefem++; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef KNM_H_
#define KNM_H_
// version march 2010 FH.
// add iterator for compatibility with gmm++
// ----------------------
// une tentative qui ne marche pas
// de tableau constant
#include <complex>
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cassert>
using namespace std;
#define const_R R
#include <cstdlib>
inline void Check_Kn(const char * str,const char * file,int line)
{
cerr << "CHECK_KN: " << str << " in file: " << file << ", line " << line <<endl;
assert(0);
abort();
}
#define K_bigassert(i) if (!(i)) Check_Kn(#i,__FILE__,__LINE__);
#define RNM_FATAL_ERROR(i) Check_Kn(i,__FILE__,__LINE__);
#ifdef CHECK_KN
#define K_throwassert(i) if (!(i)) Check_Kn(#i,__FILE__,__LINE__);
#else
#define K_throwassert(i)
#endif
// version du 29 fev 2000
// correction for (... lj++,ui++ qui apelle le produit scalaire
// petite correction throwassert
// ajoute de operateur /= et *= sur des vecteurs
// suppression de constructeur qui pose de probleme