Skip to content

Commit

Permalink
fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbowen42 committed Sep 17, 2024
1 parent 85bc96b commit 2f6c1f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/serac/numerics/functional/functional_qoi.inl
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,16 @@ private:

gradient_L_ = 0.0;

std::map<mfem::Geometry::Type, ExecArray<double, 3, serac::ExecutionSpace::CPU>>
element_gradients[Domain::num_types];
std::map<mfem::Geometry::Type, ExecArray<double, 3, exec>> element_gradients[Domain::num_types];

for (auto& integral : form_.integrals_) {
auto& K_elem = element_gradients[integral.domain_.type_];
auto& trial_restrictions = form_.G_trial_[integral.domain_.type_][which_argument].restrictions;

if (K_elem.empty()) {
for (auto& [geom, trial_restriction] : trial_restrictions) {
K_elem[geom] = ExecArray<double, 3, serac::ExecutionSpace::CPU>(
trial_restriction.num_elements, 1, trial_restriction.nodes_per_elem * trial_restriction.components);
K_elem[geom] = ExecArray<double, 3, exec>(trial_restriction.num_elements, 1,
trial_restriction.nodes_per_elem * trial_restriction.components);

detail::zero_out(K_elem[geom]);
}
Expand Down

0 comments on commit 2f6c1f6

Please sign in to comment.