packages/SPn/spn_driver/Problem_Builder.cc
//---------------------------------------------------------------------------//
// PUBLIC INTERFACE
//---------------------------------------------------------------------------//
/*!
 * \brief Setup the problem.
 */
PUBLIC INTERFACE
\brief Setup the problem.
PUBLIC INTERFACE \ brief Setup the problem .
void Problem_Builder::setup(const std::string &xml_file)
{
    auto master = Teuchos::rcp(new ParameterList(""));
    Teuchos::updateParametersFromXmlFileAndBroadcast(
        xml_file.c_str(), master.ptr(), *d_comm);
    INSIST(master->isSublist("CORE"),
            "CORE block not defined in input.");
    INSIST(master->isSublist("ASSEMBLIES"),
            "ASSEMBLIES block not defined in input.");
    INSIST(master->isSublist("MATERIAL"),
            "MATERIAL block not defined in input.");
    INSIST(master->isSublist("PROBLEM"),
            "PROBLEM block not defined in input.");
    d_coredb   = Teuchos::sublist(master, "CORE");
    d_assblydb = Teuchos::sublist(master, "ASSEMBLIES");
    d_matdb    = Teuchos::sublist(master, "MATERIAL");
    d_db       = Teuchos::sublist(master, "PROBLEM");
    d_source = RCP_Source();
    CHECK(d_source.is_null());
    CHECK(!d_db.is_null());
    build_mesh();
    build_matids();
    build_matdb();
    if (master->isSublist("SOURCE"))
    {
        build_source(master->sublist("SOURCE"));
    }
}
void Problem_Builder :: setup ( const std :: string & xml_file ) { auto master = Teuchos :: rcp ( new ParameterList ( " " ) ) ; Teuchos :: updateParametersFromXmlFileAndBroadcast ( xml_file . c_str ( ) , master . ptr ( ) , * d_comm ) ; INSIST ( master -> isSublist ( " " ) , " " ) ; INSIST ( master -> isSublist ( " " ) , " " ) ; INSIST ( master -> isSublist ( " " ) , " " ) ; INSIST ( master -> isSublist ( " " ) , " " ) ; d_coredb = Teuchos :: sublist ( master , " " ) ; d_assblydb = Teuchos :: sublist ( master , " " ) ; d_matdb = Teuchos :: sublist ( master , " " ) ; d_db = Teuchos :: sublist ( master , " " ) ; d_source = RCP_Source ( ) ; CHECK ( d_source . is_null ( ) ) ; CHECK ( ! d_db . is_null ( ) ) ; build_mesh ( ) ; build_matids ( ) ; build_matdb ( ) ; if ( master -> isSublist ( " " ) ) { build_source ( master -> sublist ( " " ) ) ; } }
PUBLIC INTERFACE
 \brief Setup the problem.
PUBLIC INTERFACE \ brief Setup the problem .
// make the master parameterlist // read the data on every domain // validate the parameter list // store the individual parameter lists // kill any remaining sources // build mesh // build the material ids on the mesh // build material database // build the external source (there won't be one for k-eigenvalue // problems)