I generated a 2D model with gmsh and set up different physics groups. When I try to
coeff = CellVariable(mesh=mesh)
coeff.constrain(k_Au,where=mesh.physicalCells == 'ring')
I get the error
if numerix.shape(value.where)[-1] == self.mesh.numberOfFaces:
IndexError: tuple index out of range
How can I set different coefficients for my different physicalCells?
You don't have the syntax quite right. Try
Also,
.constrain()
is intended for boundary conditions. To set different values of a coefficient, I would do