Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #include "Albany_ThermoElectrostaticsProblem.hpp"
00008
00009 #include "Intrepid_FieldContainer.hpp"
00010 #include "Intrepid_DefaultCubatureFactory.hpp"
00011 #include "Shards_CellTopology.hpp"
00012 #include "PHAL_FactoryTraits.hpp"
00013 #include "Albany_Utils.hpp"
00014 #include "Albany_ProblemUtils.hpp"
00015
00016
00017 Albany::ThermoElectrostaticsProblem::
00018 ThermoElectrostaticsProblem( const Teuchos::RCP<Teuchos::ParameterList>& params_,
00019 const Teuchos::RCP<ParamLib>& paramLib_,
00020 const int numDim_) :
00021 Albany::AbstractProblem(params_, paramLib_, 2),
00022 numDim(numDim_)
00023 {
00024 }
00025
00026 Albany::ThermoElectrostaticsProblem::
00027 ~ThermoElectrostaticsProblem()
00028 {
00029 }
00030
00031 void
00032 Albany::ThermoElectrostaticsProblem::
00033 buildProblem(
00034 Teuchos::ArrayRCP<Teuchos::RCP<Albany::MeshSpecsStruct> > meshSpecs,
00035 Albany::StateManager& stateMgr)
00036 {
00037
00038 TEUCHOS_TEST_FOR_EXCEPTION(meshSpecs.size()!=1,std::logic_error,"Problem supports one Material Block");
00039 fm.resize(1);
00040 fm[0] = Teuchos::rcp(new PHX::FieldManager<PHAL::AlbanyTraits>);
00041 buildEvaluators(*fm[0], *meshSpecs[0], stateMgr, BUILD_RESID_FM,
00042 Teuchos::null);
00043 constructDirichletEvaluators(*meshSpecs[0]);
00044 }
00045
00046 Teuchos::Array< Teuchos::RCP<const PHX::FieldTag> >
00047 Albany::ThermoElectrostaticsProblem::
00048 buildEvaluators(
00049 PHX::FieldManager<PHAL::AlbanyTraits>& fm0,
00050 const Albany::MeshSpecsStruct& meshSpecs,
00051 Albany::StateManager& stateMgr,
00052 Albany::FieldManagerChoice fmchoice,
00053 const Teuchos::RCP<Teuchos::ParameterList>& responseList)
00054 {
00055
00056
00057 ConstructEvaluatorsOp<ThermoElectrostaticsProblem> op(
00058 *this, fm0, meshSpecs, stateMgr, fmchoice, responseList);
00059 boost::mpl::for_each<PHAL::AlbanyTraits::BEvalTypes>(op);
00060 return *op.tags;
00061 }
00062
00063 void
00064 Albany::ThermoElectrostaticsProblem::constructDirichletEvaluators(
00065 const Albany::MeshSpecsStruct& meshSpecs)
00066 {
00067
00068
00069 std::vector<std::string> dirichletNames(neq);
00070 dirichletNames[0] = "Phi";
00071 dirichletNames[1] = "T";
00072 Albany::BCUtils<Albany::DirichletTraits> dirUtils;
00073 dfm = dirUtils.constructBCEvaluators(meshSpecs.nsNames, dirichletNames,
00074 this->params, this->paramLib);
00075 }
00076
00077 Teuchos::RCP<const Teuchos::ParameterList>
00078 Albany::ThermoElectrostaticsProblem::getValidProblemParameters() const
00079 {
00080 Teuchos::RCP<Teuchos::ParameterList> validPL =
00081 this->getGenericProblemParams("ValidThermoElectrostaticsProblemParams");
00082
00083 validPL->sublist("TE Properties", false, "");
00084 validPL->set("Convection Velocity", "{0,0,0}", "");
00085
00086 return validPL;
00087 }