11 #ifndef PANZER_EQUATIONSET_DEFAULT_IMPL_IMPL_HPP
12 #define PANZER_EQUATIONSET_DEFAULT_IMPL_IMPL_HPP
19 #include "Panzer_GatherBasisCoordinates.hpp"
20 #include "Panzer_GatherIntegrationCoordinates.hpp"
21 #include "Panzer_GatherOrientation.hpp"
24 #include "Phalanx_MDField.hpp"
25 #include "Phalanx_DataLayout.hpp"
26 #include "Phalanx_DataLayout_MDALayout.hpp"
33 template <
typename EvalT>
36 const int& default_integration_order,
39 const bool build_transient_support) :
41 m_input_params(params),
42 m_default_integration_order(default_integration_order),
43 m_cell_data(cell_data),
44 m_build_transient_support(build_transient_support)
52 template <
typename EvalT>
57 m_type = m_input_params->get<std::string>(
"Type");
64 this->m_provided_dofs.clear();
65 this->m_int_rules.clear();
68 for(
typename std::map<std::string,DOFDescriptor>::iterator itr=m_provided_dofs_desc.begin();
69 itr!=m_provided_dofs_desc.end();++itr) {
73 this->m_provided_dofs.push_back(std::make_pair(itr->first, itr->second.basis));
84 m_int_rules[itr->second.intRule->order()] = itr->second.intRule;
89 for (
DescriptorIterator dof_iter = m_provided_dofs_desc.begin(); dof_iter != m_provided_dofs_desc.end(); ++dof_iter) {
91 std::string basis_name = dof_iter->second.basis->name();
93 std::string dof_name = dof_iter->first;
95 if (
is_null(m_basis_to_dofs[basis_name].first)) {
96 m_basis_to_dofs[basis_name].first = basis;
97 m_basis_to_dofs[basis_name].second =
Teuchos::rcp(
new std::vector<std::string>);
100 m_basis_to_dofs[basis_name].second->push_back(dof_name);
104 for (
DescriptorIterator dof_iter = m_provided_dofs_desc.begin(); dof_iter != m_provided_dofs_desc.end(); ++dof_iter) {
105 m_unique_bases[dof_iter->second.basis->name()] = dof_iter->second.basis;
109 this->m_eval_plist->set(
"Block ID", getElementBlockId());
110 this->setupDeprecatedDOFsSupport();
114 template <
typename EvalT>
126 this->m_eval_plist->set(
"Basis", basis);
127 this->m_eval_plist->set(
"IR", int_rule);
131 template <
typename EvalT>
147 for (
BasisIterator basis_it = m_basis_to_dofs.begin(); basis_it != m_basis_to_dofs.end(); ++basis_it) {
151 if (m_tangent_param_names.size() > 0) {
152 tangent_field_names =
rcp(
new std::vector< std::vector<std::string> >(basis_it->second.second->size()));
153 for (std::size_t i=0; i<basis_it->second.second->size(); ++i) {
154 for (std::size_t j=0; j<m_tangent_param_names.size(); ++j) {
155 const std::string tname =
156 (*(basis_it->second.second))[i] +
" SENSITIVITY " + m_tangent_param_names[j];
157 (*tangent_field_names)[i].push_back(tname);
163 ParameterList p(
"Gather");
164 p.set(
"Basis", basis_it->second.first);
165 p.set(
"DOF Names", basis_it->second.second);
166 p.set(
"Indexer Names", basis_it->second.second);
167 p.set(
"Sensitivities Name",
"");
168 p.set(
"First Sensitivities Available",
true);
169 p.set(
"Second Sensitivities Available",
true);
172 if (tangent_field_names != Teuchos::null)
173 p.set(
"Tangent Names", tangent_field_names);
177 this->
template registerEvaluator<EvalT>(fm, op);
182 if (tangent_field_names != Teuchos::null) {
183 for (std::size_t i=0; i<m_tangent_param_names.size(); ++i) {
186 for (std::size_t j=0; j<basis_it->second.second->size(); ++j)
187 names->push_back((*tangent_field_names)[j][i]);
189 ParameterList p(std::string(
"Gather Tangent ") + this->m_tangent_param_names[i]);
190 p.set(
"Basis", basis_it->second.first);
191 p.set(
"DOF Names", names);
192 p.set(
"Indexer Names", basis_it->second.second);
193 p.set(
"Sensitivities Name",
"");
194 p.set(
"First Sensitivities Available",
false);
195 p.set(
"Second Sensitivities Available",
false);
196 p.set(
"Global Data Key",
"X TANGENT GATHER CONTAINER: " + this->m_tangent_param_names[i]);
200 this->
template registerEvaluator<EvalT>(fm, op);
211 basis != m_unique_bases.end(); ++ basis) {
214 this->
template registerEvaluator<EvalT>(fm, basis_op);
219 ir != m_int_rules.end(); ++ir) {
222 this->
template registerEvaluator<EvalT>(fm, quad_op);
235 for (
BasisIterator basis_it = m_basis_to_dofs.begin(); basis_it != m_basis_to_dofs.end(); ++basis_it) {
242 for (
typename std::vector<std::string>::const_iterator dof_name = basis_it->second.second->begin();
243 dof_name != basis_it->second.second->end(); ++dof_name) {
249 if(desc->second.timeDerivative.first) {
251 t_dof_names->push_back(*dof_name);
252 t_field_names->push_back(desc->second.timeDerivative.second);
255 if (m_tangent_param_names.size() > 0) {
256 std::vector<std::string> tfn;
257 for (std::size_t j=0; j<m_tangent_param_names.size(); ++j) {
258 const std::string tname =
259 desc->second.timeDerivative.second +
" SENSITIVITY " + m_tangent_param_names[j];
260 tfn.push_back(tname);
262 tangent_field_names->push_back(tfn);
268 ParameterList p(
"Gather");
269 p.set(
"Basis", basis_it->second.first);
270 p.set(
"DOF Names", t_field_names);
271 p.set(
"Indexer Names", t_dof_names);
272 p.set(
"Use Time Derivative Solution Vector",
true);
275 if (m_tangent_param_names.size() > 0)
276 p.set(
"Tangent Names", tangent_field_names);
280 this->
template registerEvaluator<EvalT>(fm, op);
285 if (m_tangent_param_names.size() > 0) {
286 for (std::size_t i=0; i<m_tangent_param_names.size(); ++i) {
289 rcp(
new std::vector<std::string>);
290 for (std::size_t j=0; j<tangent_field_names->size(); ++j)
291 names->push_back((*tangent_field_names)[j][i]);
293 ParameterList p(std::string(
"Gather Tangent ") + this->m_tangent_param_names[i]);
294 p.set(
"Basis", basis_it->second.first);
295 p.set(
"DOF Names", names);
296 p.set(
"Indexer Names", t_dof_names);
297 p.set(
"Use Time Derivative Solution Vector",
true);
298 p.set(
"Global Data Key",
"DXDT TANGENT GATHER CONTAINER: " + this->m_tangent_param_names[i]);
302 this->
template registerEvaluator<EvalT>(fm, op);
311 for (
BasisIterator basis_it = m_basis_to_dofs.begin(); basis_it != m_basis_to_dofs.end(); ++basis_it) {
312 if(basis_it->second.first->requiresOrientations()) {
313 ParameterList p(
"Gather Orientation");
314 p.set(
"Basis", basis_it->second.first);
315 p.set(
"DOF Names", basis_it->second.second);
316 p.set(
"Indexer Names", basis_it->second.second);
320 this->
template registerEvaluator<EvalT>(fm, op);
327 template <
typename EvalT>
340 if(lof!=Teuchos::null)
341 globalIndexer = lof->getRangeGlobalIndexer();
344 for (
DescriptorIterator dof_iter = m_provided_dofs_desc.begin(); dof_iter != m_provided_dofs_desc.end(); ++dof_iter) {
347 p.set(
"Name", dof_iter->first);
351 if(globalIndexer!=Teuchos::null) {
353 int fieldNum = globalIndexer->
getFieldNum(dof_iter->first);
356 p.set(
"Jacobian Offsets Vector", offsets);
363 this->
template registerEvaluator<EvalT>(fm, op);
368 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
369 itr!=m_provided_dofs_desc.end();++itr) {
371 if(itr->second.basis->supportsGrad()) {
374 if(!itr->second.grad.first)
377 const std::string dof_name = itr->first;
378 const std::string dof_grad_name = itr->second.grad.second;
381 p.set(
"Name", dof_name);
382 p.set(
"Gradient Name", dof_grad_name);
389 this->
template registerEvaluator<EvalT>(fm, op);
395 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
396 itr!=m_provided_dofs_desc.end();++itr) {
398 if(itr->second.basis->supportsCurl()) {
401 if(!itr->second.curl.first)
404 const std::string dof_name = itr->first;
405 const std::string dof_curl_name = itr->second.curl.second;
408 p.set(
"Name", dof_name);
409 p.set(
"Curl Name", dof_curl_name);
414 if(globalIndexer!=Teuchos::null) {
416 int fieldNum = globalIndexer->
getFieldNum(dof_name);
419 p.set(
"Jacobian Offsets Vector", offsets);
427 this->
template registerEvaluator<EvalT>(fm, op);
434 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
435 itr!=m_provided_dofs_desc.end();++itr) {
437 if(itr->second.basis->supportsDiv()) {
440 if(!itr->second.div.first)
443 const std::string dof_name = itr->first;
444 const std::string dof_div_name = itr->second.div.second;
447 p.set(
"Name", dof_name);
448 p.set(
"Div Name", dof_div_name);
453 if(globalIndexer!=Teuchos::null) {
455 int fieldNum = globalIndexer->
getFieldNum(dof_name);
458 p.set(
"Jacobian Offsets Vector", offsets);
466 this->
template registerEvaluator<EvalT>(fm, op);
471 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
472 itr!=m_provided_dofs_desc.end();++itr) {
474 if(!itr->second.timeDerivative.first)
477 const std::string td_name = itr->second.timeDerivative.second;
480 p.set(
"Name", td_name);
484 if(globalIndexer!=Teuchos::null) {
486 int fieldNum = globalIndexer->
getFieldNum(itr->first);
489 p.set(
"Jacobian Offsets Vector", offsets);
495 if(itr->second.basis->requiresOrientations())
496 p.set(
"Orientation Field Name", itr->first+
" Orientation");
501 this->
template registerEvaluator<EvalT>(fm, op);
507 template <
typename EvalT>
520 bool ignoreScatter =
false;
522 ignoreScatter = user_data.
get<
bool>(
"Ignore Scatter");
526 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
527 itr!=m_provided_dofs_desc.end();++itr) {
535 names_map->insert(std::make_pair(itr->second.residualName.second,itr->first));
536 residual_names->push_back(itr->second.residualName.second);
539 ParameterList p(
"Scatter");
540 p.set(
"Scatter Name", itr->second.scatterName);
541 p.set(
"Basis", itr->second.basis.getConst());
542 p.set(
"Dependent Names", residual_names);
543 p.set(
"Dependent Map", names_map);
547 this->
template registerEvaluator<EvalT>(fm, op);
554 fm.template requireField<EvalT>(tag);
565 template <
typename EvalT>
574 for (std::vector<std::string>::const_iterator model_name = m_closure_model_ids.begin();
575 model_name != m_closure_model_ids.end(); ++model_name) {
577 this->buildAndRegisterClosureModelEvaluators(fm,fl,ir,factory,*model_name,models,user_data);
583 template <
typename EvalT>
589 const std::string& model_name,
594 factory.
getAsObject<EvalT>()->buildClosureModels(model_name,
598 *(this->m_eval_plist),
600 this->getGlobalData(),
604 this->
template registerEvaluator<EvalT>(fm, (*evaluators)[i]);
608 template <
typename EvalT>
613 const std::string& model_name,
620 basis != m_unique_bases.end(); ++ basis) {
623 this->
template registerEvaluator<EvalT>(fm, basis_op);
626 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
627 itr!=m_provided_dofs_desc.end();++itr) {
630 p.
set(
"Scatter Name", itr->second.scatterName);
631 p.
set(
"Basis", itr->second.basis.getConst());
633 name->push_back(itr->first);
634 p.
set(
"Dependent Names", name);
638 names_map->insert(std::make_pair(itr->first,itr->first));
639 p.
set(
"Dependent Map", names_map);
642 p.
set(
"Scatter Initial Condition",
true);
647 this->
template registerEvaluator<EvalT>(fm, op);
652 fm.template requireField<EvalT>(tag);
666 if (m_int_rules.size() > 0)
667 dummy_ir = m_int_rules.begin()->second;
671 factory.
getAsObject<EvalT>()->buildClosureModels(model_name, models, *fll, dummy_ir, *(this->m_eval_plist), user_data, this->getGlobalData(), fm);
674 this->
template registerEvaluator<EvalT>(fm, (*evaluators)[i]);
681 for (
BasisIterator basis_it = m_basis_to_dofs.begin(); basis_it != m_basis_to_dofs.end(); ++basis_it) {
682 if(basis_it->second.first->requiresOrientations()) {
684 p.
set(
"Basis", basis_it->second.first);
685 p.
set(
"DOF Names", basis_it->second.second);
686 p.
set(
"Indexer Names", basis_it->second.second);
690 this->
template registerEvaluator<EvalT>(fm, op);
697 template <
typename EvalT>
705 template <
typename EvalT>
706 const std::vector<std::pair<std::string,Teuchos::RCP<panzer::PureBasis> > >&
709 return m_provided_dofs;
713 template <
typename EvalT>
714 const std::vector<std::vector<std::string> > &
717 return m_coordinate_dofs;
721 template <
typename EvalT>
722 const std::map<int,Teuchos::RCP<panzer::IntegrationRule> > &
729 template <
typename EvalT>
734 m_block_id = blockId;
735 this->m_eval_plist->set(
"Block ID", getElementBlockId());
740 template <
typename EvalT>
748 template <
typename EvalT>
755 template <
typename EvalT>
758 m_tangent_param_names = tangent_param_names;
762 template <
typename EvalT>
765 return m_build_transient_support;
769 template <
typename EvalT>
774 for(
typename std::map<std::string,DOFDescriptor>::const_iterator itr=m_provided_dofs_desc.begin();
775 itr!=m_provided_dofs_desc.end();++itr)
776 dofNames.push_back(itr->first);
780 template <
typename EvalT>
784 int integrationOrder)
786 typename std::map<std::string,DOFDescriptor>::const_iterator itr = m_provided_dofs_desc.find(dofName);
789 "EquationSet_DefaultImpl::updateDOF: DOF \"" << dofName <<
"\" has not been specified "
790 "by derived equation set \"" << this->getType() <<
"\".");
797 if (integrationOrder == -1)
798 desc.integrationOrder = m_default_integration_order;
800 desc.integrationOrder = integrationOrder;
806 template <
typename EvalT>
810 typename std::map<std::string,DOFDescriptor>::const_iterator itr = m_provided_dofs_desc.find(dofName);
813 "EquationSet_DefaultImpl::getBasisOrder: DOF \"" << dofName <<
"\" has not been specified "
814 "by derived equation set \"" << this->getType() <<
"\".");
816 return itr->second.basisOrder;
820 template <
typename EvalT>
824 typename std::map<std::string,DOFDescriptor>::const_iterator itr = m_provided_dofs_desc.find(dofName);
827 "EquationSet_DefaultImpl::getIntegrationOrder: DOF \"" << dofName <<
"\" has not been specified "
828 "by derived equation set \"" << this->getType() <<
"\".");
830 return itr->second.integrationOrder;
834 template <
typename EvalT>
837 const std::string & basisType,
838 const int & basisOrder,
839 const int integrationOrder,
840 const std::string residualName,
841 const std::string scatterName)
843 typename std::map<std::string,DOFDescriptor>::const_iterator itr = m_provided_dofs_desc.find(dofName);
846 "EquationSet_DefaultImpl::addProvidedDOF: DOF \"" << dofName <<
"\" was previously specified "
847 "by derived equation set \"" << this->getType() <<
"\".");
852 desc.basisType = basisType;
853 desc.basisOrder = basisOrder;
856 if (integrationOrder == -1)
857 desc.integrationOrder = m_default_integration_order;
859 desc.integrationOrder = integrationOrder;
864 desc.residualName.first =
true;
866 if (residualName ==
"")
867 desc.residualName.second =
"RESIDUAL_" + dofName;
869 desc.residualName.second = residualName;
871 if (scatterName ==
"")
872 desc.scatterName =
"SCATTER_" + dofName;
874 desc.scatterName = scatterName;
879 template <
typename EvalT>
882 const std::string & gradName)
884 typename std::map<std::string,DOFDescriptor>::iterator itr = m_provided_dofs_desc.find(dofName);
887 "EquationSet_DefaultImpl::addDOFGrad: DOF \"" << dofName <<
"\" has not been specified as a DOF "
888 "by derived equation set \"" << this->getType() <<
"\".");
895 desc.grad = std::make_pair(
true,std::string(
"GRAD_")+dofName);
897 desc.grad = std::make_pair(
true,gradName);
901 template <
typename EvalT>
904 const std::string & curlName)
906 typename std::map<std::string,DOFDescriptor>::iterator itr = m_provided_dofs_desc.find(dofName);
909 "EquationSet_DefaultImpl::addDOFCurl: DOF \"" << dofName <<
"\" has not been specified as a DOF "
910 "by derived equation set \"" << this->getType() <<
"\".");
917 desc.curl = std::make_pair(
true,std::string(
"CURL_")+dofName);
919 desc.curl = std::make_pair(
true,curlName);
923 template <
typename EvalT>
926 const std::string & divName)
928 typename std::map<std::string,DOFDescriptor>::iterator itr = m_provided_dofs_desc.find(dofName);
931 "EquationSet_DefaultImpl::addDOFDiv: DOF \"" << dofName <<
"\" has not been specified as a DOF "
932 "by derived equation set \"" << this->getType() <<
"\".");
939 desc.div = std::make_pair(
true,std::string(
"DIV_")+dofName);
941 desc.div = std::make_pair(
true,divName);
945 template <
typename EvalT>
948 const std::string & dotName)
950 typename std::map<std::string,DOFDescriptor>::iterator itr = m_provided_dofs_desc.find(dofName);
953 "EquationSet_DefaultImpl::addDOFTimeDerivative: DOF \"" << dofName <<
"\" has not been specified as a DOF "
954 "by derived equation set \"" << this->getType() <<
"\".");
961 desc.timeDerivative = std::make_pair(
true,std::string(
"DXDT_")+dofName);
963 desc.timeDerivative = std::make_pair(
true,dotName);
967 template <
typename EvalT>
972 "EquationSet_DefaultImpl::setCoordinateDOFs: Size of vector is not equal to the "
973 "spatial dimension.");
975 for(std::size_t d=0;d<dofNames.size();d++) {
976 typename std::map<std::string,DOFDescriptor>::const_iterator desc_it = m_provided_dofs_desc.find(dofNames[d]);
978 "EquationSet_DefaultImpl::setCoordinateDOFs: DOF of name \"" + dofNames[d] +
"\" "
979 "has not been added, thus cannot be set as a coordinate DOF.");
982 m_coordinate_dofs.push_back(dofNames);
986 template <
typename EvalT>
990 std::string default_type =
"";
991 valid_parameters.
set(
"Type",default_type,
"The equation set type. This must corespond to the type keyword used to build the equation set in the equation set factory.");
995 template <
typename EvalT>
999 typename std::map<std::string,DOFDescriptor>::const_iterator desc_it = m_provided_dofs_desc.find(dof_name);
1001 return desc_it->second.basis;
1005 template <
typename EvalT>
1009 typename std::map<std::string,DOFDescriptor>::const_iterator desc_it = m_provided_dofs_desc.find(dof_name);
1011 "EquationSet_DefaultImpl::getIntRuleForDOF: Failed to find degree of freedom "
1012 "with name \"" << dof_name <<
"\".");
1013 return desc_it->second.intRule;
1017 template <
typename EvalT>
1021 typename std::map<std::string,DOFDescriptor>::const_iterator desc_it = m_provided_dofs_desc.find(dof_name);
1023 "EquationSet_DefaultImpl::getBasisIRLayoutForDOF: Failed to find degree of freedom "
1024 "with name \"" << dof_name <<
"\".");
1030 template <
typename EvalT>
1033 const std::string dof_name,
1034 const std::vector<std::string>& residual_contributions,
1035 const std::string residual_field_name)
const
1042 if (residual_field_name !=
"")
1043 p.
set(
"Sum Name", residual_field_name);
1045 p.
set(
"Sum Name",
"RESIDUAL_" + dof_name);
1048 *rcp_residual_contributions = residual_contributions;
1050 p.
set(
"Values Names", rcp_residual_contributions);
1055 p.
set(
"Data Layout", desc_it->second.basis->functional);
1059 this->
template registerEvaluator<EvalT>(fm, op);
1063 template <
typename EvalT>
1066 const std::string dof_name,
1067 const std::vector<std::string>& residual_contributions,
1068 const std::vector<double>& scale_contributions,
1069 const std::string residual_field_name)
const
1076 if (residual_field_name !=
"")
1077 p.
set(
"Sum Name", residual_field_name);
1079 p.
set(
"Sum Name",
"RESIDUAL_" + dof_name);
1082 *rcp_residual_contributions = residual_contributions;
1083 p.
set(
"Values Names", rcp_residual_contributions);
1086 p.
set(
"Scalars", rcp_scale_contributions);
1091 p.
set(
"Data Layout", desc_it->second.basis->functional);
1095 this->
template registerEvaluator<EvalT>(fm, op);
1099 template <
typename EvalT>
1102 m_closure_model_ids.push_back(closure_model);
1106 template <
typename EvalT>
1110 return m_input_params;
void buildAndRegisterResidualSummationEvaluator(PHX::FieldManager< panzer::Traits > &fm, const std::string dof_name, const std::vector< std::string > &residual_contributions, const std::string residual_field_name="") const
Teuchos::RCP< panzer::BasisIRLayout > lookupLayout(const std::string &fieldName) const
Get the basis associated with a particular field.
Teuchos::RCP< panzer::IntegrationRule > getIntRuleForDOF(const std::string &dof_name) const
Returns the integration rule associated with the residual contributions for the dof_name.
std::map< std::string, DOFDescriptor >::const_iterator DescriptorIterator
For convenience, declare the DOFDescriptor iterator.
void setupDeprecatedDOFsSupport()
Interpolates basis DOF values to IP DOF Gradient values.
virtual std::string getElementBlockId() const
void addDOFGrad(const std::string &dofName, const std::string &gradName="")
bool is_null(const boost::shared_ptr< T > &p)
virtual void setTangentParamNames(const std::vector< std::string > &tangent_param_names)
Set the list of tangent parameter names.
virtual std::string getType() const
Returns the type of the equation set object. Corresponds to the keyword used by the equation set fact...
Teuchos::RCP< typename Sacado::mpl::apply< panzer::ClosureModelFactory< _ >, ScalarT >::type > getAsObject()
int getIntegrationOrder(const std::string &dofName) const
Get the integration order for an existing degree of freedom.
Default implementation for accessing the GlobalData object.
virtual const std::map< int, Teuchos::RCP< panzer::IntegrationRule > > & getIntegrationRules() const
Return a map of unique integration rules for the equation set, key is the integration order...
T & get(const std::string &name, T def_value)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual void buildAndRegisterInitialConditionEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::FieldLibrary &fl, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const std::string &model_name, const Teuchos::ParameterList &models, const LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
Teuchos::RCP< Teuchos::ParameterList > m_eval_plist
virtual void buildAndRegisterDOFProjectionsToIPEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const Teuchos::Ptr< const panzer::LinearObjFactory< panzer::Traits > > &lof, const Teuchos::ParameterList &user_data) const
int getBasisOrder(const std::string &dofName) const
Get the basis order for an existing degree of freedom.
Teuchos::RCP< PHX::Evaluator< Traits > > buildGatherTangent(const Teuchos::ParameterList &pl) const
Use preconstructed gather evaluators.
Teuchos::RCP< panzer::PureBasis > getBasisForDOF(const std::string &dof_name) const
Returns the PureBasis associated with the residual contributions for the dof_name.
Interpolates basis DOF values to IP DOF Div values.
void setDefaultValidParameters(Teuchos::ParameterList &valid_parameters)
PHX::View< const int * > offsets
Teuchos::RCP< Teuchos::ParameterList > getEquationSetParameterList() const
Returns the parameter list used to build this equation set.
Teuchos::RCP< panzer::BasisIRLayout > basisIRLayout(std::string basis_type, const int basis_order, const PointRule &pt_rule)
Nonmember constructor.
bool isParameter(const std::string &name) const
void setCoordinateDOFs(const std::vector< std::string > &dofNames)
Teuchos::RCP< PHX::Evaluator< Traits > > buildScatterDirichlet(const Teuchos::ParameterList &pl) const
Use preconstructed dirichlet scatter evaluators.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Data for determining cell topology and dimensionality.
void addDOFDiv(const std::string &dofName, const std::string &divName="")
virtual const Teuchos::RCP< Teuchos::ParameterList > getEvaluatorParameterList() const
Returns the parameter list that will be passed off from the equaiton set to the closure model evaluat...
Gathers coordinates for the quadrature from the workset and stores them in the field manager...
virtual void setupDOFs()
Builds the integration rule, basis, DOFs, and default parameter list. This MUST be called in the cons...
std::map< std::string, std::pair< Teuchos::RCP< panzer::PureBasis >, Teuchos::RCP< std::vector< std::string > > > >::const_iterator BasisIterator
For convenience, declare a basis iterator.
Interpolates basis DOF values to IP DOF Curl values.
virtual int getFieldNum(const std::string &str) const =0
Get the number used for access to this field.
Teuchos::RCP< PHX::Evaluator< Traits > > buildGather(const Teuchos::ParameterList &pl) const
Use preconstructed gather evaluators.
void addDOF(const std::string &dofName, const std::string &basisType, const int &basisOrder, const int integrationOrder=-1, const std::string residualName="", const std::string scatterName="")
void updateDOF(const std::string &dofName, int basisOrder, int integrationOrder=-1)
Modifying an existing DOF's basis function and integration rule.
virtual void buildAndRegisterClosureModelEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const Teuchos::ParameterList &models, const Teuchos::ParameterList &user_data) const
Register closure model evaluators with the model name internally specified by the equation set...
Teuchos::RCP< panzer::BasisIRLayout > getBasisIRLayoutForDOF(const std::string &dof_name) const
Returns the BasisIRLayout for the dof_name.
virtual void buildAndRegisterGatherAndOrientationEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::FieldLibrary &fl, const LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
bool nonnull(const boost::shared_ptr< T > &p)
Teuchos::RCP< const FieldLayoutLibrary > buildFieldLayoutLibrary(panzer::PointRule &ir) const
Teuchos::RCP< PHX::Evaluator< Traits > > buildGatherOrientation(const Teuchos::ParameterList &pl) const
Use preconstructed gather evaluators.
const Teuchos::RCP< Teuchos::ParameterList > m_input_params
virtual const std::vector< int > & getGIDFieldOffsets(const std::string &blockId, int fieldNum) const =0
Use the field pattern so that you can find a particular field in the GIDs array.
void getAddedDOFs(std::vector< std::string > &dofNames) const
virtual const std::vector< std::pair< std::string, Teuchos::RCP< panzer::PureBasis > > > & getProvidedDOFs() const
Return the Basis for the equation set, key is the DOF name (note coordinate DOFs are NOT included) ...
Interpolates basis DOF values to IP DOF values.
virtual const std::vector< std::vector< std::string > > & getCoordinateDOFs() const
Return a vector of vectors that correspond to DOFs set as coordinate fields.
void addDOFTimeDerivative(const std::string &dofName, const std::string &dotName="")
Teuchos::RCP< PHX::Evaluator< Traits > > buildScatter(const Teuchos::ParameterList &pl) const
Use preconstructed scatter evaluators.
bool buildTransientSupport() const
Returns true if transient support should be enabled in the equation set.
virtual void buildAndRegisterScatterEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::FieldLibrary &fl, const LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
Description and data layouts associated with a particular basis.
#define TEUCHOS_ASSERT(assertion_test)
void addDOFCurl(const std::string &dofName, const std::string &curlName="")
EquationSet_DefaultImpl(const Teuchos::RCP< Teuchos::ParameterList > ¶ms, const int &default_integration_order, const panzer::CellData &cell_data, const Teuchos::RCP< panzer::GlobalData > &global_data, const bool build_transient_support)
virtual void setElementBlockId(const std::string &blockId)
Gathers coordinates for the basis function from the workset and stores them in the field manager...
void addClosureModel(const std::string &closure_model)