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

Organization and cleaning of tests and problems. Phase 1: pruning #854

Merged
merged 3 commits into from
Oct 21, 2022
Merged
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
19 changes: 0 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -571,16 +571,6 @@ ELSE()
SET(ALBANY_MESH_DEPENDS_ON_PARAMETERS FALSE)
ENDIF()

# set optional dependency of mesh on solution, defaults to Disabled
OPTION(ENABLE_MESH_DEPENDS_ON_SOLUTION "Flag to turn on dependency of mesh on solution" OFF)
IF (ENABLE_MESH_DEPENDS_ON_SOLUTION)
MESSAGE("-- MESH_DEPENDS_ON_SOLUTION Enabled.")
SET(ALBANY_MESH_DEPENDS_ON_SOLUTION TRUE)
ELSE()
MESSAGE("-- MESH_DEPENDS_ON_SOLUTION NOT Enabled.")
SET(ALBANY_MESH_DEPENDS_ON_SOLUTION FALSE)
ENDIF()

MESSAGE("\nAlbany physics packages:\n")

# set optional dependency on demoPDEs, defaults to Enabled
Expand Down Expand Up @@ -734,15 +724,6 @@ ELSE()
SET(ALBANY_FADTYPE_NOTEQUAL_TANFADTYPE TRUE)
MESSAGE("-- FAD_TYPE is not TAN_FAD_TYPE")
ENDIF()

LIST(FIND Trilinos_PACKAGE_LIST Pamgen PAMGEN_List_ID)
IF (NOT PAMGEN_List_ID GREATER -1)
MESSAGE("-- Pamgen is Enabled. Building Pamgen tests")
set(ALBANY_PAMGEN TRUE)
ELSE()
MESSAGE("-- Pamgen is NOT Enabled. Not building Pamgen tests")
set(ALBANY_PAMGEN FALSE)
ENDIF()

