Skip to content

Commit

Permalink
Fix dirac kernels thread and LineMaterialSamplerBase thread. (idahola…
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad committed Feb 2, 2017
1 parent 20c6fc4 commit 7eebb31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Expand Up @@ -147,6 +147,11 @@ LineMaterialSamplerBase<T>::execute()
const RealVectorValue line_unit_vec = line_vec / line_length;
std::vector<Real> values(_material_properties.size());

std::set<unsigned int> needed_mat_props;
const std::set<unsigned int> & mp_deps = this->getMatPropDependencies();
needed_mat_props.insert(mp_deps.begin(), mp_deps.end());
_fe_problem.setActiveMaterialProperties(needed_mat_props, _tid);

for (const auto & elem : intersected_elems)
{
if (elem->processor_id() != processor_id())
Expand Down Expand Up @@ -179,6 +184,7 @@ LineMaterialSamplerBase<T>::execute()
addSample(_q_point[qp], qp_proj_dist_along_line, values);
}
}
_fe_problem.clearActiveMaterialProperties(_tid);
}

template <typename T>
Expand Down
7 changes: 7 additions & 0 deletions framework/src/base/ComputeDiracThread.C
Expand Up @@ -60,7 +60,13 @@ ComputeDiracThread::subdomainChanged()
{
std::set<MooseVariable *> needed_moose_vars;
_dirac_kernels.updateVariableDependency(needed_moose_vars, _tid);

// Update material dependencies
std::set<unsigned int> needed_mat_props;
_dirac_kernels.updateMatPropDependency(needed_mat_props, _tid);

_fe_problem.setActiveElementalMooseVariables(needed_moose_vars, _tid);
_fe_problem.setActiveMaterialProperties(needed_mat_props, _tid);
}


Expand Down Expand Up @@ -155,6 +161,7 @@ void
ComputeDiracThread::post()
{
_fe_problem.clearActiveElementalMooseVariables(_tid);
_fe_problem.clearActiveMaterialProperties(_tid);
}

void
Expand Down

0 comments on commit 7eebb31

Please sign in to comment.