*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit e2b6459b authored by Innerberger, Michael's avatar Innerberger, Michael
Browse files

Remove explicit quadrature rule where applicable

parent 134e156b
Branches
Tags
No related merge requests found
......@@ -24,10 +24,7 @@ for p = 1:pmax
lf = LinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*p-2, 1));
lf.f = Constant(mesh, 1);
lf.qrf = QuadratureRule.ofOrder(2*p);
%% set up solver and operator for nested iteration
% choose the iterative solver of choice: multigrid (with the variants
......
......@@ -22,9 +22,9 @@ for p = 1:pmax
blf = BilinearForm();
lf = LinearForm();
% quadrature rules are set automatically based on order of FeSpace
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*p-2, 1));
% ... but can also be set manually if required
lf.neumann = MeshFunction(mesh, @exactSolutionNeumannData);
lf.qrNeumann = QuadratureRule.ofOrder(2*p, '1D');
......
......@@ -26,7 +26,6 @@ for p = 1:pmax
% dual: -\Delta z = "lorentzian peak 2"
blf = BilinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*p-2, 1));
lfF = LinearForm();
lfF.f = MeshFunction(mesh, @(x) lorentzian(x, [0.7;0.7], 1e-1));
......
......@@ -22,21 +22,19 @@ for p = 1:pmax
z = FeFunction(fes);
%% set problem data given in [Mommer, Stevenson; 2009]
% quadrature orders are set automatically based on order of FeSpace
blf = BilinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*p-2, 1));
chiT1 = MeshFunction(mesh, @(x) sum(x, Dim.Vector) < 1/2);
v.setData(nodalInterpolation(chiT1, ncFes));
lfF = LinearForm();
lfF.fvec = CompositeFunction(@(v) [v;zeros(size(v))], v);
lfF.qrfvec = QuadratureRule.ofOrder(max(p-1, 1));
chiT2 = MeshFunction(mesh, @(x) sum(x, Dim.Vector) > 3/2);
w.setData(nodalInterpolation(chiT2, ncFes));
lfG = LinearForm();
lfG.fvec = CompositeFunction(@(w) [-w;zeros(size(w))], w);
lfG.qrfvec = QuadratureRule.ofOrder(max(p-1, 1));
%% set up lifting operators for rhs FEM-data
P = LoMeshProlongation(ncFes);
......
......@@ -116,8 +116,6 @@ function [blf, lf] = setProblemData(mesh, Du, g, linearization)
lf.f = g;
lf.fvec = CompositeFunction(@(p) -mu(vectorProduct(p, p)) .* p, Du);
end
[blf.qra, lf.qrf, lf.qrfvec] = deal(QuadratureRule.ofOrder(1));
end
function updateDataU(u, deltaZ, A, F, linearization)
......
......@@ -113,8 +113,6 @@ function [blf, lf] = setProblemData(mesh, fes, Du, g, linearization, p)
lf.f = g;
lf.fvec = CompositeFunction(@(t) -mu(vectorProduct(t, t),p) .* t, Du);
end
[blf.qra, lf.qrf, lf.qrfvec] = deal(QuadratureRule.ofOrder(1));
end
function updateDataU(u, deltaZ, A, F, linearization)
......
......@@ -28,7 +28,6 @@ function leveldata = runAdditiveSchwarzPreconditioner(pMax)
blf = BilinearForm();
lf = LinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*(p-1), 1));
lf.f = Constant(mesh, 1);
% Choose iterative solver
......
......@@ -24,7 +24,6 @@ function leveldata = runIterativeSolver(maxNiter)
blf = BilinearForm();
lf = LinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*(p-1), 1));
lf.f = Constant(mesh, 1);
% Choose iterative solver
......
......@@ -74,9 +74,7 @@ methods (Access=private)
blf = BilinearForm();
lf = LinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*(p-1), 1));
blf.c = Constant(mesh, 1);
blf.qrc = QuadratureRule.ofOrder(2*p);
lf.f = Constant(mesh, 1);
end
......
......@@ -49,7 +49,6 @@ methods (Test)
fes = FeSpace(mesh, HigherOrderH1Fe(p), 'dirichlet', [], 'neumann', ':');
blf = BilinearForm();
blf.a = Constant(mesh, 1);
blf.qra = QuadratureRule.ofOrder(max(2*(p-1),1));
blf.c = MeshFunction(mesh, @(x) 1+x(1,:,:));
blf.qrc = QuadratureRule.ofOrder(2*p+1);
A = assemble(blf, fes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment