Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panzer stk conversion2 #486

Merged
merged 14 commits into from
Aug 1, 2016
2 changes: 1 addition & 1 deletion cmake/dependencies/TrilinosPackageDependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,7 @@
</Package>
<Package name="Panzer" dir="packages/panzer" type="ST">
<LIB_REQUIRED_DEP_PACKAGES value="Teuchos,Kokkos,Sacado,Phalanx,Intrepid,FEI,ThyraCore,ThyraTpetraAdapters,ThyraEpetraAdapters,Tpetra,Epetra,EpetraExt,Zoltan,Stratimikos,Piro,NOX,Rythmos"/>
<LIB_OPTIONAL_DEP_PACKAGES value="STKClassic,SEACASIoss,SEACASExodus,Teko,Stokhos,MueLu,Ifpack2"/>
<LIB_OPTIONAL_DEP_PACKAGES value="STK,SEACASIoss,SEACASExodus,Teko,Stokhos,MueLu,Ifpack2"/>
<TEST_REQUIRED_DEP_PACKAGES/>
<TEST_OPTIONAL_DEP_PACKAGES value="Stratimikos,Piro,NOX,Rythmos"/>
<LIB_REQUIRED_DEP_TPLS value="MPI,Boost"/>
Expand Down
2 changes: 1 addition & 1 deletion packages/panzer/adapters-stk/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SET(LIB_REQUIRED_DEP_PACKAGES STKClassic Zoltan Stratimikos Piro NOX Rythmos PanzerCore PanzerDiscFE)
SET(LIB_REQUIRED_DEP_PACKAGES STK Zoltan Stratimikos Piro NOX Rythmos PanzerCore PanzerDiscFE)
SET(LIB_OPTIONAL_DEP_PACKAGES SEACASIoss SEACASExodus Teko MueLu Ifpack2)
SET(TEST_REQUIRED_DEP_PACKAGES )
SET(TEST_OPTIONAL_DEP_PACKAGES)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ int main(int argc,char * argv[])
////////////////////////////////////////////////////////

std::string eBlockName = "";
RCP<panzer_stk_classic::STK_MeshFactory> mesh_factory;
RCP<panzer_stk::STK_MeshFactory> mesh_factory;
if(threeD) {
mesh_factory = rcp(new panzer_stk_classic::CubeHexMeshFactory);
mesh_factory = rcp(new panzer_stk::CubeHexMeshFactory);

// set mesh factory parameters
RCP<Teuchos::ParameterList> pl = rcp(new Teuchos::ParameterList);
Expand All @@ -217,7 +217,7 @@ int main(int argc,char * argv[])
eBlockName = "eblock-0_0_0";
}
else {
mesh_factory = rcp(new panzer_stk_classic::SquareQuadMeshFactory);
mesh_factory = rcp(new panzer_stk::SquareQuadMeshFactory);

// set mesh factory parameters
RCP<Teuchos::ParameterList> pl = rcp(new Teuchos::ParameterList);
Expand All @@ -232,7 +232,7 @@ int main(int argc,char * argv[])
eBlockName = "eblock-0_0";
}

RCP<panzer_stk_classic::STK_Interface> mesh = mesh_factory->buildUncommitedMesh(MPI_COMM_WORLD);
RCP<panzer_stk::STK_Interface> mesh = mesh_factory->buildUncommitedMesh(MPI_COMM_WORLD);

// other declarations
const std::size_t workset_size = 2*2;
Expand Down Expand Up @@ -308,7 +308,7 @@ int main(int argc,char * argv[])

