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: add Tpetra tests #12310

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -8,15 +8,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 @@ -34,9 +34,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 @@ -98,5 +102,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 @@ -23,3 +22,4 @@ ADD_SUBDIRECTORY(projection)
ADD_SUBDIRECTORY(transform_bc_names)
ADD_SUBDIRECTORY(sideset_overlap)
ADD_SUBDIRECTORY(interpolation)
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 @@ -43,13 +43,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
Loading