curved_facet_bounded_tetmesh.cc File Reference
#include <fenv.h>
#include "generic.h"
#include "poisson.h"
#include "meshes/triangle_mesh.h"
#include "meshes/tetgen_mesh.h"
#include "meshes/refineable_tetgen_mesh.h"
#include "meshes/gmsh_tet_mesh.h"
#include "tetmesh_faceted_surfaces.h"

Classes

class  TetmeshPoissonProblem< ELEMENT >
 Demo class solves Poisson problem using Gmsh mesh. More...
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 

Functions

int main (int argc, char *argv[])
 Driver. More...
 

Variables

double Global_Parameters::Box_half_width = 1.5
 (Half-)width of the box More...
 
double Global_Parameters::Box_half_length = 1.0
 (Half)height of the box More...
 
std::string Global_Parameters::Gmsh_command_line_invocation ="/home/mheil/gmesh/bin/bin/gmsh"
 Specify how to call gmsh from the command line. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver.

1122 {
1123 
1124  MPI_Helpers::init(argc,argv);
1125 
1126  // Store command line arguments
1127  CommandLineArgs::setup(argc,argv);
1128 
1129  // length of downstream region occupied by impedance elements
1130  CommandLineArgs::specify_command_line_flag("--suppress_bulk_output");
1131 
1132 #ifndef DO_TETGEN
1133 
1134  // Gmsh command line invocation
1136  ("--gmsh_command_line",
1138 
1139 #endif
1140 
1141  // Parse command line
1143 
1144  // Doc what has actually been specified on the command line
1146 
1147 #ifndef DO_TETGEN
1148 
1149  // Are you suicidal?
1150  if (!CommandLineArgs::command_line_flag_has_been_set("--gmsh_command_line"))
1151  {
1152  std::string error_msg
1153  ("You haven't specified how gmsh is invoked on the command line\n");
1154  error_msg += "on your computer, so I'll use the default\n\n" +
1156  + "\n\nwhich, unless you're mheil, is unlikely to work and I will "
1157  + "now die...\n";
1158  throw OomphLibError(error_msg,
1161  }
1162 
1163 #endif
1164 
1165  // Note that this can make tetgen die!
1166  //feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW);
1167 
1168  // Shut up prefix
1170 
1171  // Label for output
1172  DocInfo doc_info;
1173 
1174  // Output directory
1175  doc_info.set_directory("RESLT");
1176 
1177  // Number of output points per edge
1178  unsigned nplot=5;
1179 
1180  // Build problem
1183 
1184 
1185  //Output initial guess
1186  problem.doc_solution(nplot,doc_info);
1187  doc_info.number()++;
1188 
1189  unsigned max_adapt=1;
1190  for (unsigned i=0;i<=max_adapt;i++)
1191  {
1192  // Solve the bastard!
1193  problem.newton_solve();
1194 
1195  //Output solution
1196  problem.doc_solution(nplot,doc_info);
1197 
1198  // oomph_info << "tmp stop\n";
1199  // exit(0);
1200 
1201  //Increment counter for solutions
1202  doc_info.number()++;
1203 
1204  if (i!=max_adapt)
1205  {
1206  problem.adapt();
1207  }
1208  }
1209 
1210 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Demo class solves Poisson problem using Gmsh mesh.
Definition: curved_facet_bounded_tetmesh.cc:90
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
OutputModifier *& output_modifier_pt()
Access function for the output modifier pointer.
Definition: oomph_definitions.h:476
Definition: oomph_definitions.h:222
Poisson upgraded to become projectable.
Definition: poisson_elements.h:793
Definition: Tpoisson_elements.h:62
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
std::string Gmsh_command_line_invocation
Specify how to call gmsh from the command line.
Definition: curved_facet_bounded_tetmesh.cc:74
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
OutputModifier default_output_modifier
Single global instatiation of the default output modifier.
Definition: oomph_definitions.cc:325
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
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::command_line_flag_has_been_set(), oomph::default_output_modifier, oomph::CommandLineArgs::doc_specified_flags(), Global_Parameters::Gmsh_command_line_invocation, i, oomph::DocInfo::number(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::oomph_info, oomph::OomphInfo::output_modifier_pt(), oomph::CommandLineArgs::parse_and_assign(), problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and oomph::Global_string_for_annotation::string().