10args = commonsteps.get_args()
13executable =
"peano4matrixfree"
15project = mghype.matrixfree.api.Project( project_name =
"DGTwoGrid",
16 namespace = [
"tests",
"multigrid",
"matrixfree",
"poisson" ],
17 executable = executable
30assembly_matrix, assembly_matrix_scaling = matrices.get_cell_system_matrix_for_laplacian()
31mass_matrix, mass_matrix_scaling = matrices.get_cell_mass_matrix()
32face_from_cell_projection, \
33face_from_cell_projection_scaling = matrices.get_face_from_cell_matrix()
34cell_from_face_projection, \
35cell_from_face_projection_scaling = matrices.get_cell_from_face_matrix()
36approximate_system_matrix, \
37approximate_system_matrix_scaling = matrices.get_A_tilde()
40solver = mghype.matrixfree.solvers.api.DiscontinuousGalerkinDiscretisationPointWiseRiemannSolver(
42 dimensions = args.dimensions,
43 poly_degree = args.poly_degree,
44 unknowns_per_cell_node = 1,
45 solutions_per_face_node = 2,
46 projections_per_face_node = 2,
47 min_h = args.meshsize,
48 max_h = args.meshsize,
49 assembly_matrix= assembly_matrix,
50 assembly_matrix_scaling = assembly_matrix_scaling,
51 mass_matrix = mass_matrix,
52 mass_matrix_scaling = mass_matrix_scaling,
53 face_from_cell_projection = face_from_cell_projection,
54 face_from_cell_projection_scaling = face_from_cell_projection_scaling,
55 cell_from_face_projection = cell_from_face_projection,
56 cell_from_face_projection_scaling = cell_from_face_projection_scaling,
57 riemann_matrix = matrices.get_face_face_riemann_problem_matrix(),
58 boundary_matrix = matrices.get_boundary_matrix(),
59 cell_relaxation = args.omega_c,
60 face_relaxation = args.omega_f,
61 approximate_system_matrix = approximate_system_matrix,
62 approximate_system_matrix_scaling = approximate_system_matrix_scaling,
63 solver_tolerance = 1.0e-14,
64 integration_points = 0.5*(matrices.get_nodal_points_1d() + 1.0)
70 dimensions = args.dimensions,
74system_matrix, system_matrix_scaling = correction_equation_matrices.get_cell_system_matrix_for_laplacian()
75mass_matrix, mass_matrix_scaling = correction_equation_matrices.get_cell_mass_matrix()
80correction_equation_solver = mghype.matrixfree.solvers.api.CollocatedDLinearDiscretisationWithPointJacobi(
81 name =
"CollocatedPoisson",
82 unknowns_per_vertex = 1,
83 dimensions = args.dimensions,
84 min_h = args.meshsize,
85 max_h = args.meshsize,
86 local_assembly_matrix = system_matrix,
87 local_assembly_matrix_scaling=system_matrix_scaling,
88 mass_matrix = mass_matrix,
89 mass_matrix_scaling = mass_matrix_scaling,
90 solver_tolerance = 1e-12,
91 smoother_relaxation = 0.5
98 dim = args.dimensions,
100 fine_order = args.poly_degree
102prolongation_matrix = [intergrid_operators.prolongation()]
103prolongation_matrix_scaling = [0]
104restriction_matrix = [intergrid_operators.restriction()]
105restriction_matrix_scaling = [0]
106injection_matrix = [intergrid_operators.injection()]
107injection_matrix_scaling = [0]
109solver.preprocessing_action_set = mghype.matrixfree.solvers.api.actionsets.MultiplicativeDGCGCoupling(
111 correction_equation_solver,
113 prolongation_matrix_scaling,
115 restriction_matrix_scaling,
117 injection_matrix_scaling,
124project.add_solver(correction_equation_solver, auxiliary=
True)
125project.add_solver(solver)
128commonsteps.configure_and_build_project(args,project)
129commonsteps.run_and_validate(args,executable)
Using normalised identity matrix instead of the mass matrix.