7 """Handles data in a boundary-File"""
8
9 - def __init__(self,case,backup=False,region=None):
12
14 return self.content[key]
15
17 if not type(value)==dict:
18 raise "BoundaryType",("Type of boundary element must be dict, is",type(value))
19 for k in ["type","nFaces","startFace"]:
20 if not value.has_key(k):
21 raise "BoundaryType",("Required key",k,"is missing from",value,"not a valid patch")
22
23 self.content[key]=value
24
26 """Returns a list with the names of the patches
27 @param patchType: If specified only patches of the specific type are returned"""
28
29 if patchType==None:
30 return self.content.keys()
31 else:
32 result=[]
33 for k,v in self.content.iteritems():
34 if v["type"]==patchType:
35 result.append(k)
36 return result