def _run_discr(): # Actual implemnetation of the discretization. gb_set = LocalGridBucketSet(g.dim, reg) gb_set.construct_local_buckets(local_mesh_args) # First basis functions for local problems ( basis_functions, cc_assembler, # Assembler for local Nd problem, one per coarse cell center cc_bc_values, full_assembler_map, # Full hierarchy of (Nd, .., 0) assemblers ilu_map, cell_face_relations, ) = local_problems.cell_basis_functions(reg, gb_set, self, parameter_dictionary) # Call method to transfer basis functions to transmissibilties over coarse # edges trm_cell = local_problems.compute_transmissibilies( reg, gb_set, basis_functions, cc_assembler, cc_bc_values, g, self, parameter_dictionary, cell_face_relations, ) matrix_bound_pressure_cell = ( local_problems.discretize_pressure_trace_macro_bound( g, gb_set, self, cc_assembler, basis_functions, )) ( trm_boundary, matrix_bound_pressure_face, ) = local_problems.discretize_boundary_conditions( reg, gb_set, self, parameter_dictionary, g, full_assembler_map, ilu_map, cell_face_relations, ) return ( trm_cell, trm_boundary, matrix_bound_pressure_cell, matrix_bound_pressure_face, )
def test_mpfa_boundary_domain_2d_with_fractures(self): g = create_grids.cart_2d() reg = ia_reg.extract_mpfa_regions(g, nodes=[3])[0] # Two crossing fractures. One internal to the domain, one crosses the boundary p = np.array([[-0.7, 1.3, 0.1, 0.5], [1.2, 1.2, 0.9, 1.7]]) e = np.array([[0, 2], [1, 3]]) reg.add_fractures(points=p, edges=e) local_gb = LocalGridBucketSet(2, reg) local_gb.construct_local_buckets()
def test_mpfa_internal_domain_3d_with_fractures(self): g = create_grids.cart_3d() reg = ia_reg.extract_mpfa_regions(g, nodes=[13])[0] f_1 = pp.Fracture( np.array([[0.7, 1.4, 1.4, 0.7], [0.4, 0.4, 1.4, 1.4], [0.6, 0.6, 0.6, 0.6]]) ) f_2 = pp.Fracture( np.array([[1.1, 1.1, 1.1, 1.1], [0.3, 1.4, 1.4, 0.3], [0.1, 0.1, 0.9, 0.9]]) ) reg.add_fractures(fractures=[f_1, f_2]) local_gb = LocalGridBucketSet(3, reg) local_gb.construct_local_buckets()
def test_mpfa_internal_domain_3d(self): g = create_grids.cart_3d() reg = ia_reg.extract_mpfa_regions(g, nodes=[13])[0] local_gb = LocalGridBucketSet(3, reg) local_gb.construct_local_buckets()
def test_mpfa_boundary_domain_2d(self): g = create_grids.cart_2d() reg = ia_reg.extract_mpfa_regions(g, nodes=[3])[0] local_gb = LocalGridBucketSet(2, reg) local_gb.construct_local_buckets()
def test_tpfa_internal_domain_2d(self): g = create_grids.cart_2d() reg = ia_reg.extract_tpfa_regions(g, faces=[4])[0] local_gb = LocalGridBucketSet(2, reg) local_gb.construct_local_buckets()