← Back to team overview

dolfin team mailing list archive

reset_tensor in assemble

 

Hi, 
A.zero() is called both when reset_tensor is true and false
in Assembler::init_global_tensor. 

The code is as follows: 

void Assembler::init_global_tensor(GenericTensor& A,
                                   const Form& a,
                                   UFC& ufc, bool reset_tensor)
{
  if (reset_tensor)
  {
    ... 
  }
  else 
    A.zero();
}

Is this on purpose or is it a bug ? 
I thought 'A.zero()' should not happen when reset_tensor=False. 

Kent



Follow ups