• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Albany_ThermoElectrostaticsProblem.cpp

Go to the documentation of this file.
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 #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   /* Construct All Phalanx Evaluators */
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   // Call constructeEvaluators<EvalT>(*rfm[0], *meshSpecs[0], stateMgr);
00056   // for each EvalT in PHAL::AlbanyTraits::BEvalTypes
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    // Construct Dirichlet evaluators for all nodesets and names
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 }

Generated on Wed Mar 26 2014 18:36:36 for Albany: a Trilinos-based PDE code by  doxygen 1.7.1