/[escript]/branches/subworld2/downunder/py_src/inversioncostfunctions.py
ViewVC logotype

Diff of /branches/subworld2/downunder/py_src/inversioncostfunctions.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5529 by jfenwick, Fri Mar 6 04:22:49 2015 UTC revision 5530 by jfenwick, Wed Mar 11 23:39:58 2015 UTC
# Line 201  class InversionCostFunction(MeteredCostF Line 201  class InversionCostFunction(MeteredCostF
201          self.numMappings=numMappings          self.numMappings=numMappings
202          self.numModels=numModels          self.numModels=numModels
203    
204          self.__num_tradeoff_factors = self.regularization.getNumTradeOffFactors() + self.numModels        # Need to make sure this is updated later
205            if regularization is not None:
206          self.__num_tradeoff_factors = self.regularization.getNumTradeOffFactors() + self.numModels
207            else:
208          self.__num_tradeoff_factors=None
209          
210          self.setTradeOffFactorsModels()          self.setTradeOffFactorsModels()
211    
212      def getDomain(self):      def getDomain(self):
# Line 210  class InversionCostFunction(MeteredCostF Line 215  class InversionCostFunction(MeteredCostF
215    
216          :rtype: `Domain`          :rtype: `Domain`
217          """          """
218            raise RuntimeError("External access to regularization not permitted in split world mode.")
219          self.regularization.getDomain()          self.regularization.getDomain()
220    
221      def getNumTradeOffFactors(self):      def getNumTradeOffFactors(self):
# Line 238  class InversionCostFunction(MeteredCostF Line 244  class InversionCostFunction(MeteredCostF
244    
245          :rtype: `Regularization`          :rtype: `Regularization`
246          """          """
247            raise RuntimeError("External access to regularization not permitted in split world mode.")
248          return self.regularization          return self.regularization
249    
250      def setTradeOffFactorsModels(self, mu=None):      def setTradeOffFactorsModels(self, mu=None):
# Line 283  class InversionCostFunction(MeteredCostF Line 290  class InversionCostFunction(MeteredCostF
290          :param mu: trade-off factors for the level-set variation part          :param mu: trade-off factors for the level-set variation part
291          :param mu_c: trade-off factors for the cross gradient variation part          :param mu_c: trade-off factors for the cross gradient variation part
292          """          """
293            raise RuntimeError("External access to regularization not permitted in split world mode.")
294          self.regularization.setTradeOffFactorsForVariation(mu)          self.regularization.setTradeOffFactorsForVariation(mu)
295          self.regularization.setTradeOffFactorsForCrossGradient(mu_c)          self.regularization.setTradeOffFactorsForCrossGradient(mu_c)
296    

Legend:
Removed from v.5529  
changed lines
  Added in v.5530

  ViewVC Help
Powered by ViewVC 1.1.26