00001 //*****************************************************************// 00002 // Albany 2.0: Copyright 2012 Sandia Corporation // 00003 // This Software is released under the BSD license detailed // 00004 // in the file "license.txt" in the top-level Albany directory // 00005 //*****************************************************************// 00006 00007 00008 // Generic implementations that can be used for more sophisticated functions 00009 00010 namespace PHAL { 00011 00012 //---------------------------------------------------------------------------- 00013 template <typename EvalT> 00014 IdentityCoordFunctionTraits<EvalT>:: 00015 IdentityCoordFunctionTraits(Teuchos::ParameterList& p) { 00016 00017 numEqn = p.get<int>("Number of Equations"); 00018 eqnOffset = p.get<int>("Equation Offset"); 00019 00020 } 00021 00022 // ********************************************************************** 00023 template<typename EvalT> 00024 void 00025 IdentityCoordFunctionTraits<EvalT>:: 00026 computeBCs(double* coord, std::vector<ScalarT>& BCVals, const RealType time) { 00027 00028 // Apply the desired function to the coordinate values here 00029 for(int i = 0; i < numEqn; i++) 00030 00031 BCVals[i] = coord[i]; 00032 00033 } 00034 00035 }