diff --git a/src/ATO/evaluators/ATO_HomogenizedConstantsResponse.hpp b/src/ATO/evaluators/ATO_HomogenizedConstantsResponse.hpp index b516f5e4d0..ba151bf853 100644 --- a/src/ATO/evaluators/ATO_HomogenizedConstantsResponse.hpp +++ b/src/ATO/evaluators/ATO_HomogenizedConstantsResponse.hpp @@ -123,8 +123,8 @@ namespace ATO std::string FName; static const std::string className; - PHX::MDField field; - PHX::MDField weights; + PHX::MDField field; + PHX::MDField weights; Teuchos::RCP< PHX::Tag > objective_tag; Kokkos::vector component0, component1; diff --git a/src/ATO/evaluators/ATO_HomogenizedConstantsResponse_Def.hpp b/src/ATO/evaluators/ATO_HomogenizedConstantsResponse_Def.hpp index 84431055f3..2778da61aa 100644 --- a/src/ATO/evaluators/ATO_HomogenizedConstantsResponse_Def.hpp +++ b/src/ATO/evaluators/ATO_HomogenizedConstantsResponse_Def.hpp @@ -42,7 +42,7 @@ HomogenizedConstantsResponse(Teuchos::ParameterList& p, "Invalid field type " << fieldType << ". Support values are " << "Scalar, Vector, and Tensor." << std::endl); } - field = PHX::MDField(field_name, field_layout); + field = decltype(field)(field_name, field_layout); int field_rank = field_layout->rank(); tensorRank = field_rank - 2; //first 2 dimensions are cell and qp. diff --git a/src/ATO/evaluators/ATO_InternalEnergyResponse.hpp b/src/ATO/evaluators/ATO_InternalEnergyResponse.hpp index 0a6a67cf65..d877cdc839 100644 --- a/src/ATO/evaluators/ATO_InternalEnergyResponse.hpp +++ b/src/ATO/evaluators/ATO_InternalEnergyResponse.hpp @@ -48,11 +48,9 @@ namespace ATO std::string elementBlockName; static const std::string className; -// PHX::MDField gradX; -// PHX::MDField workConj; - PHX::MDField qp_weights; - PHX::MDField BF; - Teuchos::Array > topos; + PHX::MDField qp_weights; + PHX::MDField BF; + Teuchos::Array > topos; Teuchos::RCP< PHX::Tag > stiffness_objective_tag; diff --git a/src/ATO/evaluators/ATO_InternalEnergyResponse_Def.hpp b/src/ATO/evaluators/ATO_InternalEnergyResponse_Def.hpp index fe6d70d3cb..c8a7778d76 100644 --- a/src/ATO/evaluators/ATO_InternalEnergyResponse_Def.hpp +++ b/src/ATO/evaluators/ATO_InternalEnergyResponse_Def.hpp @@ -78,7 +78,7 @@ InternalEnergyResponse(Teuchos::ParameterList& p, (*topologies)[itopo]->getEntityType() != "Distributed Parameter", Teuchos::Exceptions::InvalidParameter, std::endl << "Error! InternalEnergyResponse requires 'Distributed Parameter' based topology" << std::endl); - topos[itopo] = PHX::MDField((*topologies)[itopo]->getName(),dl->node_scalar); + topos[itopo] = PHX::MDField((*topologies)[itopo]->getName(),dl->node_scalar); this->addDependentField(topos[itopo]); } @@ -89,7 +89,7 @@ InternalEnergyResponse(Teuchos::ParameterList& p, this->addDependentField(qp_weights); this->addDependentField(BF); - Teuchos::Array< PHX::MDField > depFields; + Teuchos::Array< PHX::MDField > depFields; penaltyModel->getDependentFields(depFields); int nFields = depFields.size(); @@ -135,7 +135,7 @@ postRegistrationSetup(typename Traits::SetupData d, this->utils.setFieldData(qp_weights,fm); this->utils.setFieldData(BF,fm); - Teuchos::Array* > depFields; + Teuchos::Array* > depFields; penaltyModel->getDependentFields(depFields); int nFields = depFields.size(); diff --git a/src/ATO/evaluators/ATO_ModalObjective.hpp b/src/ATO/evaluators/ATO_ModalObjective.hpp index ac740a6a33..80c435eff4 100644 --- a/src/ATO/evaluators/ATO_ModalObjective.hpp +++ b/src/ATO/evaluators/ATO_ModalObjective.hpp @@ -53,12 +53,12 @@ namespace ATO { std::string FName; static const std::string className; - PHX::MDField qp_weights; - PHX::MDField BF; - PHX::MDField val_qp; - PHX::MDField gradX; - PHX::MDField workConj; - PHX::MDField eigval; + PHX::MDField qp_weights; + PHX::MDField BF; + PHX::MDField val_qp; + PHX::MDField gradX; + PHX::MDField workConj; + PHX::MDField eigval; Teuchos::RCP< PHX::Tag > modal_objective_tag; Albany::StateManager* pStateMgr; diff --git a/src/ATO/evaluators/ATO_StiffnessObjective.hpp b/src/ATO/evaluators/ATO_StiffnessObjective.hpp index 1e527668d6..64c7510108 100644 --- a/src/ATO/evaluators/ATO_StiffnessObjective.hpp +++ b/src/ATO/evaluators/ATO_StiffnessObjective.hpp @@ -56,8 +56,8 @@ namespace ATO { std::string elementBlockName; static const std::string className; - PHX::MDField qp_weights; - PHX::MDField BF; + PHX::MDField qp_weights; + PHX::MDField BF; Teuchos::RCP< PHX::Tag > stiffness_objective_tag; Albany::StateManager* pStateMgr; diff --git a/src/ATO/evaluators/ATO_StiffnessObjective_Def.hpp b/src/ATO/evaluators/ATO_StiffnessObjective_Def.hpp index aad4d2d371..1e3e149c1a 100644 --- a/src/ATO/evaluators/ATO_StiffnessObjective_Def.hpp +++ b/src/ATO/evaluators/ATO_StiffnessObjective_Def.hpp @@ -64,7 +64,7 @@ StiffnessObjectiveBase(Teuchos::ParameterList& p, this->addDependentField(qp_weights); this->addDependentField(BF); - Teuchos::Array< PHX::MDField > depFields; + Teuchos::Array< PHX::MDField > depFields; penaltyModel->getDependentFields(depFields); int nFields = depFields.size(); @@ -88,7 +88,7 @@ postRegistrationSetup(typename Traits::SetupData d, this->utils.setFieldData(qp_weights,fm); this->utils.setFieldData(BF,fm); - Teuchos::Array* > depFields; + Teuchos::Array* > depFields; penaltyModel->getDependentFields(depFields); int nFields = depFields.size(); diff --git a/src/ATO/evaluators/ATO_TensorPNormResponse.hpp b/src/ATO/evaluators/ATO_TensorPNormResponse.hpp index 45957ace25..7a6bae765c 100644 --- a/src/ATO/evaluators/ATO_TensorPNormResponse.hpp +++ b/src/ATO/evaluators/ATO_TensorPNormResponse.hpp @@ -157,10 +157,10 @@ namespace ATO void TransformResponse (int Cell, int QP, ScalarT& response_eff); std::string FName; static const std::string className; - PHX::MDField tensor; - PHX::MDField qp_weights; - PHX::MDField BF; - PHX::MDField topo; + PHX::MDField tensor; + PHX::MDField qp_weights; + PHX::MDField BF; + PHX::MDField topo; Teuchos::RCP< PHX::Tag > objective_tag; Teuchos::RCP topology; diff --git a/src/ATO/evaluators/ATO_TensorPNormResponse_Def.hpp b/src/ATO/evaluators/ATO_TensorPNormResponse_Def.hpp index c8d8fea7b6..0863283c03 100644 --- a/src/ATO/evaluators/ATO_TensorPNormResponse_Def.hpp +++ b/src/ATO/evaluators/ATO_TensorPNormResponse_Def.hpp @@ -39,8 +39,7 @@ TensorPNormResponse(Teuchos::ParameterList& p, "!" << std::endl << "Options are (QP Tensor, QP Vector)" << std::endl); - PHX::MDField _tensor(responseParams->get("Tensor Field Name"), layout); - tensor = _tensor; + tensor = decltype(tensor)(responseParams->get("Tensor Field Name"), layout); Teuchos::RCP paramsFromProblem = p.get< Teuchos::RCP >("Parameters From Problem"); @@ -203,7 +202,7 @@ TensorPNormResponse(Teuchos::ParameterList& p, Teuchos::Exceptions::InvalidParameter, std::endl << "Error! TensorPNormResponse requires 'Distributed Parameter' based topology" << std::endl); - topo = PHX::MDField(topology->getName(),dl->node_scalar); + topo = decltype(topo)(topology->getName(),dl->node_scalar); this->pStateMgr = p.get< Albany::StateManager* >("State Manager Ptr"); this->pStateMgr->registerStateVariable("Effective Stress", diff --git a/src/ATO/utils/ATO_PenaltyModel.hpp b/src/ATO/utils/ATO_PenaltyModel.hpp index a21579911b..d8f925e3c8 100644 --- a/src/ATO/utils/ATO_PenaltyModel.hpp +++ b/src/ATO/utils/ATO_PenaltyModel.hpp @@ -15,12 +15,12 @@ class PenaltyModel { PenaltyModel( Teuchos::ParameterList& p, const Teuchos::RCP& dl ); virtual void Evaluate(Teuchos::Array& topoVals, Teuchos::RCP& topologies, int cell, int qp, N& response, Teuchos::Array& dResponse)=0; - virtual void getDependentFields(Teuchos::Array >& depFields)=0; - virtual void getDependentFields(Teuchos::Array< PHX::MDField* >& depFields)=0; + virtual void getDependentFields(Teuchos::Array >& depFields)=0; + virtual void getDependentFields(Teuchos::Array< PHX::MDField* >& depFields)=0; void getFieldDimensions(std::vector& dims); protected: int numDims, rank; - PHX::MDField gradX; + PHX::MDField gradX; }; /******************************************************************************/ @@ -37,15 +37,15 @@ class PenaltyMixture : public PenaltyModel { const Teuchos::RCP& dl); void Evaluate(Teuchos::Array& topoVals, Teuchos::RCP& topologies, int cell, int qp, N& response, Teuchos::Array& dResponse); - void getDependentFields(Teuchos::Array >& depFields); - void getDependentFields(Teuchos::Array< PHX::MDField* >& depFields); + void getDependentFields(Teuchos::Array >& depFields); + void getDependentFields(Teuchos::Array< PHX::MDField* >& depFields); private: int topologyIndex; int functionIndex; Teuchos::Array materialIndices; Teuchos::Array mixtureTopologyIndices; Teuchos::Array mixtureFunctionIndices; - Teuchos::Array > workConj; + Teuchos::Array > workConj; }; /******************************************************************************/ @@ -63,12 +63,12 @@ class PenaltyMaterial : public PenaltyModel { const Teuchos::RCP& dl); void Evaluate(Teuchos::Array& topoVals, Teuchos::RCP& topologies, int cell, int qp, N& response, Teuchos::Array& dResponse); - void getDependentFields(Teuchos::Array >& depFields); - void getDependentFields(Teuchos::Array< PHX::MDField* >& depFields); + void getDependentFields(Teuchos::Array >& depFields); + void getDependentFields(Teuchos::Array< PHX::MDField* >& depFields); private: int topologyIndex; int functionIndex; - PHX::MDField workConj; + PHX::MDField workConj; }; /******************************************************************************/ diff --git a/src/ATO/utils/ATO_PenaltyModel_Def.hpp b/src/ATO/utils/ATO_PenaltyModel_Def.hpp index 0c27c2fc4d..4eef3995e0 100644 --- a/src/ATO/utils/ATO_PenaltyModel_Def.hpp +++ b/src/ATO/utils/ATO_PenaltyModel_Def.hpp @@ -23,7 +23,7 @@ PenaltyModel(Teuchos::ParameterList& p, const Teuchos::RCP& dl) "!" << std::endl << "Options are (QP Tensor3, QP Tensor, QP Vector)" << std::endl); - PHX::MDField _gradX(responseParams->get("Gradient Field Name"), layout); + PHX::MDField _gradX(responseParams->get("Gradient Field Name"), layout); gradX = _gradX; std::vector dims; @@ -63,7 +63,7 @@ PenaltyMixture(Teuchos::ParameterList& blockParams, workConj.resize(nMats); for(int imat=0; imat _workConj(Albany::strint(workConjBaseName,imat), layout); + PHX::MDField _workConj(Albany::strint(workConjBaseName,imat), layout); workConj[imat] = _workConj; } @@ -108,7 +108,7 @@ getFieldDimensions(std::vector& dims) /******************************************************************************/ template void ATO::PenaltyMixture:: -getDependentFields(Teuchos::Array >& depFields) +getDependentFields(Teuchos::Array >& depFields) /******************************************************************************/ { int nWCs = workConj.size(); @@ -122,7 +122,7 @@ getDependentFields(Teuchos::Array >& depFields) /******************************************************************************/ template void ATO::PenaltyMixture:: -getDependentFields(Teuchos::Array* >& depFields) +getDependentFields(Teuchos::Array* >& depFields) /******************************************************************************/ { int nWCs = workConj.size(); @@ -137,7 +137,7 @@ getDependentFields(Teuchos::Array* >& depFields) /******************************************************************************/ template void ATO::PenaltyMaterial:: -getDependentFields(Teuchos::Array >& depFields) +getDependentFields(Teuchos::Array >& depFields) /******************************************************************************/ { depFields.resize(2); @@ -148,7 +148,7 @@ getDependentFields(Teuchos::Array >& depFields) /******************************************************************************/ template void ATO::PenaltyMaterial:: -getDependentFields(Teuchos::Array* >& depFields) +getDependentFields(Teuchos::Array* >& depFields) /******************************************************************************/ { depFields.resize(2); @@ -181,7 +181,7 @@ PenaltyMaterial(Teuchos::ParameterList& blockParams, "!" << std::endl << "Options are (QP Tensor3, QP Tensor, QP Vector)" << std::endl); - PHX::MDField _workConj(responseParams->get("Work Conjugate Name"), layout); + PHX::MDField _workConj(responseParams->get("Work Conjugate Name"), layout); workConj = _workConj; topologyIndex = responseParams->get("Topology Index");