# Disable the RTC capability if Trilinos is not built with Pamgen
LIST(FIND Trilinos_PACKAGE_LIST Pamgen PAMGEN_List_ID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,35 +447,30 @@ if (BUILD_ALB64)
set(TRILINSTALLDIR ${CTEST_INSTALL_DIRECTORY}/TrilinosInstall)
set(BUILDTYPE "RELEASE")
set(FPE_CHECK "OFF")
set(MESH_DEP_ON_SOLN "ON")
set(MESH_DEP_ON_PARAMS "OFF")
endif(BUILD_ALB64)
if (BUILD_INTEL_ALBANY)
set(TRILINSTALLDIR ${CTEST_INSTALL_DIRECTORY}/TrilinosIntelInstall)
set(BUILDTYPE "RELEASE")
set(FPE_CHECK "OFF")
set(MESH_DEP_ON_SOLN "OFF")
set(MESH_DEP_ON_PARAMS "ON")
endif (BUILD_INTEL_ALBANY)
if (BUILD_ALB64CLANG)
set(TRILINSTALLDIR ${CTEST_INSTALL_DIRECTORY}/TrilinosInstallC11)
set(BUILDTYPE "RELEASE")
set(FPE_CHECK "OFF")
set(MESH_DEP_ON_SOLN "OFF")
set(MESH_DEP_ON_PARAMS "OFF")
endif (BUILD_ALB64CLANG)
if (BUILD_ALB64CLANGDBG)
set(TRILINSTALLDIR ${CTEST_INSTALL_DIRECTORY}/TrilinosInstallC11Dbg)
set(BUILDTYPE "DEBUG")
set(FPE_CHECK "ON")
set(MESH_DEP_ON_SOLN "OFF")
set(MESH_DEP_ON_PARAMS "OFF")
endif (BUILD_ALB64CLANGDBG)
if (BUILD_ALB64DBG)
set(TRILINSTALLDIR ${CTEST_INSTALL_DIRECTORY}/TrilinosDbg)
set(BUILDTYPE "DEBUG")
set(FPE_CHECK "ON")
set(MESH_DEP_ON_SOLN "OFF")
set(MESH_DEP_ON_PARAMS "OFF")
endif (BUILD_ALB64DBG)

Expand All @@ -485,7 +480,6 @@ endif (BUILD_ALB64DBG)
"-DENABLE_LANDICE:BOOL=ON"
"-DENABLE_UNIT_TESTS:BOOL=ON"
"-DENABLE_STRONG_FPE_CHECK:BOOL=ON"
"-DENABLE_MESH_DEPENDS_ON_SOLUTION:BOOL=${MESH_DEP_ON_SOLN}"
"-DENABLE_MESH_DEPENDS_ON_PARAMETERS:BOOL=${MESH_DEP_ON_PARAMS}"
"-DCMAKE_BUILD_TYPE:STRING=${BUILDTYPE}"
"-DENABLE_STRONG_FPE_CHECK:BOOL=${FPE_CHECK}"
Expand Down
1 change: 0 additions & 1 deletion src/Albany_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

// Whether mesh and parameters depend on each others and/or solution
#cmakedefine ALBANY_MESH_DEPENDS_ON_PARAMETERS
#cmakedefine ALBANY_MESH_DEPENDS_ON_SOLUTION

// Cuda options
#cmakedefine ALBANY_CUDA_ERROR_CHECK
Expand Down
38 changes: 0 additions & 38 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -615,29 +615,17 @@ if(ALBANY_DEMO_PDES)
set(PDE_SRCS
problems/Albany_AdvDiffProblem.cpp
problems/Albany_ReactDiffSystem.cpp
problems/Albany_CahnHillProblem.cpp
problems/Albany_ComprNSProblem.cpp
problems/Albany_DemoProblemFactory.cpp
problems/Albany_Helmholtz2DProblem.cpp
problems/Albany_LinComprNSProblem.cpp
problems/Albany_ODEProblem.cpp
problems/Albany_NavierStokes.cpp
problems/Albany_PNPProblem.cpp
problems/Albany_ThermoElectrostaticsProblem.cpp
problems/Albany_ThermalProblem.cpp
problems/Albany_AdvectionProblem.cpp
evaluators/pde/PHAL_AdvDiffResid.cpp
evaluators/pde/PHAL_ReactDiffSystemResid.cpp
evaluators/pde/PHAL_CahnHillChemTerm.cpp
evaluators/pde/PHAL_CahnHillRhoResid.cpp
evaluators/pde/PHAL_CahnHillWResid.cpp
evaluators/pde/PHAL_ComprNSBodyForce.cpp
evaluators/pde/PHAL_ComprNSResid.cpp
evaluators/pde/PHAL_ComprNSViscosity.cpp
evaluators/pde/PHAL_HelmholtzResid.cpp
evaluators/pde/PHAL_JouleHeating.cpp
evaluators/pde/PHAL_LinComprNSBodyForce.cpp
evaluators/pde/PHAL_LinComprNSResid.cpp
evaluators/pde/PHAL_NSBodyForce.cpp
evaluators/pde/PHAL_NSContinuityResid.cpp
evaluators/pde/PHAL_NSContravarientMetricTensor.cpp
Expand All @@ -655,47 +643,25 @@ if(ALBANY_DEMO_PDES)
evaluators/pde/PHAL_PoissonResid.cpp
evaluators/pde/PHAL_Permittivity.cpp
evaluators/pde/PHAL_TEProp.cpp
evaluators/pde/PNP_ConcentrationResid.cpp
evaluators/pde/PNP_PotentialResid.cpp
)

set(PDE_HDRS
problems/Albany_AdvDiffProblem.hpp
problems/Albany_ReactDiffSystem.hpp
problems/Albany_CahnHillProblem.hpp
problems/Albany_ComprNSProblem.hpp
problems/Albany_Helmholtz2DProblem.hpp
problems/Albany_LinComprNSProblem.hpp
problems/Albany_NavierStokes.hpp
problems/Albany_ODEProblem.hpp
problems/Albany_PNPProblem.hpp
problems/Albany_ThermoElectrostaticsProblem.hpp
problems/Albany_ThermalProblem.hpp
problems/Albany_AdvectionProblem.hpp
evaluators/pde/PHAL_AdvDiffResid.hpp
evaluators/pde/PHAL_AdvDiffResid_Def.hpp
evaluators/pde/PHAL_ReactDiffSystemResid.hpp
evaluators/pde/PHAL_ReactDiffSystemResid_Def.hpp
evaluators/pde/PHAL_CahnHillRhoResid.hpp
evaluators/pde/PHAL_CahnHillRhoResid_Def.hpp
evaluators/pde/PHAL_CahnHillWResid.hpp
evaluators/pde/PHAL_CahnHillWResid_Def.hpp
evaluators/pde/PHAL_CahnHillChemTerm.hpp
evaluators/pde/PHAL_CahnHillChemTerm_Def.hpp
evaluators/pde/PHAL_ComprNSBodyForce.hpp
evaluators/pde/PHAL_ComprNSBodyForce_Def.hpp
evaluators/pde/PHAL_ComprNSResid.hpp
evaluators/pde/PHAL_ComprNSResid_Def.hpp
evaluators/pde/PHAL_ComprNSViscosity.hpp
evaluators/pde/PHAL_ComprNSViscosity_Def.hpp
evaluators/pde/PHAL_HelmholtzResid.hpp
evaluators/pde/PHAL_HelmholtzResid_Def.hpp
evaluators/pde/PHAL_JouleHeating.hpp
evaluators/pde/PHAL_JouleHeating_Def.hpp
evaluators/pde/PHAL_LinComprNSBodyForce.hpp
evaluators/pde/PHAL_LinComprNSBodyForce_Def.hpp
evaluators/pde/PHAL_LinComprNSResid.hpp
evaluators/pde/PHAL_LinComprNSResid_Def.hpp
evaluators/pde/PHAL_NSContinuityResid.hpp
evaluators/pde/PHAL_NSContinuityResid_Def.hpp
evaluators/pde/PHAL_NSBodyForce.hpp
Expand Down Expand Up @@ -726,10 +692,6 @@ if(ALBANY_DEMO_PDES)
evaluators/pde/PHAL_Permittivity_Def.hpp
evaluators/pde/PHAL_TEProp.hpp
evaluators/pde/PHAL_TEProp_Def.hpp
evaluators/pde/PNP_ConcentrationResid.hpp
evaluators/pde/PNP_ConcentrationResid_Def.hpp
evaluators/pde/PNP_PotentialResid.hpp
evaluators/pde/PNP_PotentialResid_Def.hpp
evaluators/pde/PHAL_ThermalResid.hpp
evaluators/pde/PHAL_ThermalResid_Def.hpp
evaluators/pde/PHAL_AdvectionResid.hpp
Expand Down
4 changes: 2 additions & 2 deletions src/LandIce/problems/LandIce_StokesFOBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ constructInterpolationEvaluators (PHX::FieldManager<PHAL::AlbanyTraits>& fm0)
// if (st==FieldScalarType::ParamScalar) {
// useMemoization &= !Albany::params_depend_on_solution();
// } else if (st==FieldScalarType::MeshScalar) {
// useMemoization &= !Albany::mesh_depends_on_solution() && !Albany::mesh_depends_on_parameters();
// useMemoization &= !Albany::mesh_depends_on_parameters();
// }

// Get the needs of this field
Expand Down Expand Up @@ -819,7 +819,7 @@ constructInterpolationEvaluators (PHX::FieldManager<PHAL::AlbanyTraits>& fm0)
// if (st==FieldScalarType::ParamScalar) {
// useMemoization &= !Albany::params_depend_on_solution();
// } else if (st==FieldScalarType::MeshScalar) {
// useMemoization &= !Albany::mesh_depends_on_solution() && !Albany::mesh_depends_on_parameters();
// useMemoization &= !Albany::mesh_depends_on_parameters();
// }

// Get the right evaluator utils for this field.
Expand Down
2 changes: 1 addition & 1 deletion src/LandIce/problems/LandIce_StokesFOThickness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void StokesFOThickness::setFieldsProperties () {
StokesFOBase::setFieldsProperties();

// Fix the scalar type of ice_thickness_name, since in StokesFOThickness it depends on the solution.
// Note: the ST of surface_height doesn't *need* to be Scalar if MESH_DEPENDS_ON_SOLUTION=OFF,
// Note: the ST of surface_height doesn't *need* to be Scalar,
// But if they don't match StokesFOLateralResid would need a second template argument.
// This simply makes life easier.
setSingleFieldProperties(ice_thickness_name, FRT::Scalar, FST::Scalar);
Expand Down
32 changes: 3 additions & 29 deletions src/LandIce/problems/LandIce_StokesFOThickness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,35 +252,9 @@ void StokesFOThickness::constructThicknessEvaluators (PHX::FieldManager<PHAL::Al
ev = Teuchos::rcp(new LandIce::ThicknessResid<EvalT,PHAL::AlbanyTraits>(*p,dl));
fm0.template registerEvaluator<EvalT>(ev);

if (Albany::mesh_depends_on_solution()) {
//--- Gather Coordinates ---//
p = Teuchos::rcp(new Teuchos::ParameterList("Gather Coordinate Vector"));

// Output:: Coordinate Vector at vertices
p->set<std::string>("Coordinate Vector Name", "Coord Vec Old");

ev = Teuchos::rcp(new PHAL::GatherCoordinateVector<EvalT,PHAL::AlbanyTraits>(*p,dl));
fm0.template registerEvaluator<EvalT>(ev);

//--- Update Z Coordinate ---//
p = Teuchos::rcp(new Teuchos::ParameterList("Update Z Coordinate"));

// Input
p->set<std::string>("Old Coords Name", "Coord Vec Old");
p->set<std::string>("New Coords Name", Albany::coord_vec_name);
p->set<std::string>("Thickness Increment Name", "Extruded " + dof_names[1]);
p->set<std::string>("Past Thickness Name", initial_ice_thickness_name);
p->set<std::string>("Top Surface Name", surface_height_name);
p->set<std::string>("Bed Topography Name", bed_topography_name);
p->set<Teuchos::ParameterList*>("Physical Parameter List", &params->sublist("LandIce Physical Parameters"));

ev = Teuchos::rcp(new LandIce::UpdateZCoordinateMovingTop<EvalT,PHAL::AlbanyTraits>(*p, dl));
fm0.template registerEvaluator<EvalT>(ev);
} else {
//---- Gather coordinates
ev = evalUtils.constructGatherCoordinateVectorEvaluator();
fm0.template registerEvaluator<EvalT> (ev);
}
//---- Gather coordinates
ev = evalUtils.constructGatherCoordinateVectorEvaluator();
fm0.template registerEvaluator<EvalT> (ev);

//--- Compute actual thickness --- //
p = Teuchos::rcp(new Teuchos::ParameterList("Update Thickness"));
Expand Down
3 changes: 1 addition & 2 deletions src/evaluators/interpolation/PHAL_DOFGradInterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class FastSolutionGradInterpolationBase : public DOFGradInterpolationBase<EvalT,
}
};

#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION //assumes that the bases gradients are not FAD types
//this class assumes that the bases gradients are not FAD types
template<typename Traits>
class FastSolutionGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
: public DOFGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT> {
Expand Down Expand Up @@ -156,7 +156,6 @@ class FastSolutionGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, ty
#endif

};
#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION

// Some shortcut names
template<typename EvalT, typename Traits>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ evaluateFields(typename Traits::EvalData workset)

}
//Specialization for Jacobian evaluation taking advantage of the sparsity of the derivatives
//Note, this assumes that the mesh is not FAD type
// *********************************************************************
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION

// Kokkos kernel for Jacobian
#ifdef ALBANY_KOKKOS_UNDER_DEVELOPMENT
Expand Down Expand Up @@ -238,7 +238,6 @@ evaluateFields(typename Traits::EvalData workset)


}
#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION

