119 const Teuchos::ParameterList& )
const
121 using Teuchos::ParameterList;
130 buildDescriptorMapFromVectors();
136 itr!=m_provided_dofs_desc.end(); ++itr) {
146 std::string dofName = desc.
dofName;
149 ParameterList p(
"Scatter: "+residualName +
" to " + dofName);
152 string scatter_field_name =
"Dummy Scatter: " + this->m_bc.identifier() + residualName;
153 p.set(
"Scatter Name", scatter_field_name);
156 const vector<pair<string,RCP<panzer::PureBasis> > >& dofBasisPair = pb.
getProvidedDOFs();
157 RCP<panzer::PureBasis> basis;
158 for (vector<pair<
string,RCP<panzer::PureBasis> > >::const_iterator it =
159 dofBasisPair.begin(); it != dofBasisPair.end(); ++it) {
160 if (it->first == dofName)
164 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(basis), std::runtime_error,
165 "Error the name \"" << dofName
166 <<
"\" is not a valid DOF for the boundary condition:\n"
167 << this->m_bc <<
"\n");
169 p.set(
"Basis", basis);
171 RCP<vector<string> > residual_names = rcp(
new vector<string>);
172 residual_names->push_back(residualName);
173 p.set(
"Dependent Names", residual_names);
175 RCP<map<string,string> > names_map = rcp(
new map<string,string>);
176 names_map->insert(std::make_pair(residualName,dofName));
177 p.set(
"Dependent Map", names_map);
179 TEUCHOS_TEST_FOR_EXCEPTION(!pb.
cellData().
isSide(), std::logic_error,
180 "Error - physics block is not a side set!");
182 p.set<
int>(
"Side Subcell Dimension",
186 p.set(
"Check Apply BC",check_apply_bc);
190 this->
template registerEvaluator<EvalT>(fm, op);
195 PHX::Tag<typename EvalT::ScalarT> tag(scatter_field_name,
196 rcp(
new PHX::MDALayout<Dummy>(0)));
197 fm.template requireField<EvalT>(tag);
210 const Teuchos::ParameterList& )
const
212 using Teuchos::ParameterList;
221 buildDescriptorMapFromVectors();
230 const std::map<std::string,Teuchos::RCP<panzer::PureBasis> > & bases = pb.
getBases();
231 for (std::map<std::string,Teuchos::RCP<panzer::PureBasis> >::const_iterator it=bases.begin();
232 it!=bases.end();it++) {
234 Teuchos::RCP<panzer::PureBasis> basis = it->second;
238 RCP< PHX::Evaluator<panzer::Traits> > basis_op
240 this->
template registerEvaluator<EvalT>(fm, basis_op);
244 if(basis->isVectorBasis()) {
245 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
248 RCP< PHX::Evaluator<panzer::Traits> > eval
251 this->
template registerEvaluator<EvalT>(fm, eval);
255 RCP< PHX::Evaluator<panzer::Traits> > eval
258 this->
template registerEvaluator<EvalT>(fm, eval);
266 itr!=m_provided_dofs_desc.end(); ++itr) {
269 std::string dofName = itr->second.dofName;
270 std::string fieldDof = !itr->second.timeDerivative.first
271 ? itr->second.dofName : itr->second.timeDerivative.second;
273 const vector<pair<string,RCP<panzer::PureBasis> > >& dofBasisPair = pb.
getProvidedDOFs();
274 RCP<panzer::PureBasis> basis;
275 for (vector<pair<
string,RCP<panzer::PureBasis> > >::const_iterator it =
276 dofBasisPair.begin(); it != dofBasisPair.end(); ++it) {
277 if (it->first == dofName)
281 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(basis), std::runtime_error,
282 "Error the name \"" << dofName
283 <<
"\" is not a valid DOF for the boundary condition:\n"
284 << this->m_bc <<
"\n");
287 ParameterList p(
"BC Gather");
288 RCP<vector<string> > gather_field_names_vec = rcp(
new vector<string>);
289 RCP<vector<string> > gather_names_vec = rcp(
new vector<string>);
290 gather_field_names_vec->push_back(fieldDof);
291 gather_names_vec->push_back(dofName);
293 p.set(
"DOF Names", gather_field_names_vec);
294 p.set(
"Indexer Names", gather_names_vec);
295 p.set(
"Basis", basis);
296 p.set(
"Use Time Derivative Solution Vector",itr->second.timeDerivative.first);
298 RCP< PHX::Evaluator<panzer::Traits> > op = lof.
buildGather<EvalT>(p);
299 this->
template registerEvaluator<EvalT>(fm, op);
302 if(basis->requiresOrientations()) {
303 ParameterList p(
"Gather Orientation");
304 RCP<vector<string> > gather_field_names_vec = rcp(
new vector<string>);
305 RCP<vector<string> > gather_names_vec = rcp(
new vector<string>);
306 gather_field_names_vec->push_back(fieldDof);
307 gather_names_vec->push_back(dofName);
309 p.set(
"DOF Names", gather_field_names_vec);
310 p.set(
"Indexer Names", gather_names_vec);
311 p.set(
"Basis", basis);
315 this->
template registerEvaluator<EvalT>(fm, op);
319 if(basis->isVectorBasis()) {
320 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
323 p.set(
"Name",fieldDof);
324 p.set(
"Basis",basis.getConst());
325 p.set(
"Point Rule",pointRule);
327 RCP< PHX::Evaluator<panzer::Traits> > eval
329 this->
template registerEvaluator<EvalT>(fm, eval);
336 itr!=m_provided_dofs_desc.end(); ++itr) {
346 ? itr->second.dofName : itr->second.timeDerivative.second;
348 std::string targetName = desc.
targetName.second;
350 const vector<pair<string,RCP<panzer::PureBasis> > >& dofBasisPair = pb.
getProvidedDOFs();
351 RCP<panzer::PureBasis> basis;
352 for (vector<pair<
string,RCP<panzer::PureBasis> > >::const_iterator it =
353 dofBasisPair.begin(); it != dofBasisPair.end(); ++it) {
354 if (it->first == itr->second.dofName)
358 TEUCHOS_TEST_FOR_EXCEPTION(Teuchos::is_null(basis), std::runtime_error,
359 "Error the name \"" << itr->second.dofName
360 <<
"\" is not a valid DOF for the boundary condition:\n"
361 << this->m_bc <<
"\n");
364 ParameterList p(
"Dirichlet Residual: "+residualName +
" to " + dofName);
365 p.set(
"Residual Name", residualName);
366 p.set(
"DOF Name", dofName);
367 p.set(
"Value Name", targetName);
368 p.set(
"Data Layout", basis->functional);
370 RCP< PHX::Evaluator<panzer::Traits> > op =
373 this->
template registerEvaluator<EvalT>(fm, op);
376 else if(basis->isVectorBasis()&&basis->supportsDiv()) {
377 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
380 p.set(
"Residual Name", residualName);
381 p.set(
"DOF Name", dofName);
382 p.set(
"Value Name", targetName);
383 p.set(
"Basis", basis.getConst());
384 p.set(
"Point Rule", pointRule);
386 RCP< PHX::Evaluator<panzer::Traits> > op =
389 this->
template registerEvaluator<EvalT>(fm, op);
391 else if(basis->isVectorBasis()) {
392 RCP<const panzer::PointRule> pointRule = rcp(
new panzer::PointRule(basis->name()+
":BasisPoints",basis->cardinality(),cellData));
395 p.set(
"Residual Name", residualName);
396 p.set(
"DOF Name", dofName);
397 p.set(
"Value Name", targetName);
398 p.set(
"Basis", basis.getConst());
399 p.set(
"Point Rule", pointRule);
401 RCP< PHX::Evaluator<panzer::Traits> > op =
404 this->
template registerEvaluator<EvalT>(fm, op);