00001
00002
00003
00004
00005
00006
00007 #ifndef PHAL_DIRICHLET_COORDFUNC_HPP
00008 #define PHAL_DIRICHLET_COORDFUNC_HPP
00009
00010 #include "Phalanx_ConfigDefs.hpp"
00011 #include "Phalanx_Evaluator_WithBaseImpl.hpp"
00012 #include "Phalanx_Evaluator_Derived.hpp"
00013 #include "Phalanx_MDField.hpp"
00014
00015 #include "Teuchos_ParameterList.hpp"
00016 #include "Epetra_Vector.h"
00017
00018 #include "Sacado_ParameterAccessor.hpp"
00019 #include "PHAL_AlbanyTraits.hpp"
00020 #include "PHAL_Dirichlet.hpp"
00021
00022 #include "PHAL_IdentityCoordinateFunctionTraits.hpp"
00023
00024 namespace PHAL {
00030
00031
00032
00033
00034
00035
00036 template<typename EvalT, typename Traits, typename cfunc_traits = PHAL::IdentityCoordFunctionTraits<EvalT> >
00037 class DirichletCoordFunction;
00038
00039 template <typename EvalT, typename Traits, typename cfunc_traits = PHAL::IdentityCoordFunctionTraits<EvalT> >
00040 class DirichletCoordFunction_Base : public PHAL::DirichletBase<EvalT, Traits> {
00041 public:
00042 typedef typename EvalT::ScalarT ScalarT;
00043 DirichletCoordFunction_Base(Teuchos::ParameterList& p);
00044
00046 typedef cfunc_traits cfunc_traits_type;
00047
00048 cfunc_traits_type func;
00049
00050 };
00051
00052
00053
00054
00055
00056 template<typename Traits, typename cfunc_traits >
00057 class DirichletCoordFunction<PHAL::AlbanyTraits::Residual, Traits, cfunc_traits>
00058 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::Residual, Traits, cfunc_traits> {
00059 public:
00060 DirichletCoordFunction(Teuchos::ParameterList& p);
00061 typedef typename PHAL::AlbanyTraits::Residual::ScalarT ScalarT;
00062 void evaluateFields(typename Traits::EvalData d);
00063 };
00064
00065
00066
00067
00068
00069 template<typename Traits, typename cfunc_traits>
00070 class DirichletCoordFunction<PHAL::AlbanyTraits::Jacobian, Traits, cfunc_traits>
00071 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::Jacobian, Traits, cfunc_traits> {
00072 public:
00073 DirichletCoordFunction(Teuchos::ParameterList& p);
00074 typedef typename PHAL::AlbanyTraits::Jacobian::ScalarT ScalarT;
00075 void evaluateFields(typename Traits::EvalData d);
00076 };
00077
00078
00079
00080
00081
00082 template<typename Traits, typename cfunc_traits>
00083 class DirichletCoordFunction<PHAL::AlbanyTraits::Tangent, Traits, cfunc_traits>
00084 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::Tangent, Traits, cfunc_traits> {
00085 public:
00086 DirichletCoordFunction(Teuchos::ParameterList& p);
00087 typedef typename PHAL::AlbanyTraits::Tangent::ScalarT ScalarT;
00088 void evaluateFields(typename Traits::EvalData d);
00089 };
00090
00091
00092
00093
00094 #ifdef ALBANY_SG_MP
00095
00096 template<typename Traits, typename cfunc_traits>
00097 class DirichletCoordFunction<PHAL::AlbanyTraits::SGResidual, Traits, cfunc_traits>
00098 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::SGResidual, Traits, cfunc_traits> {
00099 public:
00100 DirichletCoordFunction(Teuchos::ParameterList& p);
00101 typedef typename PHAL::AlbanyTraits::SGResidual::ScalarT ScalarT;
00102 void evaluateFields(typename Traits::EvalData d);
00103 };
00104
00105
00106
00107
00108
00109 template<typename Traits, typename cfunc_traits>
00110 class DirichletCoordFunction<PHAL::AlbanyTraits::SGJacobian, Traits, cfunc_traits>
00111 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::SGJacobian, Traits, cfunc_traits> {
00112 public:
00113 DirichletCoordFunction(Teuchos::ParameterList& p);
00114 typedef typename PHAL::AlbanyTraits::SGJacobian::ScalarT ScalarT;
00115 void evaluateFields(typename Traits::EvalData d);
00116 };
00117
00118
00119
00120
00121
00122 template<typename Traits, typename cfunc_traits>
00123 class DirichletCoordFunction<PHAL::AlbanyTraits::SGTangent, Traits, cfunc_traits>
00124 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::SGTangent, Traits, cfunc_traits> {
00125 public:
00126 DirichletCoordFunction(Teuchos::ParameterList& p);
00127 typedef typename PHAL::AlbanyTraits::SGTangent::ScalarT ScalarT;
00128 void evaluateFields(typename Traits::EvalData d);
00129 };
00130
00131
00132
00133
00134
00135 template<typename Traits, typename cfunc_traits>
00136 class DirichletCoordFunction<PHAL::AlbanyTraits::MPResidual, Traits, cfunc_traits>
00137 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::MPResidual, Traits, cfunc_traits> {
00138 public:
00139 DirichletCoordFunction(Teuchos::ParameterList& p);
00140 typedef typename PHAL::AlbanyTraits::MPResidual::ScalarT ScalarT;
00141 void evaluateFields(typename Traits::EvalData d);
00142 };
00143
00144
00145
00146
00147
00148 template<typename Traits, typename cfunc_traits>
00149 class DirichletCoordFunction<PHAL::AlbanyTraits::MPJacobian, Traits, cfunc_traits>
00150 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::MPJacobian, Traits, cfunc_traits> {
00151 public:
00152 DirichletCoordFunction(Teuchos::ParameterList& p);
00153 typedef typename PHAL::AlbanyTraits::MPJacobian::ScalarT ScalarT;
00154 void evaluateFields(typename Traits::EvalData d);
00155 };
00156
00157
00158
00159
00160
00161 template<typename Traits, typename cfunc_traits>
00162 class DirichletCoordFunction<PHAL::AlbanyTraits::MPTangent, Traits, cfunc_traits>
00163 : public DirichletCoordFunction_Base<PHAL::AlbanyTraits::MPTangent, Traits, cfunc_traits> {
00164 public:
00165 DirichletCoordFunction(Teuchos::ParameterList& p);
00166 typedef typename PHAL::AlbanyTraits::MPTangent::ScalarT ScalarT;
00167 void evaluateFields(typename Traits::EvalData d);
00168 };
00169 #endif //ALBANY_SG_MP
00170
00171 }
00172
00173 #endif