prescribed_displ_lagr_mult_precond.cc File Reference

Classes

class  oomph::PseudoElasticBulkElement< ELEMENT >
 
class  oomph::FaceGeometry< PseudoElasticBulkElement< ELEMENT > >
 FaceGeometry of wrapped element is the same as the underlying element. More...
 
class  FiniteElementComp
 
class  WarpedLine
 Warped line in 2D space. More...
 
class  PrescribedBoundaryDisplacementProblem< ELEMENT >
 

Namespaces

 oomph
 DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
 
 DiagonalPreconditionerHelper
 
 Global_Physical_Variables
 Global variables.
 

Functions

PreconditionerDiagonalPreconditionerHelper::get_diagonal_preconditioner ()
 
int main (int argc, char *argv[])
 Driver code. More...
 

Variables

WarpedLine Global_Physical_Variables::Boundary_geom_object (0.0)
 GeomObject specifying the shape of the boundary: Initially it's flat. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code.

712 {
713 
714 
715 #ifdef OOMPH_HAS_MPI
716 
717  // Start up mpi if oomph-lib has been compiled with parallel support
718  // because parallel versions of trilinos and hypre which are then called
719  // by default) need it.
720  MPI_Helpers::init(argc,argv,false);
721 
722 #endif
723 
724  // Store command line arguments
725  CommandLineArgs::setup(argc,argv);
726 
727  // Define possible command line arguments and parse the ones that
728  // were actually specified
729 
730  // Number of elements along axes
731  unsigned nel_1d=5;
732  CommandLineArgs::specify_command_line_flag("--nel_1d",&nel_1d);
733 
734  // Suppress adaptation (for study of iteration count vs uniform mesh
735  // refinement, say)
737 
738  // Use block upper triangular preconditioner for elasticity block
739  CommandLineArgs::specify_command_line_flag("--block_upper_for_elastic_block");
740 
741  // Use Hypre as subsidiary preconditioner (inexact solver) for
742  // linear (sub-)systems to be solved in the elastic block?
743  CommandLineArgs::specify_command_line_flag("--hypre_for_elastic_blocks");
744 
745  // Use Trilinos CG as subsidiary preconditioner (inexact solver) for
746  // linear (sub-)systems to be solved in the Lagrange multiplier block?
748  ("--trilinos_cg_for_lagrange_multiplier_blocks");
749 
750  // Use diagonal scaling as subsidiary preconditioner (inexact solver) for
751  // linear (sub-)systems to be solved in the elastic block?
752  // [only used for exercise]
754  ("--diagonal_scaling_for_elastic_blocks");
755 
756  // Parse command line
758 
759  // Doc what has actually been specified on the command line
761 
762  //Set up the problem with specified number of elements along axes.
765 
766  // Doc initial domain shape
767  problem.doc_solution();
768 
769  // Max. number of adaptations per solve
770  unsigned max_adapt=1;
772  {
773  max_adapt=0;
774  }
775 
776  //Parameter incrementation
777  unsigned nstep=2;
778  for(unsigned i=0;i<nstep;i++)
779  {
780  // Increment imposed boundary displacement
782 
783  // Solve the problem with Newton's method, allowing
784  // up to max_adapt mesh adaptations after every solve.
785  problem.newton_solve(max_adapt);
786 
787  // Doc solution
788  problem.doc_solution();
789 
790  // For maximum stability: Reset the current nodal positions to be
791  // the "stress-free" ones -- this assignment means that the
792  // parameter study no longer corresponds to a physical experiment
793  // but is what we'd do if we wanted to use the solid solve
794  // to update a fluid mesh in an FSI problem, say.
795  problem.solid_mesh_pt()->set_lagrangian_nodal_coordinates();
796 
797  }
798 
799 } //end of main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: mpi/distribution/prescribed_displ_lagr_mult/prescribed_displ_lagr_mult.cc:159
double & ampl()
Access to amplitude.
Definition: heated_linear_solid_contact_with_gravity.cc:2066
Definition: interaction/pseudo_solid_collapsible_tube/pseudo_solid_collapsible_tube.cc:55
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
WarpedLine Boundary_geom_object(0.0)
GeomObject specifying the shape of the boundary: Initially it's flat.
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
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References WarpedLine::ampl(), Global_Physical_Variables::Boundary_geom_object, oomph::CommandLineArgs::command_line_flag_has_been_set(), oomph::CommandLineArgs::doc_specified_flags(), i, oomph::CommandLineArgs::parse_and_assign(), problem, Flag_definition::setup(), and oomph::CommandLineArgs::specify_command_line_flag().