44 const Teuchos::RCP<const panzer::GlobalIndexer>& indexer,
45 const Teuchos::ParameterList& p)
60 const vector<string>& names = *(p.get<RCP<vector<string>>>(
"DOF Names"));
62 RCP<const PureBasis> basis;
63 if (p.isType<RCP<PureBasis>>(
"Basis"))
64 basis = p.get<RCP<PureBasis>>(
"Basis");
66 basis = p.get<RCP<const PureBasis>>(
"Basis");
67 if (p.isType<
bool>(
"Use Time Derivative Solution Vector"))
69 p.get<
bool>(
"Use Time Derivative Solution Vector");
70 if (p.isType<
string>(
"Global Data Key"))
74 int numFields(names.size());
76 for (
int fd(0); fd < numFields; ++fd)
79 MDField<ScalarT, Cell, NODE>(names[fd], basis->functional);
89 string firstName(
"<none>");
92 string n(
"GatherTangent (Epetra): " + firstName +
" (" +
93 print<EvalT>() +
")");
161 typename TRAITS::EvalData workset)
167 using Teuchos::ArrayRCP;
168 using Teuchos::ptrFromRef;
170 using Teuchos::rcp_dynamic_cast;
171 using Thyra::SpmdVectorBase;
179 string blockId(this->
wda(workset).block_id);
180 const vector<size_t>& localCellIds = this->
wda(workset).cell_local_ids;
181 int numCells(localCellIds.size()), numFields(
gatherFields_.size());
189 auto LIDs_h = Kokkos::create_mirror_view(LIDs);
190 Kokkos::deep_copy(LIDs_h, LIDs);
192 for (
int fieldIndex(0); fieldIndex < numFields; ++fieldIndex)
194 MDField<ScalarT, Cell, NODE>& field =
gatherFields_[fieldIndex];
195 auto field_h = Kokkos::create_mirror_view(field.get_static_view());
196 for (
int cell(0); cell < numCells; ++cell)
198 size_t cellLocalId(localCellIds[cell]);
200 const vector<int>& elmtOffset =
202 int numBases(elmtOffset.size());
205 for (
int basis(0); basis < numBases; ++basis)
207 int offset(elmtOffset[basis]), lid(LIDs_h(cellLocalId, offset));
208 field_h(cell, basis) = (*dxdpEvRoGed_)[lid];
211 Kokkos::deep_copy(field.get_static_view(), field_h);