SolidBeamUnitTest.cpp File Reference
#include "Oomph/SolidProblem.h"
#include "Math/Helpers.h"

Classes

class  Beam
 Defines a SolidProblem of element type RefineableQDPVDElement<3,2>. Add functionality to write output. More...
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Simulates a cubic rod (20mm x 2mm x 2mm) of density 2500 kg/m^3, elastic modulus 100 MPa, fixed on left side, bent by gravity

48 {
49  #ifdef OOMPH_HAS_MPI
50  MPI_Helpers::init(argc,argv);
51  #endif
52  // Solve the problem
53  Beam problem;
54  problem.setName("SolidBeamUnitTest");
55  problem.setElasticModulus(1e8);
56  problem.setDensity(2500);
57  problem.setSolidCubicMesh(20, 2, 2, 0, 0.2, 0, 0.02, 0, 0.02);
58  problem.pinBoundary(Beam::Boundary::X_MIN);
59  problem.setBodyForceAsGravity();
60  problem.setNewtonSolverTolerance(3e-8);
61  problem.prepareForSolve();
62  #ifdef OOMPH_HAS_MPI
63  // Distribute the problem
64  problem.distribute();
65  // Check halo schemes (optional)
66  //problem.check_halo_schemes();
67  #endif
68  problem.linear_solver_pt()->disable_doc_time();
69  //problem.disable_info_in_newton_solve();
70  problem.solveSteady();
71  problem.checkBeamDeflection();
72  #ifdef OOMPH_HAS_MPI
73  MPI_Helpers::finalize();
74  #endif
75 
76  return 0;
77 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Defines a SolidProblem of element type RefineableQDPVDElement<3,2>. Add functionality to write output...
Definition: SolidBeam.cpp:10
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References e(), and problem.