def __init__(self, nd, name="defaultDomain", units="m"): """ Set dimensions (nd), name string, and units string """ if nd not in [1, 2, 3]: raise RuntimeError("Domain object must have dimension 1,2, or 3") self.nd = nd self.name = name self.units = units # make default empty list for parameters self.vertices = [] self.vertexFlags = [] self.segments = [] self.segmentFlags = [] self.facets = [] # necessary in 2D for gmsh self.facetFlags = [] self.holes = [] self.holes_ind = [] # for gmsh: index of hole (2D: facet; 3D: volume) self.regions = [] self.regionFlags = [] self.volumes = [] # only for gmsh: loop of facets # for bounding box self.x = [] self.L = [] # list of shape instances (from proteus.SpatialTools.py) self.shape_list = [] # list of boundary conditions self.bc = [] # list of auxiliaryVariables self.auxiliaryVariables = [] # needed for gmsh self.volumes = [] self.boundaryTags = {} self.BC = {} self.BCbyFlag = {} # use_gmsh hack self.use_gmsh = False self.MeshOptions = MeshTools.MeshOptions(self)