octree_test.cc File Reference
#include "generic.h"
#include "poisson.h"
#include "meshes/simple_cubic_mesh.h"

Classes

class  oomph::Rotateable< ELEMENT >
 
class  oomph::RotatableRefineableCubicMesh< ELEMENT >
 
class  TestPoissonProblem< ELEMENT >
 Poisson problem on rotatable, refineable cubic brick mesh. More...
 

Namespaces

 oomph
 DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
 
 TanhSolnForPoisson
 Namespace for exact solution for Poisson equation with "sharp step".
 

Functions

void TanhSolnForPoisson::get_exact_u (const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector. More...
 
void TanhSolnForPoisson::get_exact_u (const Vector< double > &x, double &u)
 Exact solution as a scalar. More...
 
void TanhSolnForPoisson::get_source (const Vector< double > &x, double &source)
 Source function to make it an exact solution. More...
 
int main (int argc, char *argv[])
 Driver code. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code.

964 {
965 
966  // Save command line arguments
967  CommandLineArgs::setup(argc,argv);
968 
969  // Write header to trace file and close (also wipes any existing ones
970  ofstream trace_file("trace.dat");
971  trace_file << "rotation_index rotated_element success_flag" << std::endl;
972  trace_file.close();
973 
974  // Create label for output
975  //------------------------
976  DocInfo doc_info;
977 
978  // Set output directory
979  doc_info.set_directory("RESLT");
980 
981  // Step number
982  doc_info.number()=0;
983 
984  //Set up the problems and doc
985  //---------------------------
986 
987  // Loop over rotations
988  for(unsigned r=1;r<24;r++)
989  {
990  // Loop over elements that are rotated
991  for(unsigned rotated_element=0;rotated_element<27;rotated_element++)
992  {
993 
994  std::cout << "Case: r, rotated_element"
995  << r << " " << rotated_element << std::endl;
996 
997  //Create the problem with rotation r for element rotated_element
999  problem(r,rotated_element,&TanhSolnForPoisson::get_source);
1000 
1001  //Output the solution
1002  problem.doc_solution(doc_info);
1003 
1004  doc_info.number()++;
1005 
1006  // We're not interested in the solution...
1007 // problem.newton_solve();
1008 
1009  }
1010  }
1011 }
Poisson problem on rotatable, refineable cubic brick mesh.
Definition: octree_test.cc:530
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
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
void get_source(const Vector< double > &x, double &source)
Source function to make it an exact solution.
Definition: extrude_with_macro_element_representation.cc:224
r
Definition: UniformPSDSelfTest.py:20
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References TanhSolnForPoisson::get_source(), oomph::DocInfo::number(), problem, UniformPSDSelfTest::r, oomph::DocInfo::set_directory(), and Flag_definition::setup().