return 0 diffusivity if diffusion in disabled

This commit is contained in:
Tor Harald Sandve 2021-02-25 15:22:01 +01:00
parent 48ad676010
commit ffe51aa346

View File

@ -498,7 +498,13 @@ public:
* \brief Return the diffusivity for the intersection between two elements. * \brief Return the diffusivity for the intersection between two elements.
*/ */
Scalar diffusivity(unsigned elemIdx1, unsigned elemIdx2) const Scalar diffusivity(unsigned elemIdx1, unsigned elemIdx2) const
{ return diffusivity_->at(isId_(elemIdx1, elemIdx2)); } {
if(diffusivity_->empty())
return 0.0;
return diffusivity_->at(isId_(elemIdx1, elemIdx2));
}
private: private: