76 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer,
77 const Teuchos::ParameterList& p)
92 const vector<string>& names = *(p.get<RCP<vector<string>>>(
"DOF Names"));
94 RCP<const PureBasis> basis;
95 if (p.isType<RCP<PureBasis>>(
"Basis"))
96 basis = p.get<RCP<PureBasis>>(
"Basis");
98 basis = p.get<RCP<const PureBasis>>(
"Basis");
99 if (p.isType<
bool>(
"Use Time Derivative Solution Vector"))
101 p.get<
bool>(
"Use Time Derivative Solution Vector");
102 if (p.isType<
string>(
"Global Data Key"))
106 int numFields(names.size());
108 for (
int fd(0); fd < numFields; ++fd)
111 MDField<ScalarT, Cell, NODE>(names[fd], basis->functional);
121 string firstName(
"<none>");
123 firstName = names[0];
124 string n(
"GatherTangent (Epetra): " + firstName +
" (" +
125 print<EvalT>() +
")");
193 typename TRAITS::EvalData workset)
199 using Teuchos::ArrayRCP;
200 using Teuchos::ptrFromRef;
202 using Teuchos::rcp_dynamic_cast;
203 using Thyra::SpmdVectorBase;
211 string blockId(this->
wda(workset).block_id);
212 const vector<size_t>& localCellIds = this->
wda(workset).cell_local_ids;
213 int numCells(localCellIds.size()), numFields(
gatherFields_.size());
221 auto LIDs_h = Kokkos::create_mirror_view(LIDs);
222 Kokkos::deep_copy(LIDs_h, LIDs);
224 for (
int fieldIndex(0); fieldIndex < numFields; ++fieldIndex)
226 MDField<ScalarT, Cell, NODE>& field =
gatherFields_[fieldIndex];
227 auto field_h = Kokkos::create_mirror_view(field.get_static_view());
228 for (
int cell(0); cell < numCells; ++cell)
230 size_t cellLocalId(localCellIds[cell]);
232 const vector<int>& elmtOffset =
234 int numBases(elmtOffset.size());
237 for (
int basis(0); basis < numBases; ++basis)
239 int offset(elmtOffset[basis]), lid(LIDs_h(cellLocalId, offset));
240 field_h(cell, basis) = (*dxdpEvRoGed_)[lid];
243 Kokkos::deep_copy(field.get_static_view(), field_h);