oomph::ObsoleteCode Namespace Reference

Namespace for flagging up obsolete parts of the code. More...

Functions

void obsolete ()
 Output warning message. More...
 
void obsolete (const std::string &message)
 Ouput a warning message with a string argument. More...
 

Variables

bool FlagObsoleteCode = true
 Flag up obsolete parts of the code. More...
 

Detailed Description

Namespace for flagging up obsolete parts of the code.

Function Documentation

◆ obsolete() [1/2]

void oomph::ObsoleteCode::obsolete ( )

Output warning message.

1103  {
1104  if (FlagObsoleteCode)
1105  {
1106  std::string junk;
1107  oomph_info << "\n\n--------------------------------------------\n";
1108  oomph_info << "You are using obsolete code " << std::endl;
1109  oomph_info << "--------------------------------------------\n\n";
1110  oomph_info << "Enter: \"s\" to suppress further messages" << std::endl;
1111  oomph_info << " \"k\" to crash the code to allow a trace back in "
1112  "the debugger"
1113  << std::endl;
1114 
1115  oomph_info << " any other key to continue\n \n";
1116  oomph_info << " [Note: Insert \n \n ";
1117  oomph_info << " "
1118  "ObsoleteCode::FlagObsoleteCode=false;\n \n";
1119  oomph_info << " into your code to suppress these "
1120  "messages \n";
1121  oomph_info << " altogether.] \n";
1122 
1123  std::cin >> junk;
1124  if (junk == "s")
1125  {
1126  FlagObsoleteCode = false;
1127  }
1128  if (junk == "k")
1129  {
1130  throw OomphLibError(
1132  }
1133  }
1134  }
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
bool FlagObsoleteCode
Flag up obsolete parts of the code.
Definition: oomph_utilities.cc:1099
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References FlagObsoleteCode, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, and oomph::Global_string_for_annotation::string().

Referenced by obsolete(), and oomph::Preconditioner::setup().

◆ obsolete() [2/2]

void oomph::ObsoleteCode::obsolete ( const std::string &  message)

Ouput a warning message with a string argument.

1139  {
1140  if (FlagObsoleteCode)
1141  {
1142  oomph_info << "\n\n------------------------------------" << std::endl;
1143  oomph_info << message << std::endl;
1144  oomph_info << "----------------------------------------" << std::endl;
1145 
1146  obsolete();
1147  }
1148  }
void obsolete(const std::string &message)
Ouput a warning message with a string argument.
Definition: oomph_utilities.cc:1138

References FlagObsoleteCode, obsolete(), and oomph::oomph_info.

Variable Documentation

◆ FlagObsoleteCode

bool oomph::ObsoleteCode::FlagObsoleteCode = true

Flag up obsolete parts of the code.

Referenced by obsolete().