Ejemplo n.º 1
0
 def _jacobian_matrix_assemble(self,
                               jacobian_form: ParametrizedTensorFactory,
                               petsc_jacobian: PETSc.Mat):
     self.jacobian_matrix = PETScMatrix(petsc_jacobian)
     evaluate(jacobian_form, tensor=self.jacobian_matrix)
Ejemplo n.º 2
0
 def _residual_vector_assemble(self,
                               residual_form: ParametrizedTensorFactory,
                               petsc_residual: PETSc.Vec):
     self.residual_vector = PETScVector(petsc_residual)
     evaluate(residual_form, tensor=self.residual_vector)
Ejemplo n.º 3
0
 def _jacobian_matrix_assemble(self,
                               jacobian_form: ParametrizedTensorFactory):
     return evaluate(jacobian_form)
Ejemplo n.º 4
0
 def _residual_vector_assemble(self,
                               residual_form: ParametrizedTensorFactory):
     return evaluate(residual_form)
Ejemplo n.º 5
0
 def _init_rhs(self, rhs, bcs):
     self.rhs = evaluate(rhs)
Ejemplo n.º 6
0
 def _init_lhs(self, lhs, bcs):
     self.lhs = evaluate(lhs)
Ejemplo n.º 7
0
 def _assemble_if_form(mat: ParametrizedTensorFactory):
     return evaluate(mat)
Ejemplo n.º 8
0
 def _init_rhs(self, rhs: ParametrizedTensorFactory,
               bcs: (list_of(DirichletBC), ProductOutputDirichletBC,
                     dict_of(str, list_of(DirichletBC)),
                     dict_of(str, ProductOutputDirichletBC), None)):
     self.rhs = evaluate(rhs)