Skip to content

Commit

Permalink
Panzer: add Tpetra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable authored and cwschilly committed Sep 22, 2023
1 parent f1282ab commit 24a49fa
Show file tree
Hide file tree
Showing 32 changed files with 7,385 additions and 681 deletions.
10 changes: 6 additions & 4 deletions packages/panzer/adapters-stk/src/Panzer_STK_Utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
// ***********************************************************************
// @HEADER

#ifdef PANZER_HAVE_EPETRA_STACK

#ifndef __Panzer_STK_Utilities_hpp__
#define __Panzer_STK_Utilities_hpp__

#include "Panzer_STK_Interface.hpp"

#ifdef PANZER_HAVE_EPETRA_STACK
#include "Epetra_Vector.h"
#include "Epetra_MultiVector.h"
#endif

namespace panzer {
class GlobalIndexer;
Expand All @@ -66,9 +66,13 @@ namespace panzer_stk {
*/
void write_cell_data(panzer_stk::STK_Interface & mesh,const std::vector<double> & data,const std::string & fieldName);

#ifdef PANZER_HAVE_EPETRA_STACK

void write_solution_data(const panzer::GlobalIndexer& dofMngr,panzer_stk::STK_Interface & mesh,const Epetra_MultiVector & x,const std::string & prefx="",const std::string & postfix="");
void write_solution_data(const panzer::GlobalIndexer& dofMngr,panzer_stk::STK_Interface & mesh,const Epetra_Vector & x,const std::string & prefix="",const std::string & postfix="");

#endif // PANZER_HAVE_EPETRA_STACK

/** Using a container, compute the sorted permutation vector
* do not modifiy the original container.
*
Expand Down Expand Up @@ -130,5 +134,3 @@ void sorted_permutation(const RAContainer & cont,std::vector<std::size_t> & perm
}

#endif

#endif // PANZER_HAVE_EPETRA_STACK
14 changes: 7 additions & 7 deletions packages/panzer/adapters-stk/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
IF (PANZER_HAVE_EPETRA_STACK)
ADD_SUBDIRECTORY(assembly_engine)
ADD_SUBDIRECTORY(field_manager_builder)
ADD_SUBDIRECTORY(model_evaluator)
ADD_SUBDIRECTORY(solver)
ADD_SUBDIRECTORY(ip_coordinates)
ADD_SUBDIRECTORY(bcstrategy)
ADD_SUBDIRECTORY(periodic_bcs)
ADD_SUBDIRECTORY(initial_condition_builder)
ENDIF (PANZER_HAVE_EPETRA_STACK)

ADD_SUBDIRECTORY(model_evaluator)
ADD_SUBDIRECTORY(assembly_engine)
ADD_SUBDIRECTORY(bcstrategy)
ADD_SUBDIRECTORY(periodic_bcs)
ADD_SUBDIRECTORY(initial_condition_builder)
ADD_SUBDIRECTORY(field_manager_builder)
ADD_SUBDIRECTORY(stk_interface_test)
ADD_SUBDIRECTORY(stk_connmngr)
ADD_SUBDIRECTORY(panzer_workset_builder)
Expand All @@ -22,3 +21,4 @@ ADD_SUBDIRECTORY(local_mesh)
ADD_SUBDIRECTORY(projection)
ADD_SUBDIRECTORY(transform_bc_names)
ADD_SUBDIRECTORY(sideset_overlap)
ADD_SUBDIRECTORY(ip_coordinates)
858 changes: 571 additions & 287 deletions packages/panzer/adapters-stk/test/assembly_engine/assembly_engine.cpp

Large diffs are not rendered by default.

769 changes: 565 additions & 204 deletions packages/panzer/adapters-stk/test/assembly_engine/simple_bc.cpp

Large diffs are not rendered by default.

30 changes: 24 additions & 6 deletions packages/panzer/adapters-stk/test/bcstrategy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,41 @@ TRIBITS_INCLUDE_DIRECTORIES(${PARENT_PACKAGE_SOURCE_DIR}/disc-fe/test/closure_mo
SET(UNIT_TEST_DRIVER
${PANZER_UNIT_TEST_MAIN})

SET(SOURCES
bcstrategy.cpp
SET(COMMON_HEADERS
user_app_BCStrategy_Dirichlet_Constant.hpp
user_app_BCStrategy_Dirichlet_Constant_impl.hpp
user_app_BCStrategy_Neumann_Constant.hpp
user_app_BCStrategy_Neumann_Constant_impl.hpp
user_app_BCStrategy_Factory.hpp
)
)



SET(SOURCES_TPETRA
bcstrategy_tpetra.cpp
)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
bcstrategy
SOURCES ${SOURCES} ${UNIT_TEST_DRIVER}
bcstrategy_tpetra
SOURCES ${SOURCES_TPETRA} ${COMMON_HEADERS} ${UNIT_TEST_DRIVER}
NUM_MPI_PROCS 1
)

TRIBITS_ADD_EXECUTABLE_AND_TEST(
bcstrategy_composite_factory
SOURCES bcstrategy_composite_factory.cpp ${UNIT_TEST_DRIVER} user_app_BCStrategy_Dirichlet_Constant.hpp user_app_BCStrategy_Dirichlet_Constant_impl.hpp user_app_BCStrategy_Factory_Physics1.hpp user_app_BCStrategy_Factory_Physics2.hpp
NUM_MPI_PROCS 1
)
)

IF (PANZER_HAVE_EPETRA)
SET(SOURCES_EPETRA
bcstrategy.cpp
)
TRIBITS_ADD_EXECUTABLE_AND_TEST(
bcstrategy_epetra
SOURCES ${SOURCES_EPETRA} ${COMMON_HEADERS} ${UNIT_TEST_DRIVER}
NUM_MPI_PROCS 1
)
ENDIF(PANZER_HAVE_EPETRA)


Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,10 @@
#include "user_app_EquationSetFactory.hpp"
#include "user_app_ClosureModel_Factory_TemplateBuilder.hpp"

#include "Epetra_MpiComm.h"

namespace panzer {

TEUCHOS_UNIT_TEST(bcstrategy, basic_construction)
{

std::size_t bc_id = 0;
panzer::BCType neumann = BCT_Dirichlet;
std::string sideset_id = "4";
Expand Down
Loading

0 comments on commit 24a49fa

Please sign in to comment.