Exemplo n.º 1
0
    def get_inverse_metric_tensor(self, input_vectors=None):
        G = self.get_metric_tensor().tensor()
        G_ = MetricTensor(sympy.Matrix(G).inv().as_immutable(), self.model.input_vars)

        if input_vectors is not None:            
            G_ = self.model.apply(G_.tensor(), input_vectors)
        
        return G_
Exemplo n.º 2
0
 def get_metric_tensor(self, input_vectors=None):
     J = self.get_jacobian()
     me = (J.T*J)
     me.simplify()
     me = MetricTensor(me.as_immutable(), self.model.input_vars)
     
     if input_vectors is not None:            
         me = self.model.apply(me.tensor(), input_vectors)
     
     return me