Python matplotlib.tri.tritools.TriAnalyzer() Examples
The following are 10
code examples of matplotlib.tri.tritools.TriAnalyzer().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
matplotlib.tri.tritools
, or try the search function
.
Example #1
Source File: triinterpolate.py From Computable with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.max(compressed_x) - np.min(compressed_x) self._unit_y = np.max(compressed_y) - np.min(compressed_y) self._pts = np.vstack((compressed_x/float(self._unit_x), compressed_y/float(self._unit_y))).T # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #2
Source File: triinterpolate.py From Mastering-Elasticsearch-7.0 with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.ptp(compressed_x) self._unit_y = np.ptp(compressed_y) self._pts = np.column_stack([compressed_x / self._unit_x, compressed_y / self._unit_y]) # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #3
Source File: triinterpolate.py From matplotlib-4-abaqus with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.max(compressed_x) - np.min(compressed_x) self._unit_y = np.max(compressed_y) - np.min(compressed_y) self._pts = np.vstack((compressed_x/float(self._unit_x), compressed_y/float(self._unit_y))).T # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #4
Source File: triinterpolate.py From neural-network-animation with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.max(compressed_x) - np.min(compressed_x) self._unit_y = np.max(compressed_y) - np.min(compressed_y) self._pts = np.vstack((compressed_x/float(self._unit_x), compressed_y/float(self._unit_y))).T # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #5
Source File: triinterpolate.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.ptp(compressed_x) self._unit_y = np.ptp(compressed_y) self._pts = np.column_stack([compressed_x / self._unit_x, compressed_y / self._unit_y]) # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #6
Source File: triinterpolate.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.ptp(compressed_x) self._unit_y = np.ptp(compressed_y) self._pts = np.column_stack([compressed_x / self._unit_x, compressed_y / self._unit_y]) # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #7
Source File: triinterpolate.py From ImageFusion with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.max(compressed_x) - np.min(compressed_x) self._unit_y = np.max(compressed_y) - np.min(compressed_y) self._pts = np.vstack((compressed_x/float(self._unit_x), compressed_y/float(self._unit_y))).T # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #8
Source File: triinterpolate.py From coffeegrindsize with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.ptp(compressed_x) self._unit_y = np.ptp(compressed_y) self._pts = np.column_stack([compressed_x / self._unit_x, compressed_y / self._unit_y]) # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #9
Source File: triinterpolate.py From CogAlg with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.ptp(compressed_x) self._unit_y = np.ptp(compressed_y) self._pts = np.column_stack([compressed_x / self._unit_x, compressed_y / self._unit_y]) # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()
Example #10
Source File: triinterpolate.py From twitter-stock-recommendation with MIT License | 5 votes |
def __init__(self, triangulation, z, kind='min_E', trifinder=None, dz=None): TriInterpolator.__init__(self, triangulation, z, trifinder) # Loads the underlying c++ _triangulation. # (During loading, reordering of triangulation._triangles may occur so # that all final triangles are now anti-clockwise) self._triangulation.get_cpp_triangulation() # To build the stiffness matrix and avoid zero-energy spurious modes # we will only store internally the valid (unmasked) triangles and # the necessary (used) points coordinates. # 2 renumbering tables need to be computed and stored: # - a triangle renum table in order to translate the result from a # TriFinder instance into the internal stored triangle number. # - a node renum table to overwrite the self._z values into the new # (used) node numbering. tri_analyzer = TriAnalyzer(self._triangulation) (compressed_triangles, compressed_x, compressed_y, tri_renum, node_renum) = tri_analyzer._get_compressed_triangulation(True, True) self._triangles = compressed_triangles self._tri_renum = tri_renum # Taking into account the node renumbering in self._z: node_mask = (node_renum == -1) self._z[node_renum[~node_mask]] = self._z self._z = self._z[~node_mask] # Computing scale factors self._unit_x = np.ptp(compressed_x) self._unit_y = np.ptp(compressed_y) self._pts = np.column_stack([compressed_x / self._unit_x, compressed_y / self._unit_y]) # Computing triangle points self._tris_pts = self._pts[self._triangles] # Computing eccentricities self._eccs = self._compute_tri_eccentricities(self._tris_pts) # Computing dof estimations for HCT triangle shape function self._dof = self._compute_dof(kind, dz=dz) # Loading HCT element self._ReferenceElement = _ReducedHCT_Element()