parameters: (mesh, a, b, c, nc=None)
return_statement: return D
docstring: Parameters
      ----------
      a :
          Attribute for diffusion coefficient. Cell based or Boundary based
  
      b : :gimliapi:`GIMLI::Boundary`
          Boundary
  
      c : :gimliapi:`GIMLI::Cell`
  
          associated Cell in flow direction
  
      nc : :gimliapi:`GIMLI::Cell`
          associated neighbor cell .. if one given
          from flow direction
docstring_summary: Parameters
      ----------
      a :
          Attribute for diffusion coefficient. Cell based or Boundary based
docstring_tokens: Parameters ---------- a : Attribute for diffusion coefficient . Cell based or Boundary based
function: def findDiffusion(mesh, a, b, c, nc=None):
      """
      Parameters
      ----------
      a :
          Attribute for diffusion coefficient. Cell based or Boundary based
  
      b : :gimliapi:`GIMLI::Boundary`
          Boundary
  
      c : :gimliapi:`GIMLI::Cell`
  
          associated Cell in flow direction
  
      nc : :gimliapi:`GIMLI::Cell`
          associated neighbor cell .. if one given
          from flow direction
      """
      D = 0
  
      if nc:
          if len(a) == mesh.boundaryCount():
              D = a[b.id()] / nc.center().distance(c.center()) * b.size()
          else:
              # Diffusion part
              # Interface harmonic median
              D = 1. / (c.center().distance(b.center())/a[c.id()] +
                        nc.center().distance(b.center())/a[nc.id()]) * b.size()
      else:
          if len(a) == mesh.boundaryCount():
              D = a[b.id()] / b.center().distance(c.center()) * b.size()
          else:
              D = a[c.id()] / b.center().distance(c.center()) * b.size()
      return D
function_tokens: def findDiffusion ( mesh , a , b , c , nc = None ) : D = 0 if nc : if len ( a ) == mesh . boundaryCount ( ) : D = a [ b . id ( ) ] / nc . center ( ) . distance ( c . center ( ) ) * b . size ( ) else : # Diffusion part # Interface harmonic median D = 1. / ( c . center ( ) . distance ( b . center ( ) ) / a [ c . id ( ) ] + nc . center ( ) . distance ( b . center ( ) ) / a [ nc . id ( ) ] ) * b . size ( ) else : if len ( a ) == mesh . boundaryCount ( ) : D = a [ b . id ( ) ] / b . center ( ) . distance ( c . center ( ) ) * b . size ( ) else : D = a [ c . id ( ) ] / b . center ( ) . distance ( c . center ( ) ) * b . size ( ) return D