This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

using zero() function

0 votes

Hi,

When I want to use zero() function to make the value of some of the components of a vector equal to zero, I got the following error. It should be noted that test here is a vector and b is also a vector. test contains the row indices I want to make them to zero.

ERROR:

b.zero(test)
TypeError: GenericTensor_zero() takes exactly one argument (2 given)

CODE:

if manual:
# Modif A: zero bc row & set diagonal to 1
A.ident(test)
A.apply('insert')

b.zero(test)
b.apply('insert')
asked Apr 15, 2016 by Abi FEniCS Novice (270 points)
...