6 libMesh::LibMeshInit init(argc, argv);
9 libMesh::PerfLog perf_log(
"Main program");
12 libMesh::Parallel::Communicator& WorldComm = init.comm();
17 GetPot command_line(argc, argv);
23 std::string input_filename;
24 if (command_line.search(2,
"--inputfile",
"-i")) {
25 input_filename = command_line.next(input_filename);
26 field_parser.parse_input_file(input_filename,
"#",
"\n",
" \t\n");
28 field_parser = command_line;
35 const unsigned int dim = 3;
37 libmesh_example_requires(dim == LIBMESH_DIM,
"3D support");
40 libMesh::Mesh system_mesh(WorldComm, dim);
42 system_mesh.prepare_for_use();
45 libMesh::EquationSystems equation_systems(system_mesh);
48 libMesh::LinearImplicitSystem& elasticity_system
53 equation_systems.init();
59 libMesh::PetscVector<libMesh::Real> * sol_vec_ptr = libMesh::cast_ptr<libMesh::PetscVector<libMesh::Real> * >(elasticity_system.solution.get());
63 elasticity_system.solution->close();
64 elasticity_system.update();
70 #ifdef LIBMESH_HAVE_EXODUS_API
71 libMesh::ExodusII_IO exo_io_interface(system_mesh,
true);
73 std::set<std::string> system_names;
74 system_names.insert(
"Elasticity");
75 exo_io_interface.write_equation_systems(input_params.
output_mesh,equation_systems,&system_names);
76 exo_io_interface.write_element_data(equation_systems);
void set_homogeneous_physical_properties(libMesh::EquationSystems &es, std::string &physicalParamsFile)
Set the homogeneous physical properties from a file.
void get_input_params(GetPot &field_parser, feti_iterate_params &input_params)
Parser function for the coupled solver test programs.
libMesh::ExplicitSystem & add_stress(libMesh::EquationSystems &input_systems)
Add a stress libMesh::ExplicitSystem to the input libMesh::EquationSystems.
libMesh::ImplicitSystem & add_elasticity(libMesh::EquationSystems &input_systems, libMesh::Order order=libMesh::FIRST, libMesh::FEFamily family=libMesh::LAGRANGE)
Add a linear elasticity libMesh::LinearImplicitSystem to the input libMesh::EquationSystems& input_sy...
void compute_stresses(libMesh::EquationSystems &es)
Compute the stress (based on one of libMesh's examples)
void read_PETSC_vector(libMesh::PetscVector< libMesh::Number > &input_vec, const std::string &filename)