// build the connection manager
if(!useTpetra) {
const Teuchos::RCP<panzer::ConnManager<int,int> > conn_manager = Teuchos::rcp(new panzer_stk_classic::STKConnManager<int>(mesh));
const Teuchos::RCP<panzer::ConnManager<int,int> > conn_manager = Teuchos::rcp(new panzer_stk::STKConnManager<int>(mesh));

panzer::DOFManagerFactory<int,int> globalIndexerFactory;
RCP<panzer::UniqueGlobalIndexer<int,int> > dofManager_int
Expand All @@ -320,7 +320,7 @@ int main(int argc,char * argv[])
}
else {
const Teuchos::RCP<panzer::ConnManager<int,panzer::Ordinal64> > conn_manager
= Teuchos::rcp(new panzer_stk_classic::STKConnManager<panzer::Ordinal64>(mesh));
= Teuchos::rcp(new panzer_stk::STKConnManager<panzer::Ordinal64>(mesh));

panzer::DOFManagerFactory<int,panzer::Ordinal64> globalIndexerFactory;
RCP<panzer::UniqueGlobalIndexer<int,panzer::Ordinal64> > dofManager_long
Expand All @@ -334,8 +334,8 @@ int main(int argc,char * argv[])
// build worksets
////////////////////////////////////////////////////////

Teuchos::RCP<panzer_stk_classic::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk_classic::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer_stk::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer::WorksetContainer> wkstContainer // attach it to a workset container (uses lazy evaluation)
= Teuchos::rcp(new panzer::WorksetContainer(wkstFactory,physicsBlocks,workset_size));
wkstContainer->setGlobalIndexer(dofManager);
Expand All @@ -356,7 +356,7 @@ int main(int argc,char * argv[])
eBlocks.push_back(eBlockNames[i]);
}

