當前位置: 首頁>>代碼示例>>Python>>正文


Python meshconvert.DataHandler類代碼示例

本文整理匯總了Python中dolfin_utils.meshconvert.meshconvert.DataHandler的典型用法代碼示例。如果您正苦於以下問題:Python DataHandler類的具體用法?Python DataHandler怎麽用?Python DataHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了DataHandler類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

 def __init__(self, cell_type, mesh_dim, test):
     DataHandler.__init__(self)
     self.vertices, self.cells, self.functions = [], [], {}
     self.vertices_ended = self.cells_ended = self.closed = False
     self.__type, self.__dim = cell_type, mesh_dim
     self.__test = test
     test.assertEqual(self._state, self.State_Invalid)
     self.test_warnings = []
開發者ID:alogg,項目名稱:dolfin,代碼行數:8,代碼來源:test.py

示例2: end_meshfunction

 def end_meshfunction(self):
     DataHandler.end_meshfunction(self)
     self.__curfunc[-1] = True
開發者ID:alogg,項目名稱:dolfin,代碼行數:3,代碼來源:test.py

示例3: add_entity_meshfunction

 def add_entity_meshfunction(self, index, value):
     DataHandler.add_entity_meshfunction(self, index, value)
     self.__curfunc[2][index] = value
開發者ID:alogg,項目名稱:dolfin,代碼行數:3,代碼來源:test.py

示例4: start_meshfunction

 def start_meshfunction(self, name, dim, sz):
     DataHandler.start_meshfunction(self, name, dim, sz)
     entries = []
     for i in range(sz):
         entries.append(None)
     self.__curfunc = self.functions[name] = [dim, sz, entries, False]
開發者ID:alogg,項目名稱:dolfin,代碼行數:6,代碼來源:test.py

示例5: end_cells

 def end_cells(self):
     DataHandler.end_cells(self)
     self.cells_ended = True
開發者ID:alogg,項目名稱:dolfin,代碼行數:3,代碼來源:test.py

示例6: add_cell

 def add_cell(self, cell, nodes):
     DataHandler.add_cell(self, cell, nodes)
     self.cells[cell] = tuple(nodes)
開發者ID:alogg,項目名稱:dolfin,代碼行數:3,代碼來源:test.py

示例7: start_cells

 def start_cells(self, num_cells):
     DataHandler.start_cells(self, num_cells)
     for i in range(num_cells):
         self.cells.append(None)
開發者ID:alogg,項目名稱:dolfin,代碼行數:4,代碼來源:test.py

示例8: end_vertices

 def end_vertices(self):
     DataHandler.end_vertices(self)
     self.vertices_ended = True
開發者ID:alogg,項目名稱:dolfin,代碼行數:3,代碼來源:test.py

示例9: add_vertex

 def add_vertex(self, vertex, coords):
     DataHandler.add_vertex(self, vertex, coords)
     self.vertices[vertex] = tuple(coords)
開發者ID:alogg,項目名稱:dolfin,代碼行數:3,代碼來源:test.py

示例10: start_vertices

 def start_vertices(self, num_vertices):
     DataHandler.start_vertices(self, num_vertices)
     self.vertices = []
     for i in range(num_vertices):
         self.vertices.append(None)
開發者ID:alogg,項目名稱:dolfin,代碼行數:5,代碼來源:test.py

示例11: set_mesh_type

 def set_mesh_type(self, *args):
     DataHandler.set_mesh_type(self, *args)
     test = self.__test
     test.assertEqual(self._state, self.State_Init)
     test.assertEqual(self._cell_type, self.__type)
     test.assertEqual(self._dim, self.__dim)
開發者ID:alogg,項目名稱:dolfin,代碼行數:6,代碼來源:test.py

示例12: close

 def close(self):
     DataHandler.close(self)
     self.__test.assertEqual(self._state, self.State_Invalid)
     self.closed = True
開發者ID:alogg,項目名稱:dolfin,代碼行數:4,代碼來源:test.py


注:本文中的dolfin_utils.meshconvert.meshconvert.DataHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。