From dbc9832ab9bde7392b72d10a71f1cab58785f650 Mon Sep 17 00:00:00 2001 From: Mauro Perego Date: Thu, 20 Oct 2022 11:12:05 -0600 Subject: [PATCH] Remove option "MESH_DEPENDS_ON_SOLUTION", issue #840 --- .../ctest_nightly_tmp.cmake | 6 ---- src/Albany_config.h.in | 1 - src/LandIce/problems/LandIce_StokesFOBase.hpp | 4 +-- .../problems/LandIce_StokesFOThickness.cpp | 2 +- .../problems/LandIce_StokesFOThickness.hpp | 32 ++----------------- .../PHAL_DOFGradInterpolation.hpp | 3 +- .../PHAL_DOFGradInterpolation_Def.hpp | 3 +- .../PHAL_DOFTensorGradInterpolation.hpp | 2 -- .../PHAL_DOFTensorGradInterpolation_Def.hpp | 2 -- .../PHAL_DOFTensorInterpolation.hpp | 3 +- .../PHAL_DOFTensorInterpolation_Def.hpp | 2 -- .../PHAL_DOFVecGradInterpolation.hpp | 4 +-- .../PHAL_DOFVecGradInterpolation_Def.hpp | 3 +- .../PHAL_DOFVecInterpolation.hpp | 3 +- .../PHAL_DOFVecInterpolation_Def.hpp | 4 +-- 15 files changed, 14 insertions(+), 60 deletions(-) diff --git a/doc/dashboards/cee-compute011.sandia.gov/ctest_nightly_tmp.cmake b/doc/dashboards/cee-compute011.sandia.gov/ctest_nightly_tmp.cmake index 389aa4c5fc..6176b03343 100755 --- a/doc/dashboards/cee-compute011.sandia.gov/ctest_nightly_tmp.cmake +++ b/doc/dashboards/cee-compute011.sandia.gov/ctest_nightly_tmp.cmake @@ -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) @@ -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}" diff --git a/src/Albany_config.h.in b/src/Albany_config.h.in index 0b2d982f00..2a1fcb2a35 100644 --- a/src/Albany_config.h.in +++ b/src/Albany_config.h.in @@ -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 diff --git a/src/LandIce/problems/LandIce_StokesFOBase.hpp b/src/LandIce/problems/LandIce_StokesFOBase.hpp index 040c43ef2f..d5e23ec066 100644 --- a/src/LandIce/problems/LandIce_StokesFOBase.hpp +++ b/src/LandIce/problems/LandIce_StokesFOBase.hpp @@ -698,7 +698,7 @@ constructInterpolationEvaluators (PHX::FieldManager& 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 @@ -819,7 +819,7 @@ constructInterpolationEvaluators (PHX::FieldManager& 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. diff --git a/src/LandIce/problems/LandIce_StokesFOThickness.cpp b/src/LandIce/problems/LandIce_StokesFOThickness.cpp index 0e3042f9eb..73cd78cce7 100644 --- a/src/LandIce/problems/LandIce_StokesFOThickness.cpp +++ b/src/LandIce/problems/LandIce_StokesFOThickness.cpp @@ -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); diff --git a/src/LandIce/problems/LandIce_StokesFOThickness.hpp b/src/LandIce/problems/LandIce_StokesFOThickness.hpp index bbe4df167f..ef7d12b8a8 100644 --- a/src/LandIce/problems/LandIce_StokesFOThickness.hpp +++ b/src/LandIce/problems/LandIce_StokesFOThickness.hpp @@ -252,35 +252,9 @@ void StokesFOThickness::constructThicknessEvaluators (PHX::FieldManager(*p,dl)); fm0.template registerEvaluator(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("Coordinate Vector Name", "Coord Vec Old"); - - ev = Teuchos::rcp(new PHAL::GatherCoordinateVector(*p,dl)); - fm0.template registerEvaluator(ev); - - //--- Update Z Coordinate ---// - p = Teuchos::rcp(new Teuchos::ParameterList("Update Z Coordinate")); - - // Input - p->set("Old Coords Name", "Coord Vec Old"); - p->set("New Coords Name", Albany::coord_vec_name); - p->set("Thickness Increment Name", "Extruded " + dof_names[1]); - p->set("Past Thickness Name", initial_ice_thickness_name); - p->set("Top Surface Name", surface_height_name); - p->set("Bed Topography Name", bed_topography_name); - p->set("Physical Parameter List", ¶ms->sublist("LandIce Physical Parameters")); - - ev = Teuchos::rcp(new LandIce::UpdateZCoordinateMovingTop(*p, dl)); - fm0.template registerEvaluator(ev); - } else { - //---- Gather coordinates - ev = evalUtils.constructGatherCoordinateVectorEvaluator(); - fm0.template registerEvaluator (ev); - } + //---- Gather coordinates + ev = evalUtils.constructGatherCoordinateVectorEvaluator(); + fm0.template registerEvaluator (ev); //--- Compute actual thickness --- // p = Teuchos::rcp(new Teuchos::ParameterList("Update Thickness")); diff --git a/src/evaluators/interpolation/PHAL_DOFGradInterpolation.hpp b/src/evaluators/interpolation/PHAL_DOFGradInterpolation.hpp index 37bfbd432e..cece7ee5de 100644 --- a/src/evaluators/interpolation/PHAL_DOFGradInterpolation.hpp +++ b/src/evaluators/interpolation/PHAL_DOFGradInterpolation.hpp @@ -112,7 +112,7 @@ class FastSolutionGradInterpolationBase : public DOFGradInterpolationBase class FastSolutionGradInterpolationBase : public DOFGradInterpolationBase { @@ -156,7 +156,6 @@ class FastSolutionGradInterpolationBase diff --git a/src/evaluators/interpolation/PHAL_DOFGradInterpolation_Def.hpp b/src/evaluators/interpolation/PHAL_DOFGradInterpolation_Def.hpp index a6598229a7..abb60eec6d 100644 --- a/src/evaluators/interpolation/PHAL_DOFGradInterpolation_Def.hpp +++ b/src/evaluators/interpolation/PHAL_DOFGradInterpolation_Def.hpp @@ -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 @@ -238,7 +238,6 @@ evaluateFields(typename Traits::EvalData workset) } -#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION //********************************************************************** diff --git a/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation.hpp b/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation.hpp index c468a663b6..afd2d54e0d 100644 --- a/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation.hpp +++ b/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation.hpp @@ -88,7 +88,6 @@ class FastSolutionTensorGradInterpolationBase : public DOFTensorGradInterpolatio //! Specialization for Jacobian evaluation taking advantage of known sparsity -#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION template class FastSolutionTensorGradInterpolationBase : public DOFTensorGradInterpolationBase @@ -117,7 +116,6 @@ class FastSolutionTensorGradInterpolationBase diff --git a/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation_Def.hpp b/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation_Def.hpp index cd3c7b7c6b..85a70dc84d 100644 --- a/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation_Def.hpp +++ b/src/evaluators/interpolation/PHAL_DOFTensorGradInterpolation_Def.hpp @@ -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 void FastSolutionTensorGradInterpolationBase:: evaluateFields(typename Traits::EvalData workset) @@ -101,6 +100,5 @@ namespace PHAL { } } } -#endif } // Namespace PHAL diff --git a/src/evaluators/interpolation/PHAL_DOFTensorInterpolation.hpp b/src/evaluators/interpolation/PHAL_DOFTensorInterpolation.hpp index d2d1f690fd..9f4ee23b24 100644 --- a/src/evaluators/interpolation/PHAL_DOFTensorInterpolation.hpp +++ b/src/evaluators/interpolation/PHAL_DOFTensorInterpolation.hpp @@ -81,7 +81,7 @@ class FastSolutionTensorInterpolationBase : public DOFTensorInterpolationBase class FastSolutionTensorInterpolationBase : public DOFTensorInterpolationBase @@ -110,7 +110,6 @@ class FastSolutionTensorInterpolationBase void FastSolutionTensorInterpolationBase:: evaluateFields(typename Traits::EvalData workset) @@ -97,7 +96,6 @@ evaluateFields(typename Traits::EvalData workset) } } } -#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION //********************************************************************** } // Namespace PHAL diff --git a/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation.hpp b/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation.hpp index f708369691..0a2ca6a174 100644 --- a/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation.hpp +++ b/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation.hpp @@ -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 class FastSolutionVecGradInterpolationBase : public DOFVecGradInterpolationBase @@ -147,7 +148,6 @@ class FastSolutionVecGradInterpolationBase diff --git a/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation_Def.hpp b/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation_Def.hpp index c4bf46cdc2..4012d41f1f 100644 --- a/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation_Def.hpp +++ b/src/evaluators/interpolation/PHAL_DOFVecGradInterpolation_Def.hpp @@ -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 KOKKOS_INLINE_FUNCTION @@ -192,6 +192,5 @@ namespace PHAL { #endif } -#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION } // Namespace PHAL diff --git a/src/evaluators/interpolation/PHAL_DOFVecInterpolation.hpp b/src/evaluators/interpolation/PHAL_DOFVecInterpolation.hpp index 15ba3225a9..41dc7d24b5 100644 --- a/src/evaluators/interpolation/PHAL_DOFVecInterpolation.hpp +++ b/src/evaluators/interpolation/PHAL_DOFVecInterpolation.hpp @@ -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 class FastSolutionVecInterpolationBase : public DOFVecInterpolationBase @@ -111,7 +111,6 @@ class FastSolutionVecInterpolationBase diff --git a/src/evaluators/interpolation/PHAL_DOFVecInterpolation_Def.hpp b/src/evaluators/interpolation/PHAL_DOFVecInterpolation_Def.hpp index 3d60e66a26..6523bb9d19 100644 --- a/src/evaluators/interpolation/PHAL_DOFVecInterpolation_Def.hpp +++ b/src/evaluators/interpolation/PHAL_DOFVecInterpolation_Def.hpp @@ -133,10 +133,9 @@ std::cout<< "DOFVecInterpolationBase Residual time = " << millisec << " " << } // Specialization for Jacobian evaluation taking advantage of known sparsity +// This assumes that the Mesh coordinates are not of FAD type //********************************************************************** -#ifndef ALBANY_MESH_DEPENDS_ON_SOLUTION - //Kokkos kernel for Jacobian template class VecInterpolationJacob { @@ -221,6 +220,5 @@ evaluateFields(typename Traits::EvalData workset) #endif } -#endif //ALBANY_MESH_DEPENDS_ON_SOLUTION }