def create_ESMPmesh_3x3(): ''' PRECONDITIONS: ESMP is initialized. POSTCONDITIONS: An ESMP_Mesh (3x3) has been created and returned as 'mesh'. ''' # Two parametric dimensions, and three spatial dimensions mesh = ESMP.ESMP_MeshCreate(2,2) mesh, nodeCoord, elemType, elemConn = mesh_create_3x3(mesh) return mesh, nodeCoord, elemType, elemConn
def __init__(self, numTopoDims, numSpaceDims): """ Constructor @param numTopoDims number of topological dimensions @param numSpaceDims number of space dimensions """ # handle to the grid object self.grid = None # whether or not nodes were added self.nodesAdded = False # whether or not cells were added self.cellsAdded = False # the local processor rank self.pe = 0 # number of processors self.nprocs = 1 # communicator self.comm = None vm = ESMP.ESMP_VMGetGlobal() self.pe, self.nprocs = ESMP.ESMP_VMGet(vm) self.grid = ESMP.ESMP_MeshCreate(numTopoDims, numSpaceDims)