planar_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::Initial_element_volume =1.0
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver.

795 {
796 
797  MPI_Helpers::init(argc,argv);
798 
799  // Store command line arguments
800  CommandLineArgs::setup(argc,argv);
801 
802  // Suppress bulk output
803  CommandLineArgs::specify_command_line_flag("--suppress_bulk_output");
804 
805 #ifndef DO_TETGEN
806 
807  // Gmsh command line invocation
809  ("--gmsh_command_line",
811 
812 #endif
813 
814  // Parse command line
816 
817  // Doc what has actually been specified on the command line
819 
820 #ifndef DO_TETGEN
821 
822  // Are you suicidal?
823  if (!CommandLineArgs::command_line_flag_has_been_set("--gmsh_command_line"))
824  {
825  std::string error_msg
826  ("You haven't specified how gmsh is invoked on the command line\n");
827  error_msg += "on your computer, so I'll use the default\n\n" +
829  + "\n\nwhich, unless you're mheil, is unlikely to work and I will "
830  + "now die...\n";
831  throw OomphLibError(error_msg,
834  }
835 
836 #endif
837 
838  // Note that this can make tetgen die!
839  //feenableexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW);
840 
841  // Shut up prefix
843 
844  // Label for output
845  DocInfo doc_info;
846 
847  // Output directory
848  doc_info.set_directory("RESLT");
849 
850  // Number of output points per edge
851  unsigned nplot=5;
852 
853  // Build problem
856 
857 
858  //Output initial guess
859  problem.doc_solution(nplot,doc_info);
860  doc_info.number()++;
861 
862  unsigned max_adapt=1;
863  for (unsigned i=0;i<=max_adapt;i++)
864  {
865  // Solve the bastard!
866  problem.newton_solve();
867 
868  //Output solution
869  problem.doc_solution(nplot,doc_info);
870 
871  //Increment counter for solutions
872  doc_info.number()++;
873 
874  if (i!=max_adapt)
875  {
876  problem.adapt();
877  }
878  }
879 
880 }
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().