def test3(): # ... geo2d = square(n=[3, 3], p=[2, 2]) con2d = connectivity(geo2d) con2d.init_data_structure() con2d.printinfo()
def test3(): # ... geo2d = square(n=[3,3], p=[2,2]) con2d = connectivity(geo2d) con2d.init_data_structure() con2d.printinfo()
def test1(): geo1d = line(n=[5], p=[3]) # ... print ("========= connectivity on a line =========") con1d = connectivity(geo1d) con1d.init_data_structure() con1d.printinfo() print ("==========================================")
def test1(): geo1d = line(n=[5], p=[3]) # ... print("========= connectivity on a line =========") con1d = connectivity(geo1d) con1d.init_data_structure() con1d.printinfo() print("==========================================")
def test2(): geo1d = line(n=[5], p=[3]) # ... print ("========= dirichlet connectivity on a line =========") con1d_dir = connectivity(geo1d) bc1d_dir = boundary_conditions(geo1d) list_DirFaces = [[0,1]] bc1d_dir.dirichlet(geo1d, list_DirFaces) con1d_dir.init_data_structure(bc1d_dir) con1d_dir.printinfo() print ("==========================================")
def test2(): geo1d = line(n=[5], p=[3]) # ... print("========= dirichlet connectivity on a line =========") con1d_dir = connectivity(geo1d) bc1d_dir = boundary_conditions(geo1d) list_DirFaces = [[0, 1]] bc1d_dir.dirichlet(geo1d, list_DirFaces) con1d_dir.init_data_structure(bc1d_dir) con1d_dir.printinfo() print("==========================================")
def test5(): # ... number of elemens n = 4 # ... k is the b-spline order k = 3 # ... print ("==== connectivity on a periodic square ====") geo2d = periodic_square(n=[n-1,n-1], p=[k-1,k-1]) con2d = connectivity(geo2d) con2d.init_data_structure() con2d.printinfo() print ("==========================================")
def test5(): # ... number of elemens n = 4 # ... k is the b-spline order k = 3 # ... print("==== connectivity on a periodic square ====") geo2d = periodic_square(n=[n - 1, n - 1], p=[k - 1, k - 1]) con2d = connectivity(geo2d) con2d.init_data_structure() con2d.printinfo() print("==========================================")
def test4(): # ... number of elemens n = 4 # ... k is the b-spline order k = 3 # geo1d = periodic_line(n=[n-1], p=[k-1]) # ... print ("===== connectivity on a periodic line ====") con1d = connectivity(geo1d) con1d.init_data_structure() con1d.printinfo() print ("==========================================")
def test4(): # ... number of elemens n = 4 # ... k is the b-spline order k = 3 # geo1d = periodic_line(n=[n - 1], p=[k - 1]) # ... print("===== connectivity on a periodic line ====") con1d = connectivity(geo1d) con1d.init_data_structure() con1d.printinfo() print("==========================================")
def __init__(self, as_file=None, geometry=None \ , mapping = None, tensor=True, tensorlevel=1, al_storeddata=False): pigasusObject.__init__(self) self.type = "space" self.tensor = tensor self.tensorlevel = tensorlevel self.grids = None self.mapping = None self.metric = None # # needed for assembly, when evaluating fields # self._currentPatch = None # self._currentPatchID = None self.list_faces_dir = [] self.list_faces_duplicated = [] self.list_faces_duplicata = [] # physical points self._points = None # parametric (sites) points self._sites = None if as_file is not None: import caid.cad_geometry as cg self.geometry = cg.cad_geometry(file=as_file) else: if geometry is None: print("SERIOUS ERROR while constructing the space") import sys sys.exit(2) self.geometry = geometry self.EM = ElementsManager(self.geometry) self.dim = self.geometry.dim self.Rd = self.geometry.Rd self.ndof = 1 self.storeddata = al_storeddata self.nderiv_pts = 1 # used to compute the position, the 1st derivative self.maxnen = 0 self.connectivity = None self.boundary_conditions = None self.exterior_map = False if mapping is not None: self.exterior_map = True self.usemetric = False self.metric_id = -1 self.metric = None # self.updatePoints = True from caid.numbering.connectivity import connectivity from caid.numbering.boundary_conditions import boundary_conditions self.connectivity = connectivity(self.geometry, ai_ndof=self.ndof) self.boundary_conditions = boundary_conditions(self.geometry) if self.dim not in [1, 2, 3]: print("Error space: dimension not implemented yet") # setting the maxnen for the space self.maxnen = max(self.connectivity.list_nen) # this must be the last thing to do self.id = self.com.nspaces self.com.nspaces += 1 self.com.spaces.append(self)