I have two meshes defined in FiPY as follows:
gmsh_mesh = fp.Gmsh2D("ProcessSim_CMOS_Step1.msh")
from fipy.meshes.mesh2D import Mesh2D
def extract_mesh(mesh, mask):
cellFaceIDs = mesh.cellFaceIDs[..., mask]
faceIDs = numerix.unique(cellFaceIDs.flatten())
facemap = numerix.zeros(mesh.faceVertexIDs.shape[1], dtype=int)
facemap[faceIDs] = faceIDs.argsort()
faceVertexIDs = mesh.faceVertexIDs[..., faceIDs]
vertIDs = numerix.unique(faceVertexIDs.flatten())
vertmap = numerix.zeros(mesh.vertexCoords.shape[1], dtype=int)
vertmap[vertIDs] = vertIDs.argsort()
return Mesh2D(mesh.vertexCoords[..., vertIDs],
vertmap[faceVertexIDs],
facemap[cellFaceIDs])
oxideMesh = extract_mesh(mesh=gmsh_mesh, mask=gmsh_mesh.physicalCells["Oxide"])
siliconMesh = extract_mesh(mesh=gmsh_mesh, mask=gmsh_mesh.physicalCells["Silicon"])
So while doing process simulation, say etching, the user wants to selectively etch the specified material. To assign different etch rate to different points, I want to find whether a coordinate <x, y, 0.0> belongs to oxideMesh or siliconMesh. Is there a way to do this?