87 const Teuchos::ParameterList& )
const
89 using Teuchos::ParameterList;
98 buildDescriptorMapFromVectors();
104 itr!=m_provided_dofs_desc.end(); ++itr) {
114 std::string dofName = desc.
dofName;
117 ParameterList p(
"Scatter: "+residualName +
" to " + dofName);
120 string scatter_field_name =
"Dummy Scatter: " + this->m_bc.identifier() + residualName;
121 p.set(
"Scatter Name", scatter_field_name);
124 const vector<pair<string,RCP<panzer::PureBasis> > >& dofBasisPair = pb.
getProvidedDOFs();
125 RCP<panzer::PureBasis> basis;
126 for (vector<pair<
string,RCP<panzer::PureBasis> > >::const_iterator it =
127 dofBasisPair.begin(); it != dofBasisPair.end(); ++it) {
128 if (it->first == dofName)
132 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(basis), std::runtime_error,
133 "Error the name \"" << dofName
134 <<
"\" is not a valid DOF for the boundary condition:\n"
135 << this->m_bc <<
"\n");
137 p.set(
"Basis", basis);
139 RCP<vector<string> > residual_names = rcp(
new vector<string>);
140 residual_names->push_back(residualName);
141 p.set(
"Dependent Names", residual_names);
143 RCP<map<string,string> > names_map = rcp(
new map<string,string>);
144 names_map->insert(std::make_pair(residualName,dofName));
145 p.set(
"Dependent Map", names_map);
147 TEUCHOS_TEST_FOR_EXCEPTION(!pb.
cellData().
isSide(), std::logic_error,
148 "Error - physics block is not a side set!");
150 p.set<
int>(
"Side Subcell Dimension",
154 p.set(
"Check Apply BC",check_apply_bc);
158 this->
template registerEvaluator<EvalT>(fm, op);
163 PHX::Tag<typename EvalT::ScalarT> tag(scatter_field_name,
164 rcp(
new PHX::MDALayout<Dummy>(0)));
165 fm.template requireField<EvalT>(tag);
178 const Teuchos::ParameterList& )
const
180 using Teuchos::ParameterList;
189 buildDescriptorMapFromVectors();
198 const std::map<std::string,Teuchos::RCP<panzer::PureBasis> > & bases = pb.
getBases();
199 for (std::map<std::string,Teuchos::RCP<panzer::PureBasis> >::const_iterator it=bases.begin();
200 it!=bases.end();it++) {
202 Teuchos::RCP<panzer::PureBasis> basis = it->second;
206 RCP< PHX::Evaluator<panzer::Traits> > basis_op
208 this->
template registerEvaluator<EvalT>(fm, basis_op);
212 if(basis->isVectorBasis()) {
213 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
216 RCP< PHX::Evaluator<panzer::Traits> > eval
219 this->
template registerEvaluator<EvalT>(fm, eval);
223 RCP< PHX::Evaluator<panzer::Traits> > eval
226 this->
template registerEvaluator<EvalT>(fm, eval);
234 itr!=m_provided_dofs_desc.end(); ++itr) {
237 std::string dofName = itr->second.dofName;
238 std::string fieldDof = !itr->second.timeDerivative.first
239 ? itr->second.dofName : itr->second.timeDerivative.second;
241 const vector<pair<string,RCP<panzer::PureBasis> > >& dofBasisPair = pb.
getProvidedDOFs();
242 RCP<panzer::PureBasis> basis;
243 for (vector<pair<
string,RCP<panzer::PureBasis> > >::const_iterator it =
244 dofBasisPair.begin(); it != dofBasisPair.end(); ++it) {
245 if (it->first == dofName)
249 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(basis), std::runtime_error,
250 "Error the name \"" << dofName
251 <<
"\" is not a valid DOF for the boundary condition:\n"
252 << this->m_bc <<
"\n");
255 ParameterList p(
"BC Gather");
256 RCP<vector<string> > gather_field_names_vec = rcp(
new vector<string>);
257 RCP<vector<string> > gather_names_vec = rcp(
new vector<string>);
258 gather_field_names_vec->push_back(fieldDof);
259 gather_names_vec->push_back(dofName);
261 p.set(
"DOF Names", gather_field_names_vec);
262 p.set(
"Indexer Names", gather_names_vec);
263 p.set(
"Basis", basis);
264 p.set(
"Use Time Derivative Solution Vector",itr->second.timeDerivative.first);
266 RCP< PHX::Evaluator<panzer::Traits> > op = lof.
buildGather<EvalT>(p);
267 this->
template registerEvaluator<EvalT>(fm, op);
270 if(basis->requiresOrientations()) {
271 ParameterList p(
"Gather Orientation");
272 RCP<vector<string> > gather_field_names_vec = rcp(
new vector<string>);
273 RCP<vector<string> > gather_names_vec = rcp(
new vector<string>);
274 gather_field_names_vec->push_back(fieldDof);
275 gather_names_vec->push_back(dofName);
277 p.set(
"DOF Names", gather_field_names_vec);
278 p.set(
"Indexer Names", gather_names_vec);
279 p.set(
"Basis", basis);
283 this->
template registerEvaluator<EvalT>(fm, op);
287 if(basis->isVectorBasis()) {
288 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
291 p.set(
"Name",fieldDof);
292 p.set(
"Basis",basis.getConst());
293 p.set(
"Point Rule",pointRule);
295 RCP< PHX::Evaluator<panzer::Traits> > eval
297 this->
template registerEvaluator<EvalT>(fm, eval);
304 itr!=m_provided_dofs_desc.end(); ++itr) {
314 ? itr->second.dofName : itr->second.timeDerivative.second;
316 std::string targetName = desc.
targetName.second;
318 const vector<pair<string,RCP<panzer::PureBasis> > >& dofBasisPair = pb.
getProvidedDOFs();
319 RCP<panzer::PureBasis> basis;
320 for (vector<pair<
string,RCP<panzer::PureBasis> > >::const_iterator it =
321 dofBasisPair.begin(); it != dofBasisPair.end(); ++it) {
322 if (it->first == itr->second.dofName)
326 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(basis), std::runtime_error,
327 "Error the name \"" << itr->second.dofName
328 <<
"\" is not a valid DOF for the boundary condition:\n"
329 << this->m_bc <<
"\n");
332 ParameterList p(
"Dirichlet Residual: "+residualName +
" to " + dofName);
333 p.set(
"Residual Name", residualName);
334 p.set(
"DOF Name", dofName);
335 p.set(
"Value Name", targetName);
336 p.set(
"Data Layout", basis->functional);
338 RCP< PHX::Evaluator<panzer::Traits> > op =
341 this->
template registerEvaluator<EvalT>(fm, op);
344 else if(basis->isVectorBasis()&&basis->supportsDiv()) {
345 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
348 p.set(
"Residual Name", residualName);
349 p.set(
"DOF Name", dofName);
350 p.set(
"Value Name", targetName);
351 p.set(
"Basis", basis.getConst());
352 p.set(
"Point Rule", pointRule);
354 RCP< PHX::Evaluator<panzer::Traits> > op =
357 this->
template registerEvaluator<EvalT>(fm, op);
359 else if(basis->isVectorBasis()) {
360 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
363 p.set(
"Residual Name", residualName);
364 p.set(
"DOF Name", dofName);
365 p.set(
"Value Name", targetName);
366 p.set(
"Basis", basis.getConst());
367 p.set(
"Point Rule", pointRule);
369 RCP< PHX::Evaluator<panzer::Traits> > op =
372 this->
template registerEvaluator<EvalT>(fm, op);