source: issm/trunk-jpl-damage/src/c/shared/Numerics/Verbosity.cpp@ 11417

Last change on this file since 11417 was 11417, checked in by cborstad, 13 years ago

merged src changes 11330:11410 from trunk-jpl

File size: 1.8 KB
RevLine 
[6310]1/*
2* \file Verbosity.cpp:
3* \brief: Manage verbosity levels
4*
5* WARNING: DO NOT MODIFY THIS FILE
6* this file has been automatically generated by Synchronize.sh
7* Please read README for more information
8*/
[6301]9
[6273]10/*include*/
[6310]11/*{{{*/
[6301]12#ifdef HAVE_CONFIG_H
[9320]13 #include <config.h>
[6301]14#else
15#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
16#endif
[6273]17#include "./Verbosity.h"
[6301]18#include "../../include/macros.h"
19#include "../Exceptions/exceptions.h"
20#ifdef _SERIAL_
21#include <mex.h>
22#endif
23/*}}}*/
[6273]24
[6301]25/*Verbosityt levels*/
[6323]26bool VerboseMProcessor(void){return (GetVerbosityLevel() & 1);} /* 2^0*/
27bool VerboseModule(void){return (GetVerbosityLevel() & 2);} /* 2^1*/
28bool VerboseSolution(void){return (GetVerbosityLevel() & 4);} /* 2^2*/
[6317]29bool VerboseSolver(void){return (GetVerbosityLevel() & 8);} /* 2^3*/
[6323]30bool VerboseConvergence(void){return (GetVerbosityLevel() & 16);} /* 2^4*/
31bool VerboseControl(void){return (GetVerbosityLevel() & 32);} /* 2^5*/
32bool VerboseQmu(void){return (GetVerbosityLevel() & 64);} /* 2^6*/
[6273]33
[6301]34/*Verbosity Setup*/
35static int verbositylevel=-1;
[6310]36/*FUNCTION SetVerbosityLevel {{{*/
[6301]37void SetVerbosityLevel(int level){
38
[6412]39 if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
[6301]40
41#ifdef _SERIAL_
42
43 mxArray* output=NULL;
44 mxArray* input=NULL;
45 input=mxCreateDoubleScalar((double)level);
46
47 mexCallMATLAB(0,&output,1,&input,"SetVerbosityLevel");
48#else
49
50 verbositylevel = level;
51
52#endif
53}/*}}}*/
[6310]54/*FUNCTION GetVerbosityLevel {{{*/
[6301]55int GetVerbosityLevel(void){
56#ifdef _SERIAL_
57
58 mxArray* output=NULL;
59 mxArray* input=NULL;
60 double level;
61
62 mexCallMATLAB(1,&output,0,&input,"GetVerbosityLevel");
63 level=mxGetScalar(output);
64
65 verbositylevel = (int)level;
[11417]66 return verbositylevel;
[6301]67
68#else
69
[6412]70 _assert_(verbositylevel>=0);
[6301]71 return verbositylevel;
72
73#endif
74}/*}}}*/
Note: See TracBrowser for help on using the repository browser.