In [1]:
import gstlearn as gl
import gstlearn.plot as gp
In [2]:
db = gl.DbGrid.create([50,50],[2,2])
mesh = gl.MeshETurbo([100,100])
proj = gl.ProjMatrix.create(db,mesh)
In [3]:
A = gl.TestInheritance()
A.setIproj(proj)
In [4]:
class SpecializedProj(gl.IProjMatrix):
def __init__(self,n):
super(SpecializedProj,self).__init__()
self.n = n
def mesh2point(self,inv,outv):
for i in range(inv.size):
outv[i] = inv[i]
def point2mesh(self,outv,inv):
for i in range(inv.size):
outv[i] = inv[i]
def getApexNumber(self):
return self.n
def getPointNumber(self):
return self.n
In [5]:
newproj = SpecializedProj(12)
In [6]:
A.setIproj(newproj)
In [7]:
A.display()
Number of Apices: 12 Number of Points: 12