Delete inputs from MESH structure of subroutine quadrature_from_matlab in mex_utils.f90
Delete inputs from MESH, such as dim, nel, etc. by computing the size of the matrices directly from MATLAB.
subroutine quadrature_from_matlab(quadrature, struct_pr, dim, nel, nel_tract)
class(QUADRATURE_t), intent(inout) :: quadrature
mwPointer, intent(in) :: struct_pr
integer, intent(in) :: dim, nel, nel_tract
integer, intent(in), optional :: nel_flux
call cp_struct_field_integer(struct_pr, "order", quadrature%order)
call cp_struct_field_integer(struct_pr, "num_gauss_pts", quadrature%num_gauss_pts)
call cp_struct_field_matrix_real_alloc(&
struct_pr, "gauss_pts", quadrature%gauss_pts, quadrature%num_gauss_pts, dim)
allocate (quadrature%gauss_W(quadrature%num_gauss_pts))
call cp_struct_field_vector_real(&
struct_pr, "gauss_W", quadrature%gauss_W, quadrature%num_gauss_pts)
allocate (quadrature%dNdxi(dim, nel, quadrature%num_gauss_pts))
call cp_struct_field_array3d_real(&
struct_pr, "dNdxi", quadrature%dNdxi, dim, nel, quadrature%num_gauss_pts)
call cp_struct_field_matrix_real_alloc(&
struct_pr, "Nxi", quadrature%Nxi, nel, quadrature%num_gauss_pts)
quadrature%num_gauss_pts_tract = quadrature%order * (dim - 1)
call cp_struct_field_matrix_real_alloc(&
struct_pr, "gauss_pts_tract", quadrature%gauss_pts_tract, quadrature%num_gauss_pts_tract, dim - 1)
allocate (quadrature%gauss_W_tract(quadrature%num_gauss_pts_tract))
call cp_struct_field_vector_real(&
struct_pr, "gauss_W_tract", quadrature%gauss_W_tract, quadrature%num_gauss_pts_tract)
call cp_struct_field_matrix_real_alloc(&
struct_pr, "dNdxi_tract", quadrature%dNdxi_tract, nel_tract, quadrature%num_gauss_pts_tract)
call cp_struct_field_matrix_real_alloc(&
struct_pr, "Nxi_tract", quadrature%Nxi_tract, nel_tract, quadrature%num_gauss_pts_tract)
end subroutine