Ejemplo n.º 1
0
    def set_arg_types(self):
        if self.mode == 'weak':
            self.function = terms.dw_lin_prestress
            use_method_with_name(self, self.get_fargs_weak, 'get_fargs')

        else:
            self.function = self.d_lin_prestress
            use_method_with_name(self, self.get_fargs_eval, 'get_fargs')
            self.use_caches = {'cauchy_strain' : [['parameter']]}
Ejemplo n.º 2
0
 def set_arg_types(self):
     """Dynamically inherits from either BiotGradTH or
     BiotDivTH."""
     if self.mode == "grad":
         self.function = terms.dw_biot_grad
         use_method_with_name(self, self.get_fargs_grad, "get_fargs")
         self.use_caches = {"state_in_volume_qp": [["state", {"state": (-1, -1)}]]}
     elif self.mode == "div":
         self.function = terms.dw_biot_div
         use_method_with_name(self, self.get_fargs_div, "get_fargs")
         self.use_caches = {"cauchy_strain": [["state", {"strain": (-1, -1)}]]}
     else:
         raise NotImplementedError