Esempio n. 1
0
    //! Initialize the GetPot and Simulation class objects
    void init_sim(const std::string & filename)
    {
      _input.reset(new GetPot(filename));

      const char * const argv = "unit_driver";
      GetPot empty_command_line( (const int)1,&argv );
      GRINS::SimulationBuilder sim_builder;

      _sim = new GRINS::Simulation(*_input,
                                    empty_command_line,
                                    sim_builder,
                                   *TestCommWorld );
    }
  GRINS::SharedPtr<Solver> InflatingSheetSolverFactory::build(const GetPot& input)
  {
    std::string solver_type = input("SolverOptions/solver_type", "DIE!");

    GRINS::SharedPtr<Solver> solver;  // Effectively NULL

    if( solver_type == std::string("pressure_continuation") )
      {
        solver.reset( new PressureContinuationSolver(input) );
      }
    else
      {
        solver = SolverFactory::build(input);
      }

    return solver;
  }