-
Notifications
You must be signed in to change notification settings - Fork 65
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Even it is not required for common PDE solution, having P and Q weights will simplify the computation of integrals with a mimetic approach and will help for theoretical proofs. For example, the computation of mass, momenta, energy, etc., will leverage on these weights.
Describe the solution you'd like
A clear and concise description of what you want to happen.
We should implement 1D, 2D, 3D versions of them in C++, each on its own file.
In addition, MATLab/Octave 2D versions of them have wrong sizes, and the 3D versions of them are missing in MATLAB/Octave.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I have just noticed that the orders of the MATLAB/Octave 2D weightsP and weightsQ matrices have wrong sizes.
This should be also corrected in this issue.
In addition, Order 8 of the algorithm requires a deeper explanation based on a Linear Programming Problem Simplex Algorithm, which will be suggested in a different issue. The following is for orders of accuracy k = 2,4,6.
a) C++ 1D weights P(order k, x-dir cells m, x-dir cell size dx):
G = grad(k, m, dx);
b = [-1; zeros(m, 1); 1];
P = G'\b;
b) C++ 2D weights P(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy)
Use 2D formula of section 8.4, page 26, of the attached document for P_{xy}^{(k)}
c) C++ 3D weights P(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy, z-dir cells o, z-dir cell size dz)
Use 3D formula of section 8.4, page 26, of the attached document for P_{xyz}^{(k)}
d) MATLAB/Octave 2D weights P(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy)
Use 2D formula of section 8.4, page 26, of the attached document for P_{xy}^{(k)}
e) MATLAB/Octave 3D weights P(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy, z-dir cells o, z-dir cell size dz)
Use 3D formula of section 8.4, page 26, of the attached document for P_{xyz}^{(k)}
f) C++ 1D weights Q(order k, x-dir cells m, x-dir cell size dx), (for orders 2,4,6):
D = div(k, m, dx);
b = [-1; zeros(m-1, 1); 1]; % RHS
Q = [1; D(2:end-1, :)'\b; 1];
g) C++ 2D weights Q(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy)
Use 2D formula of section 8.2, page 24, of the attached document for Q_{xy}^{(k)}
h) C++ 3D weights Q(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy, z-dir cells o, z-dir cell size dz)
Use 3D formula of section 8.2, page 24, of the attached document for Q_{xyz}^{(k)}
i) MATLAB/Octave 2D weights Q(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy)
Use 2D formula of section 8.2, page 24, of the attached document for Q_{xy}^{(k)}
j) MATLAB/Octave 3D weights Q(order k, x-dir cells m, x-dir cell size dx, y-dir cells n, y-dir cell size dy, z-dir cells o, z-dir cell size dz)
Use 3D formula of section 8.2, page 24, of the attached document for Q_{xyz}^{(k)}
Additional context
Add any other context or screenshots about the feature request here.