Line data Source code
1 : #include <iostream> 2 : #include <fstream> 3 : #include <iomanip> 4 : 5 : #include "Util/Util.H" 6 : #include "IO/ParmParse.H" 7 : #include "IO/FileNameParse.H" 8 : #include "IO/WriteMetaData.H" 9 : #include "AMReX_ParmParse.H" 10 : 11 : #include "Model/Solid/Linear/Isotropic.H" 12 : #include "Model/Solid/Affine/Isotropic.H" 13 : #include "Model/Solid/Linear/Cubic.H" 14 : #include "Model/Solid/Affine/Cubic.H" 15 : #include "Model/Solid/Finite/NeoHookean.H" 16 : #include "Model/Solid/Finite/NeoHookeanPredeformed.H" 17 : #include "Model/Solid/Finite/PseudoLinear/Cubic.H" 18 : #include "Model/Solid/Finite/PseudoAffine/Cubic.H" 19 : #include "Model/Solid/Linear/Laplacian.H" 20 : #include "Model/Solid/Affine/J2.H" 21 : #include "Model/Solid/Affine/Hexagonal.H" 22 : 23 : #include "Integrator/Mechanics.H" 24 : #include "Model/Solid/Finite/CrystalPlastic.H" 25 : 26 18 : int main (int argc, char* argv[]) 27 : { 28 18 : Util::Initialize(argc,argv); 29 : 30 36 : std::string program = "mechanics"; 31 36 : IO::ParmParse pp; 32 18 : pp_query("alamo.program",program); 33 18 : srand(2); 34 : 35 18 : Integrator::Integrator *integrator = nullptr; 36 18 : if (program == "mechanics") 37 : { 38 36 : std::string model = "linear.isotropic"; 39 18 : pp_query("alamo.program.mechanics.model",model); 40 18 : if (model == "linear.isotropic") integrator = new Integrator::Mechanics<Model::Solid::Linear::Isotropic>(pp); 41 12 : else if (model == "linear.cubic") integrator = new Integrator::Mechanics<Model::Solid::Linear::Cubic>(pp); 42 12 : else if (model == "affine.cubic") integrator = new Integrator::Mechanics<Model::Solid::Affine::Cubic>(pp); 43 12 : else if (model == "affine.hexagonal") integrator = new Integrator::Mechanics<Model::Solid::Affine::Hexagonal>(pp); 44 11 : else if (model == "affine.isotropic") integrator = new Integrator::Mechanics<Model::Solid::Affine::Isotropic>(pp); 45 8 : else if (model == "linear.laplacian") integrator = new Integrator::Mechanics<Model::Solid::Linear::Laplacian>(pp); 46 4 : else if (model == "finite.neohookean") integrator = new Integrator::Mechanics<Model::Solid::Finite::NeoHookean>(pp); 47 1 : else if (model == "finite.neohookeanpre") integrator = new Integrator::Mechanics<Model::Solid::Finite::NeoHookeanPredeformed>(pp); 48 1 : else if (model == "finite.pseudolinear.cubic") integrator = new Integrator::Mechanics<Model::Solid::Finite::PseudoLinear::Cubic>(pp); 49 1 : else if (model == "finite.pseudoaffine.cubic") integrator = new Integrator::Mechanics<Model::Solid::Finite::PseudoAffine::Cubic>(pp); 50 1 : else if (model == "affine.j2") integrator = new Integrator::Mechanics<Model::Solid::Affine::J2>(pp); 51 0 : else if (model == "finite.crystalplastic") integrator = new Integrator::Mechanics<Model::Solid::Finite::CrystalPlastic>(pp); 52 0 : else Util::Abort(INFO,model," is not a valid model"); 53 : } 54 0 : else Util::Abort(INFO,"Error: \"",program,"\" is not a valid program."); 55 : 56 18 : integrator->InitData(); 57 18 : integrator->Evolve(); 58 18 : delete integrator; 59 : 60 18 : Util::Finalize(); 61 18 : }