//**********************************************************************

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class FastSolutionTensorGradInterpolationBase : public DOFTensorGradInterpolatio


//! Specialization for Jacobian evaluation taking advantage of known sparsity
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
template<typename Traits>
class FastSolutionTensorGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
: public DOFTensorGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
Expand Down Expand Up @@ -117,7 +116,6 @@ class FastSolutionTensorGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Trai

std::size_t offset;
};
#endif

// Some shortcut names
template<typename EvalT, typename Traits>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ namespace PHAL {
//Specialization for Jacobian evaluation taking advantage of the sparsity of the derivatives

//**********************************************************************
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
template<typename Traits>
void FastSolutionTensorGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>::
evaluateFields(typename Traits::EvalData workset)
Expand Down Expand Up @@ -101,6 +100,5 @@ namespace PHAL {
}
}
}
#endif

} // Namespace PHAL
3 changes: 1 addition & 2 deletions src/evaluators/interpolation/PHAL_DOFTensorInterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FastSolutionTensorInterpolationBase : public DOFTensorInterpolationBase<Ev


//! Specialization for Jacobian evaluation taking advantage of known sparsity
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
//! This assumes that the mesh coordinates are not a FAD type
template<typename Traits>
class FastSolutionTensorInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
: public DOFTensorInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
Expand Down Expand Up @@ -110,7 +110,6 @@ class FastSolutionTensorInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits,

