87 Teuchos::rcp(
new PHX::Tag<ScalarT>(scatterName,Teuchos::rcp(
new PHX::MDALayout<Dummy>(0))));
102 scatterFields_[eq] = PHX::MDField<const ScalarT,Cell,NODE>(names[eq],dl);
162 std::vector<double> jacRow;
164 bool useColumnIndexer = colGlobalIndexer_!=Teuchos::null;
167 std::string blockId = this->wda(workset).block_id;
168 const std::vector<std::size_t> & localCellIds = this->wda(workset).cell_local_ids;
170 Teuchos::RCP<Epetra_Vector> r = epetraContainer_->get_f();
171 Teuchos::RCP<Epetra_CrsMatrix> Jac = epetraContainer_->get_A();
173 const Teuchos::RCP<const panzer::GlobalIndexer>&
174 colGlobalIndexer = useColumnIndexer ? colGlobalIndexer_ : globalIndexer_;
182 for(std::size_t worksetCellIndex=0;worksetCellIndex<localCellIds.size();++worksetCellIndex) {
183 std::size_t cellLocalId = localCellIds[worksetCellIndex];
185 auto rLIDs = globalIndexer_->getElementLIDs(cellLocalId);
186 auto initial_cLIDs = colGlobalIndexer->getElementLIDs(cellLocalId);
188 for (
int i(0); i < static_cast<int>(initial_cLIDs.extent(0)); ++i)
189 cLIDs.push_back(initial_cLIDs(i));
190 if (Teuchos::nonnull(workset.other)) {
191 const std::size_t other_cellLocalId = workset.other->cell_local_ids[worksetCellIndex];
192 auto other_cLIDs = colGlobalIndexer->getElementLIDs(other_cellLocalId);
193 for (
int i(0); i < static_cast<int>(other_cLIDs.extent(0)); ++i)
194 cLIDs.push_back(other_cLIDs(i));
198 for(std::size_t fieldIndex = 0; fieldIndex < scatterFields_.size(); fieldIndex++) {
199 int fieldNum = fieldIds_[fieldIndex];
200 const std::vector<int> & elmtOffset = globalIndexer_->getGIDFieldOffsets(blockId,fieldNum);
203 for(std::size_t rowBasisNum = 0; rowBasisNum < elmtOffset.size(); rowBasisNum++) {
204 const ScalarT scatterField = (scatterFields_[fieldIndex])(worksetCellIndex,rowBasisNum);
205 int rowOffset = elmtOffset[rowBasisNum];
206 int row = rLIDs[rowOffset];
209 jacRow.resize(scatterField.size());
211 for(
int sensIndex=0;sensIndex<scatterField.size();++sensIndex)
212 jacRow[sensIndex] = scatterField.fastAccessDx(sensIndex).fastAccessDx(0);
215 int err = Jac->SumIntoMyValues(
217 std::min(cLIDs.size(),
static_cast<size_t>(scatterField.size())),
220 TEUCHOS_ASSERT_EQUALITY(err,0);