示例#1
0
    def __init__(self, alpha, gamma, iterations):
        self.alpha = alpha
        self.gamma = gamma
        self.iterations = iterations
        self.count = 0
        self.solver_converged = True
        self.meshname = None

        threadno = threadstate.findThreadNumber()

        ## create material
        materialmanager.materialmanager.add_secret(self.materialName)
        ## SkeletonRelaxationRateTensor is the PropertyRegistration for the
        ## SkeletonRelaxationRate property.
        relaxPropReg = skeletonrelaxationrate.SkeletonRelaxationRateTensor.\
            named_copy("__relaxationrate%d__" % threadno, secret=True)
        relaxPropReg.getParameter("gamma").value = self.gamma
        relaxPropReg.getParameter("alpha").value = self.alpha
        self.skelRelRate = relaxPropReg()
        # gamma_parameter = \
        #     skeletonrelaxationrate.SkeletonRelaxationRateTensor.getParameter(
        #     'gamma')
        # gamma_parameter.value = self.gamma
        # alpha_parameter = \
        #     skeletonrelaxationrate.SkeletonRelaxationRateTensor.getParameter(
        #     'alpha')
        # alpha_parameter.value = self.alpha
        # self.skelRelRate = skeletonrelaxationrate.SkeletonRelaxationRateTensor()
        materialmanager.materialmanager.add_prop(self.materialName,
                                                 self.skelRelRate.name())


        # isotropic elasticity
        stiffnessPropReg = iso.IsotropicElasticity.named_copy(
            "__stiffness%d__" % threadno, secret=True)
        stiffnessPropReg.getParameter('cijkl').value = \
            isocijkl.IsotropicRank4TensorCij(c11=1.0, c12=0.5)
        self.stiffness = stiffnessPropReg()
        materialmanager.materialmanager.add_prop(
            self.materialName, self.stiffness.name())
示例#2
0
 def modulus(self):
     return isocijkl.IsotropicRank4TensorCij(c11=1.0, c12=0.5).tensorForm()