std::size_t offset;
};
#endif


// Some shortcut names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ evaluateFields(typename Traits::EvalData workset)
//**********************************************************************
//! Specialization for Jacobian evaluation taking advantage of known sparsity

#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
template<typename Traits>
void FastSolutionTensorInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>::
evaluateFields(typename Traits::EvalData workset)
Expand Down Expand Up @@ -97,7 +96,6 @@ evaluateFields(typename Traits::EvalData workset)
}
}
}
#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION
//**********************************************************************

} // Namespace PHAL
4 changes: 2 additions & 2 deletions src/evaluators/interpolation/PHAL_DOFVecGradInterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class FastSolutionVecGradInterpolationBase : public DOFVecGradInterpolationBase<
};

//! Specialization for Jacobian evaluation taking advantage of known sparsity
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
//! This assumes that the Mesh coordinates are not a FAD type

template<typename Traits>
class FastSolutionVecGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
: public DOFVecGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
Expand Down Expand Up @@ -147,7 +148,6 @@ class FastSolutionVecGradInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits,

#endif
};
#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION

// Some shortcut names
template<typename EvalT, typename Traits>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ namespace PHAL {
}

// Specialization for Jacobian evaluation taking advantage of known sparsity
// This assumes that mesh coordinates are not FAD types
//**********************************************************************
//Kokkos functor Jacobian
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
#ifdef ALBANY_KOKKOS_UNDER_DEVELOPMENT
template<typename Traits>
KOKKOS_INLINE_FUNCTION
Expand Down Expand Up @@ -192,6 +192,5 @@ namespace PHAL {

#endif
}
#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION

} // Namespace PHAL
3 changes: 1 addition & 2 deletions src/evaluators/interpolation/PHAL_DOFVecInterpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class FastSolutionVecInterpolationBase
};

//! Specialization for Jacobian evaluation taking advantage of known sparsity
#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION
// This assumes that the Mesh coordinates are not of FAD type
template<typename Traits>
class FastSolutionVecInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
: public DOFVecInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typename PHAL::AlbanyTraits::Jacobian::ScalarT>
Expand Down Expand Up @@ -111,7 +111,6 @@ class FastSolutionVecInterpolationBase<PHAL::AlbanyTraits::Jacobian, Traits, typ

std::size_t offset;
};
#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION

// Some shortcut names
template<typename EvalT, typename Traits>
Expand Down
Loading