def __init__(self, LHS_s, RHS_s, fFunc, t, x, useShallowCopy=True): ObjectiveFunction_base.__init__(self, LHS_s, RHS_s) self.xi = x / t self.t = t self.x = x # The next bit is a one dimensional dictionary for the coefficents # that can be passed to this Osher Function self.c = { ('u', 0): numpy.zeros((1, ), 'd'), ('m', 0): numpy.zeros((1, ), 'd'), ('dm', 0, 0): numpy.zeros((1, ), 'd'), ('f', 0): numpy.zeros((1, 1), 'd'), ('df', 0, 0): numpy.zeros((1, 1), 'd'), ('a', 0, 0): numpy.zeros((1, 1, 1), 'd'), ('da', 0, 0, 0): numpy.zeros((1, 1, 1), 'd'), ('phi', 0): numpy.zeros((1, ), 'd'), ('dphi', 0, 0): numpy.zeros((1, ), 'd'), ('r', 0): numpy.zeros((1, ), 'd'), ('dr', 0, 0): numpy.zeros((1, ), 'd'), ('H', 0): numpy.zeros((1, ), 'd'), ('dH', 0, 0): numpy.zeros((1, 1), 'd') } if useShallowCopy: self.fFunc = fFunc else: import copy self.fFunc = copy.deepcopy(fFunc) self.fFunc.initializeElementQuadrature(self.t, self.c) if (LHS_s < RHS_s): self.getResidual = self.Argmin else: self.getResidual = self.Argmax
def __init__(self,LHS_s,RHS_s,fFunc,t,x,useShallowCopy=True): ObjectiveFunction_base.__init__(self,LHS_s,RHS_s) self.xi = x/t self.t = t self.x = x # The next bit is a one dimensional dictionary for the coefficents # that can be passed to this Osher Function self.c = {('u',0):numpy.zeros((1,),'d'), ('m',0):numpy.zeros((1,),'d'), ('dm',0,0):numpy.zeros((1,),'d'), ('f',0):numpy.zeros((1,1),'d'), ('df',0,0):numpy.zeros((1,1),'d'), ('a',0,0):numpy.zeros((1,1,1),'d'), ('da',0,0,0):numpy.zeros((1,1,1),'d'), ('phi',0):numpy.zeros((1,),'d'), ('dphi',0,0):numpy.zeros((1,),'d'), ('r',0):numpy.zeros((1,),'d'), ('dr',0,0):numpy.zeros((1,),'d'), ('H',0):numpy.zeros((1,),'d'), ('dH',0,0):numpy.zeros((1,1),'d')} if useShallowCopy: self.fFunc = fFunc else: import copy self.fFunc = copy.deepcopy(fFunc) self.fFunc.initializeElementQuadrature(self.t,self.c) if(LHS_s < RHS_s): self.getResidual = self.Argmin else: self.getResidual = self.Argmax
def __init__(self, LHS_s, RHS_s, fFunc, t, x): ObjectiveFunction_base.__init__(self, LHS_s, RHS_s) self.fFunc = fFunc self.xi = x / t if (LHS_s < RHS_s): self.getResidual = self.Argmin else: self.getResidual = self.Argmax
def __init__(self,LHS_s,RHS_s,fFunc,t,x): ObjectiveFunction_base.__init__(self,LHS_s,RHS_s) self.fFunc = fFunc self.xi = x/t if(LHS_s < RHS_s): self.getResidual = self.Argmin else: self.getResidual = self.Argmax
def __init__(self, LHS_x, RHS_x): ObjectiveFunction_base.__init__(self, LHS_x, RHS_x)
def __init__(self,LHS_x,RHS_x): ObjectiveFunction_base.__init__(self,LHS_x,RHS_x)