unstructured_two_d_circle.cc File Reference
#include "generic.h"
#include "darcy.h"
#include "meshes/triangle_mesh.h"

Classes

class  DarcyProblem< ELEMENT >
 Darcy problem. More...
 

Namespaces

 TestProblem
 Namespace for exact solution and problem parameters.
 

Functions

void TestProblem::source (const Vector< double > &x, Vector< double > &f)
 Source function. More...
 
void TestProblem::mass_source (const Vector< double > &x, double &m)
 Mass source. More...
 
void TestProblem::boundary_pressure (const double &time, const Vector< double > &x, const Vector< double > &n, double &result)
 Pressure around the boundary of the domain. More...
 
void TestProblem::exact_soln (const Vector< double > &x, Vector< double > &soln)
 Exact solution: q1,q2,div_q,p. More...
 
template<class ELEMENT >
void TestProblem::edge_sign_setup (Mesh *mesh_pt)
 
int main (int argc, char **argv)
 Driver code for Darcy test problem. More...
 

Variables

bool TestProblem::Use_point_source_solution =false
 
double TestProblem::Mass_source_strength =1000.0
 Mass source strength. More...
 
double TestProblem::Mass_source_decay_exponent =50.0
 Mass source strength. More...
 
double TestProblem::Element_area =0.01
 Target element area for Triangle. More...
 
std::string TestProblem::Directory ="RESLT"
 The directory in which the solution is output. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver code for Darcy test problem.

879 {
880  // Store command line arguments
881  CommandLineArgs::setup(argc,argv);
882 
883  // Define possible command line arguments and parse the ones that
884  // were actually specified
885 
886  // Output directory
889 
890  // Specify target element area
893 
894 
895 // Use "point" mass source
896  CommandLineArgs::specify_command_line_flag("--point_mass_source");
897 
898 
899 // Doc shape functions etc then quit
900  CommandLineArgs::specify_command_line_flag("--doc_shape_functions");
901 
902  // Parse command line
904 
905  // Doc what has actually been specified on the command line
907 
908 
909  // Doc the shape functions -- use smaller target area
910  if (CommandLineArgs::command_line_flag_has_been_set("--doc_shape_functions"))
911  {
912  oomph_info << "Overwriting element area for doc of shape functions\n";
914  }
915 
916  // Use point mass source?
917  if (CommandLineArgs::command_line_flag_has_been_set("--point_mass_source"))
918  {
919  oomph_info << "Using point mass source\n";
921  }
922 
923 #ifdef ADAPTIVE
924 
925  // Create problem
927 
928 #else
929 
930  // Create problem
932 
933 #endif
934 
935  // Output initial guess for solution
936  problem.doc_solution(0);
937 
938  // Doc the shape functions
939  if (CommandLineArgs::command_line_flag_has_been_set("--doc_shape_functions"))
940  {
941  problem.doc_shape_functions();
942  exit(0);
943  }
944 
945 #ifdef ADAPTIVE
946 
947  // Max. number of adaptations
948  unsigned max_adapt=1;
950  {
951  max_adapt=3;
952  }
953 
954  // Solve the problem with the adaptive Newton's method, allowing
955  // up to max_adapt mesh adaptations after every solve.
956  problem.newton_solve(max_adapt);
957 
958 #else
959 
960  // Solve
961  problem.newton_solve();
962 
963 #endif
964 
965  // Doc result
966  problem.doc_solution(1);
967 
968  return 0;
969 }
Darcy problem.
Definition: unstructured_two_d_circle.cc:186
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double Element_area
Target element area for Triangle.
Definition: unstructured_two_d_circle.cc:126
bool Use_point_source_solution
Definition: unstructured_two_d_circle.cc:43
std::string Directory
The directory in which the solution is output.
Definition: unstructured_two_d_circle.cc:129
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
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::command_line_flag_has_been_set(), TestProblem::Directory, oomph::CommandLineArgs::doc_specified_flags(), TestProblem::Element_area, oomph::oomph_info, oomph::CommandLineArgs::parse_and_assign(), problem, oomph::CommandLineArgs::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and TestProblem::Use_point_source_solution.