panzer_stk_classic::RespFactorySolnWriter_Builder builder;
panzer_stk::RespFactorySolnWriter_Builder builder;
builder.mesh = mesh;
stkIOResponseLibrary->addResponse("Main Field Output",eBlocks,builder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int main(int argc,char * argv[])
Teuchos::rcp(new Example::EquationSetFactory); // where poison equation is defined
Example::BCStrategyFactory bc_factory; // where boundary conditions are defined

panzer_stk_classic::CubeTetMeshFactory mesh_factory;
panzer_stk::CubeTetMeshFactory mesh_factory;

// other declarations
const std::size_t workset_size = 500;
Expand All @@ -163,7 +163,7 @@ int main(int argc,char * argv[])
pl->set("Z Elements",z_elements);
mesh_factory.setParameterList(pl);

RCP<panzer_stk_classic::STK_Interface> mesh = mesh_factory.buildUncommitedMesh(MPI_COMM_WORLD);
RCP<panzer_stk::STK_Interface> mesh = mesh_factory.buildUncommitedMesh(MPI_COMM_WORLD);

// construct input physics and physics block
////////////////////////////////////////////////////////
Expand Down Expand Up @@ -240,7 +240,7 @@ int main(int argc,char * argv[])

// build the connection manager
if(!useTpetra) {
const Teuchos::RCP<panzer::ConnManager<int,int> > conn_manager = Teuchos::rcp(new panzer_stk_classic::STKConnManager<int>(mesh));
const Teuchos::RCP<panzer::ConnManager<int,int> > conn_manager = Teuchos::rcp(new panzer_stk::STKConnManager<int>(mesh));

panzer::DOFManagerFactory<int,int> globalIndexerFactory;
RCP<panzer::UniqueGlobalIndexer<int,int> > dofManager_int
Expand All @@ -251,7 +251,7 @@ int main(int argc,char * argv[])
linObjFactory = Teuchos::rcp(new panzer::EpetraLinearObjFactory<panzer::Traits,int>(comm.getConst(),dofManager_int));
}
else {
const Teuchos::RCP<panzer::ConnManager<int,panzer::Ordinal64> > conn_manager = Teuchos::rcp(new panzer_stk_classic::STKConnManager<panzer::Ordinal64>(mesh));
const Teuchos::RCP<panzer::ConnManager<int,panzer::Ordinal64> > conn_manager = Teuchos::rcp(new panzer_stk::STKConnManager<panzer::Ordinal64>(mesh));

panzer::DOFManagerFactory<int,panzer::Ordinal64> globalIndexerFactory;
RCP<panzer::UniqueGlobalIndexer<int,panzer::Ordinal64> > dofManager_long
Expand All @@ -265,8 +265,8 @@ int main(int argc,char * argv[])
// build worksets
////////////////////////////////////////////////////////

Teuchos::RCP<panzer_stk_classic::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk_classic::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer_stk::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer::WorksetContainer> wkstContainer // attach it to a workset container (uses lazy evaluation)
= Teuchos::rcp(new panzer::WorksetContainer(wkstFactory,physicsBlocks,workset_size));
wkstContainer->setGlobalIndexer(dofManager);
Expand All @@ -281,7 +281,7 @@ int main(int argc,char * argv[])
std::vector<std::string> eBlocks;
mesh->getElementBlockNames(eBlocks);

panzer_stk_classic::RespFactorySolnWriter_Builder builder;
panzer_stk::RespFactorySolnWriter_Builder builder;
builder.mesh = mesh;
stkIOResponseLibrary->addResponse("Main Field Output",eBlocks,builder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ buildSTKIOResponseLibrary(const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >
const Teuchos::RCP<panzer::WorksetContainer> & wkstContainer,
const Teuchos::RCP<panzer::UniqueGlobalIndexerBase> & globalIndexer,
const panzer::ClosureModelFactory_TemplateManager<panzer::Traits> & cm_factory,
const Teuchos::RCP<panzer_stk_classic::STK_Interface> & mesh,
const Teuchos::RCP<panzer_stk::STK_Interface> & mesh,
const Teuchos::ParameterList & closure_model_pl,
const Teuchos::ParameterList & user_data);

void writeToExodus(double time_stamp,
const Teuchos::RCP<const Thyra::VectorBase<double> > & x,
const panzer::ModelEvaluator<double> & model,
panzer::ResponseLibrary<panzer::Traits> & stkIOResponseLibrary,
panzer_stk_classic::STK_Interface & mesh);
panzer_stk::STK_Interface & mesh);

int main(int argc, char *argv[])
{
Expand Down Expand Up @@ -173,10 +173,10 @@ int main(int argc, char *argv[])

// read in mesh database, build un committed data
////////////////////////////////////////////////////////////////
RCP<panzer_stk_classic::STK_MeshFactory> mesh_factory = rcp(new panzer_stk_classic::SquareQuadMeshFactory);
RCP<panzer_stk::STK_MeshFactory> mesh_factory = rcp(new panzer_stk::SquareQuadMeshFactory);
mesh_factory->setParameterList(mesh_pl);

RCP<panzer_stk_classic::STK_Interface> mesh = mesh_factory->buildUncommitedMesh(MPI_COMM_WORLD);
RCP<panzer_stk::STK_Interface> mesh = mesh_factory->buildUncommitedMesh(MPI_COMM_WORLD);

// read in physics blocks
////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -244,8 +244,8 @@ int main(int argc, char *argv[])
//////////////////////////////////////////////////////////////

// build WorksetContainer
Teuchos::RCP<panzer_stk_classic::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk_classic::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer_stk::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer::WorksetContainer> wkstContainer // attach it to a workset container (uses lazy evaluation)
= Teuchos::rcp(new panzer::WorksetContainer(wkstFactory,physicsBlocks,workset_size));

Expand All @@ -254,7 +254,7 @@ int main(int argc, char *argv[])

// build the connection manager
const Teuchos::RCP<panzer::ConnManager<int,int> >
conn_manager = Teuchos::rcp(new panzer_stk_classic::STKConnManager<int>(mesh));
conn_manager = Teuchos::rcp(new panzer_stk::STKConnManager<int>(mesh));

// build the state dof manager and LOF
RCP<panzer::UniqueGlobalIndexer<int,int> > dofManager;
Expand All @@ -269,7 +269,7 @@ int main(int argc, char *argv[])
/////////////////////////////////////////////////////////////

RCP<Thyra::LinearOpWithSolveFactoryBase<double> > lowsFactory
= panzer_stk_classic::buildLOWSFactory(false, dofManager, conn_manager,
= panzer_stk::buildLOWSFactory(false, dofManager, conn_manager,
Teuchos::as<int>(mesh->getDimension()),
comm, lin_solver_pl,Teuchos::null);

Expand Down Expand Up @@ -363,7 +363,7 @@ buildSTKIOResponseLibrary(const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >
const Teuchos::RCP<panzer::WorksetContainer> & wkstContainer,
const Teuchos::RCP<panzer::UniqueGlobalIndexerBase> & globalIndexer,
const panzer::ClosureModelFactory_TemplateManager<panzer::Traits> & cm_factory,
const Teuchos::RCP<panzer_stk_classic::STK_Interface> & mesh,
const Teuchos::RCP<panzer_stk::STK_Interface> & mesh,
const Teuchos::ParameterList & closure_model_pl,
const Teuchos::ParameterList & user_data)
{
Expand All @@ -377,15 +377,15 @@ buildSTKIOResponseLibrary(const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >
std::vector<std::string> eBlocks;
mesh->getElementBlockNames(eBlocks);

panzer_stk_classic::RespFactorySolnWriter_Builder builder;
panzer_stk::RespFactorySolnWriter_Builder builder;
builder.mesh = mesh;

stkIOResponseLibrary->addResponse("Main Field Output",eBlocks,builder);

std::map<std::string,std::vector<std::string> > nodalFields,cellFields;

// this automatically adds in the nodal fields
panzer_stk_classic::IOClosureModelFactory_TemplateBuilder<panzer::Traits> io_cm_builder(cm_factory,mesh,
panzer_stk::IOClosureModelFactory_TemplateBuilder<panzer::Traits> io_cm_builder(cm_factory,mesh,
nodalFields,
cellFields);
panzer::ClosureModelFactory_TemplateManager<panzer::Traits> io_cm_factory;
Expand All @@ -403,7 +403,7 @@ void writeToExodus(double time_stamp,
const Teuchos::RCP<const Thyra::VectorBase<double> > & x,
const panzer::ModelEvaluator<double> & model,
panzer::ResponseLibrary<panzer::Traits> & stkIOResponseLibrary,
panzer_stk_classic::STK_Interface & mesh)
panzer_stk::STK_Interface & mesh)
{
// fill STK mesh objects
Thyra::ModelEvaluatorBase::InArgs<double> inArgs = model.createInArgs();
Expand Down
12 changes: 6 additions & 6 deletions packages/panzer/adapters-stk/example/PoissonExample/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int main(int argc,char * argv[])
Teuchos::rcp(new Example::EquationSetFactory); // where poison equation is defined
Example::BCStrategyFactory bc_factory; // where boundary conditions are defined

panzer_stk_classic::SquareQuadMeshFactory mesh_factory;
panzer_stk::SquareQuadMeshFactory mesh_factory;

// other declarations
const std::size_t workset_size = 20;
Expand All @@ -130,7 +130,7 @@ int main(int argc,char * argv[])
pl->set("Y Elements",10);
mesh_factory.setParameterList(pl);

RCP<panzer_stk_classic::STK_Interface> mesh = mesh_factory.buildUncommitedMesh(MPI_COMM_WORLD);
RCP<panzer_stk::STK_Interface> mesh = mesh_factory.buildUncommitedMesh(MPI_COMM_WORLD);

// construct input physics and physics block
////////////////////////////////////////////////////////
Expand Down Expand Up @@ -188,8 +188,8 @@ int main(int argc,char * argv[])
// build worksets
////////////////////////////////////////////////////////

Teuchos::RCP<panzer_stk_classic::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk_classic::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer_stk::WorksetFactory> wkstFactory
= Teuchos::rcp(new panzer_stk::WorksetFactory(mesh)); // build STK workset factory
Teuchos::RCP<panzer::WorksetContainer> wkstContainer // attach it to a workset container (uses lazy evaluation)
= Teuchos::rcp(new panzer::WorksetContainer(wkstFactory,physicsBlocks,workset_size));

Expand All @@ -198,7 +198,7 @@ int main(int argc,char * argv[])

// build the connection manager
const Teuchos::RCP<panzer::ConnManager<int,int> >
conn_manager = Teuchos::rcp(new panzer_stk_classic::STKConnManager<int>(mesh));
conn_manager = Teuchos::rcp(new panzer_stk::STKConnManager<int>(mesh));

panzer::DOFManagerFactory<int,int> globalIndexerFactory;
RCP<panzer::UniqueGlobalIndexer<int,int> > dofManager
Expand Down Expand Up @@ -314,7 +314,7 @@ int main(int argc,char * argv[])

// get X Epetra_Vector from ghosted container
RCP<panzer::EpetraLinearObjContainer> ep_ghostCont = rcp_dynamic_cast<panzer::EpetraLinearObjContainer>(ghostCont);
panzer_stk_classic::write_solution_data(*dofManager,*mesh,*ep_ghostCont->get_x());
panzer_stk::write_solution_data(*dofManager,*mesh,*ep_ghostCont->get_x());
mesh->writeToExodus("output.exo");
}

Expand Down
Loading