solid_contact.cc File Reference
#include <fenv.h>
#include "generic.h"
#include "solid.h"
#include "meshes/triangle_mesh.h"
#include "contact_elements.h"

Classes

class  ContactProblem< ELEMENT >
 Problem class. More...
 

Namespaces

 ProblemParameters
 Namespace for exact solution and problem parameters.
 

Functions

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

Variables

double ProblemParameters::Y_c_max =0.0
 Initial/max y-position. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code.

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

611 {
612 
613  FiniteElement::Accept_negative_jacobian=true;
614 
615  // Store command line arguments
616  CommandLineArgs::setup(argc,argv);
617 
618  // Define possible command line arguments and parse the ones that
619  // were actually specified
620 
621  // Suppress adaptation
623 
624  // Initial element size
627 
628  // Resolve after adaptation
629  // hierher CommandLineArgs::specify_command_line_flag("--resolve_after_adapt");
630 
631  // Suppress adaptation
633 
634  // Parse command line
636 
637  // Doc what has actually been specified on the command line
639 
640  // Create generalised Hookean constitutive equations
643 
644  // Define centre of penetrator
645  ProblemParameters::Centre.resize(2);
648 
649  // Initial/max y-position: Lift off the surface by a bit...
651 
652  // Create penetrator
656 
657  // Build problem
659 
660  //Output initial condition
661  problem.doc_solution();
662 
663  unsigned max_adapt=1;
665  {
666  max_adapt=0;
667  }
668 
669 
670  // Number of parameter increments per period
671  unsigned nstep_for_period=40; // 100;
672 
673  // Parameter variation
674  unsigned nperiod=3;
675 
676  // Initial timestep
677  double dt=1.0/double(nstep_for_period);
678 
679  // Initialise timestep -- also sets the weights for all timesteppers
680  // in the problem.
681  problem.initialise_dt(dt);
682 
683 
684  double t_max=double(nperiod);
686  {
687  t_max=10.0*dt;
688  }
689 
690 
691  //while (ProblemParameters::Centre[1]>1.08)
692  while (problem.time_pt()->time()<t_max)
693  {
694  // Dummy double adaptivity (timestep is always accepted because
695  // tolerance is set to huge value; mainly used to automatically
696  // re-solve with smaller timestep increment after non-convergence
697  double epsilon_t=DBL_MAX;
698  bool first=false;
699  unsigned suppress_resolve_after_spatial_adapt_flag=1;
700  if (CommandLineArgs::command_line_flag_has_been_set("--resolve_after_adapt"))
701  {
702  suppress_resolve_after_spatial_adapt_flag=0;
703  }
704 
705  // hierher
706  suppress_resolve_after_spatial_adapt_flag=0;
707 
708  double next_dt=
709  problem.doubly_adaptive_unsteady_newton_solve(
710  dt,
711  epsilon_t,
712  max_adapt,
713  suppress_resolve_after_spatial_adapt_flag,
714  first);
715  dt = next_dt;
716 
717  //Output solution
718  problem.doc_solution();
719  }
720 
721 
722 } // end of main
Problem class.
Definition: heated_linear_solid_contact_with_gravity.cc:2892
Penetrator – here implemented as a circle.
Definition: contact_elements.h:249
Definition: constitutive_laws.h:699
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
Penetrator * Penetrator_pt
Penetrator.
Definition: circular_boulder_melt.cc:88
double El_area
Initial/max element area.
Definition: heated_linear_solid_contact_with_gravity.cc:2857
Vector< double > Centre
Position of centre of penetrator.
Definition: circular_boulder_melt.cc:85
double Radius
Radius of penetrator.
Definition: circular_boulder_melt.cc:79
double Y_c_max
Initial/max y-position.
Definition: solid_contact.cc:80
double Nu
Poisson's ratio.
Definition: unstructured_two_d_curved.cc:65
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
Definition: circular_boulder_melt.cc:76
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 ProblemParameters::Centre, oomph::CommandLineArgs::command_line_flag_has_been_set(), ProblemParameters::Constitutive_law_pt, oomph::CommandLineArgs::doc_specified_flags(), ProblemParameters::El_area, ProblemParameters::Nu, oomph::CommandLineArgs::parse_and_assign(), ProblemParameters::Penetrator_pt, problem, ProblemParameters::Radius, Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and ProblemParameters::Y_c_max.