extrude_with_macro_element_representation.cc File Reference

Classes

class  OscillatingCylinder
 Oscillating cylinder class. More...
 
class  ExtrudedMovingCylinderProblem< TWO_D_ELEMENT, THREE_D_ELEMENT >
 

Namespaces

 TanhSolnForPoisson
 Namespace for exact solution for Poisson equation with "sharp step".
 
 GlobalParameters
 Global parameters.
 

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...
 
void GlobalParameters::update_parameters ()
 Update parameters. More...
 
int main (int argc, char **argv)
 Constructor. More...
 

Variables

double TanhSolnForPoisson::Alpha =1.0
 Parameter for steepness of step. More...
 
double TanhSolnForPoisson::N_x =-1.0
 Orientation of non-normalised x-component of vector in plane direction. More...
 
double TanhSolnForPoisson::N_y =-1.0
 Orientation of non-normalised y-component of vector in plane direction. More...
 
double TanhSolnForPoisson::N_z =1.0
 Orientation of non-normalised z-component of vector in plane direction. More...
 
double TanhSolnForPoisson::X_0 =0.0
 Orientation (x-coordinate of step plane) More...
 
double TanhSolnForPoisson::Y_0 =0.0
 Orientation (y-coordinate of step plane) More...
 
double TanhSolnForPoisson::Z_0 =0.0
 Orientation (z-coordinate of step plane) More...
 
OscillatingCylinderGlobalParameters::Cylinder_pt =0
 ---------------------------------—TIME-INTEGRATION PARAMETERS---— More...
 
double GlobalParameters::Radius =0.5
 Radius of the cylinder. More...
 
double GlobalParameters::Amplitude =0.50
 Amplitude of the cylinder motion. More...
 
double GlobalParameters::Length_of_box =10.0
 ----------------------—Cylinder Properties----------------------— More...
 
double GlobalParameters::Length_z =1.0
 The length of the extruded mesh in the z-direction. More...
 
unsigned GlobalParameters::N_element_z =10
 Number of elements in the z-direction (in the extruded mesh) More...
 
unsigned GlobalParameters::N_uniform_refinement_before_solve =2
 Number of uniform refinements before any solve. More...
 
double GlobalParameters::Annular_region_radius =1.0
 The radius of the annular region surrounding the cylinder. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Constructor.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

Number of uniform refinements before any solve

616 {
617 #ifdef OOMPH_HAS_MPI
618  // Initialise MPI
619  MPI_Helpers::init(argc,argv);
620 
621  // Switch off output modifier
623 
624  // Switch off oomph_info output for all processors but rank 0
625  if (MPI_Helpers::communicator_pt()->my_rank()!=0)
626  {
628  OomphLibWarning::set_stream_pt(&oomph_nullstream);
629  OomphLibError::set_stream_pt(&oomph_nullstream);
630  }
631  else
632  {
633  oomph_info << "\n=====================================================\n"
634  << "Number of processors: "
635  << MPI_Helpers::communicator_pt()->nproc()
636  << "\n=====================================================\n"
637  << std::endl;
638  }
639 #endif
640  // Start the clock
641  double timer_s=TimingHelpers::timer();
642 
643  // Set the documentation directory
645 
646  // Typedef the element type
647  typedef RefineableQPoissonElement<2,2> ELEMENT;
648 
649  // Typedef the extruded element type
650  typedef RefineableQPoissonElement<3,2> EXTRUDED_ELEMENT;
651 
652  // Create Problem
655 
656  // Document the mesh
657  problem.newton_solve();
658 
659  // Document the mesh
660  problem.doc_solution();
661 
662  // Maximum number of adaptations
663  unsigned max_adapt=2;
664 
666  for (unsigned i=0; i<max_adapt; i++)
667  {
668  // Document the mesh
669  problem.adapt();
670 
671  // Document the mesh
672  problem.newton_solve();
673 
674  // Document the mesh
675  problem.doc_solution();
676  }
677 
678  // Tell the user we're done
679  oomph_info << "\nSimulation complete!\nTotal time for simulation [sec]: "
680  << TimingHelpers::timer()-timer_s << "\n" << std::endl;
681 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: extrude_with_macro_element_representation.cc:301
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
std::ostream *& stream_pt()
Access function for the stream pointer.
Definition: oomph_definitions.h:464
OutputModifier *& output_modifier_pt()
Access function for the output modifier pointer.
Definition: oomph_definitions.h:476
Definition: refineable_poisson_elements.h:193
DocInfo Doc_info
Helper for documenting.
Definition: extrude_triangle_generated_mesh.cc:57
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
Nullstream oomph_nullstream
Single (global) instantiation of the Nullstream.
Definition: oomph_definitions.cc:313
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
double timer
Definition: oomph_metis_from_parmetis_3.1.1/struct.h:210
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::default_output_modifier, GlobalParameters::Doc_info, TanhSolnForPoisson::get_source(), i, oomph::oomph_info, oomph::oomph_nullstream, oomph::OomphInfo::output_modifier_pt(), problem, oomph::DocInfo::set_directory(), and oomph::OomphInfo::stream_pt().