ceed-basis.c (6a6b797f790a7f197cde448212987b3ead5d18fa) ceed-basis.c (690992b2ef7dcef8d00e259f2fa17075fde4c330)
1// Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8#include <ceed-impl.h>

--- 711 unchanged lines hidden (view full) ---

720 CeedCall(CeedMatrixMatrixMultiply(ceed, grad_1d, (const CeedScalar *)interp_1d_pinv, collo_grad_1d, Q_1d, Q_1d, P_1d));
721
722 CeedCall(CeedFree(&interp_1d_pinv));
723 CeedCall(CeedDestroy(&ceed));
724 return CEED_ERROR_SUCCESS;
725}
726
727/**
1// Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8#include <ceed-impl.h>

--- 711 unchanged lines hidden (view full) ---

720 CeedCall(CeedMatrixMatrixMultiply(ceed, grad_1d, (const CeedScalar *)interp_1d_pinv, collo_grad_1d, Q_1d, Q_1d, P_1d));
721
722 CeedCall(CeedFree(&interp_1d_pinv));
723 CeedCall(CeedDestroy(&ceed));
724 return CEED_ERROR_SUCCESS;
725}
726
727/**
728 @brief Get the number of tabs to indent for @ref CeedBasisView() output
729
730 @param[in] basis `CeedBasis` to get the number of view tabs
731 @param[out] num_tabs Number of view tabs
732
733 @return Error code: 0 - success, otherwise - failure
734
735 @ref Backend
736**/
737int CeedBasisGetNumViewTabs(CeedBasis basis, CeedInt *num_tabs) {
738 *num_tabs = basis->num_tabs;
739 return CEED_ERROR_SUCCESS;
740}
741
742/**
743 @brief Return 1D interpolation matrix to Chebyshev polynomial coefficients on quadrature space
744
745 @param[in] basis `CeedBasis`
746 @param[out] chebyshev_interp_1d Row-major (`P_1d * Q_1d`) matrix interpolating from basis nodes to Chebyshev polynomial coefficients
747
748 @return An error code: 0 - success, otherwise - failure
749
750 @ref Backend

--- 1169 unchanged lines hidden (view full) ---

1920**/
1921int CeedBasisSetNumViewTabs(CeedBasis basis, CeedInt num_tabs) {
1922 CeedCheck(num_tabs >= 0, CeedBasisReturnCeed(basis), CEED_ERROR_MINOR, "Number of view tabs must be non-negative");
1923 basis->num_tabs = num_tabs;
1924 return CEED_ERROR_SUCCESS;
1925}
1926
1927/**
728 @brief Return 1D interpolation matrix to Chebyshev polynomial coefficients on quadrature space
729
730 @param[in] basis `CeedBasis`
731 @param[out] chebyshev_interp_1d Row-major (`P_1d * Q_1d`) matrix interpolating from basis nodes to Chebyshev polynomial coefficients
732
733 @return An error code: 0 - success, otherwise - failure
734
735 @ref Backend

--- 1169 unchanged lines hidden (view full) ---

1905**/
1906int CeedBasisSetNumViewTabs(CeedBasis basis, CeedInt num_tabs) {
1907 CeedCheck(num_tabs >= 0, CeedBasisReturnCeed(basis), CEED_ERROR_MINOR, "Number of view tabs must be non-negative");
1908 basis->num_tabs = num_tabs;
1909 return CEED_ERROR_SUCCESS;
1910}
1911
1912/**
1913 @brief Get the number of tabs to indent for @ref CeedBasisView() output
1914
1915 @param[in] basis `CeedBasis` to get the number of view tabs
1916 @param[out] num_tabs Number of view tabs
1917
1918 @return Error code: 0 - success, otherwise - failure
1919
1920 @ref User
1921**/
1922int CeedBasisGetNumViewTabs(CeedBasis basis, CeedInt *num_tabs) {
1923 *num_tabs = basis->num_tabs;
1924 return CEED_ERROR_SUCCESS;
1925}
1926
1927/**
1928 @brief View a `CeedBasis`
1929
1930 @param[in] basis `CeedBasis` to view
1931 @param[in] stream Stream to view to, e.g., `stdout`
1932
1933 @return An error code: 0 - success, otherwise - failure
1934
1935 @ref User

--- 652 unchanged lines hidden ---
1928 @brief View a `CeedBasis`
1929
1930 @param[in] basis `CeedBasis` to view
1931 @param[in] stream Stream to view to, e.g., `stdout`
1932
1933 @return An error code: 0 - success, otherwise - failure
1934
1935 @ref User

--- 652 unchanged lines hidden ---