ceed-elemrestriction.c (fe7b5540f9ecb4a436837d9adef2b25b1d7c8c03) ceed-elemrestriction.c (b7c9bbdafc9b91976b65f80ebb2c5357c2efd8bc)
1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3// reserved. See files LICENSE and NOTICE for details.
4//
5// This file is part of CEED, a collection of benchmarks, miniapps, software
6// libraries and APIs for efficient high-order finite element and spectral
7// element discretizations for exascale applications. For more information and
8// source code availability see http://github.com/ceed.

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

63
64/// ----------------------------------------------------------------------------
65/// CeedElemRestriction Backend API
66/// ----------------------------------------------------------------------------
67/// @addtogroup CeedElemRestrictionBackend
68/// @{
69
70/**
1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3// reserved. See files LICENSE and NOTICE for details.
4//
5// This file is part of CEED, a collection of benchmarks, miniapps, software
6// libraries and APIs for efficient high-order finite element and spectral
7// element discretizations for exascale applications. For more information and
8// source code availability see http://github.com/ceed.

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

63
64/// ----------------------------------------------------------------------------
65/// CeedElemRestriction Backend API
66/// ----------------------------------------------------------------------------
67/// @addtogroup CeedElemRestrictionBackend
68/// @{
69
70/**
71 @brief Get the Ceed associated with a CeedElemRestriction
72
71
73 @param rstr CeedElemRestriction
74 @param[out] ceed Variable to store Ceed
75
76 @return An error code: 0 - success, otherwise - failure
77
78 @ref Backend
79**/
80int CeedElemRestrictionGetCeed(CeedElemRestriction rstr, Ceed *ceed) {
81 *ceed = rstr->ceed;
82 return CEED_ERROR_SUCCESS;
83}
84
85/**
86
87 @brief Get the strides of a strided CeedElemRestriction
88
89 @param rstr CeedElemRestriction
90 @param[out] strides Variable to store strides array
91
92 @return An error code: 0 - success, otherwise - failure
93
94 @ref Backend

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

734 rstr->num_elem);
735 // LCOV_EXCL_STOP
736 ierr = rstr->ApplyBlock(rstr, block, t_mode, u, ru, request);
737 CeedChk(ierr);
738 return CEED_ERROR_SUCCESS;
739}
740
741/**
72 @brief Get the strides of a strided CeedElemRestriction
73
74 @param rstr CeedElemRestriction
75 @param[out] strides Variable to store strides array
76
77 @return An error code: 0 - success, otherwise - failure
78
79 @ref Backend

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

719 rstr->num_elem);
720 // LCOV_EXCL_STOP
721 ierr = rstr->ApplyBlock(rstr, block, t_mode, u, ru, request);
722 CeedChk(ierr);
723 return CEED_ERROR_SUCCESS;
724}
725
726/**
727 @brief Get the Ceed associated with a CeedElemRestriction
728
729 @param rstr CeedElemRestriction
730 @param[out] ceed Variable to store Ceed
731
732 @return An error code: 0 - success, otherwise - failure
733
734 @ref Advanced
735**/
736int CeedElemRestrictionGetCeed(CeedElemRestriction rstr, Ceed *ceed) {
737 *ceed = rstr->ceed;
738 return CEED_ERROR_SUCCESS;
739}
740
741/**
742 @brief Get the L-vector component stride
743
744 @param rstr CeedElemRestriction
745 @param[out] comp_stride Variable to store component stride
746
747 @return An error code: 0 - success, otherwise - failure
748
742 @brief Get the L-vector component stride
743
744 @param rstr CeedElemRestriction
745 @param[out] comp_stride Variable to store component stride
746
747 @return An error code: 0 - success, otherwise - failure
748
749 @ref Backend
749 @ref Advanced
750**/
751int CeedElemRestrictionGetCompStride(CeedElemRestriction rstr,
752 CeedInt *comp_stride) {
753 *comp_stride = rstr->comp_stride;
754 return CEED_ERROR_SUCCESS;
755}
756
757/**
758 @brief Get the total number of elements in the range of a CeedElemRestriction
759
760 @param rstr CeedElemRestriction
761 @param[out] num_elem Variable to store number of elements
762
763 @return An error code: 0 - success, otherwise - failure
764
750**/
751int CeedElemRestrictionGetCompStride(CeedElemRestriction rstr,
752 CeedInt *comp_stride) {
753 *comp_stride = rstr->comp_stride;
754 return CEED_ERROR_SUCCESS;
755}
756
757/**
758 @brief Get the total number of elements in the range of a CeedElemRestriction
759
760 @param rstr CeedElemRestriction
761 @param[out] num_elem Variable to store number of elements
762
763 @return An error code: 0 - success, otherwise - failure
764
765 @ref Backend
765 @ref Advanced
766**/
767int CeedElemRestrictionGetNumElements(CeedElemRestriction rstr,
768 CeedInt *num_elem) {
769 *num_elem = rstr->num_elem;
770 return CEED_ERROR_SUCCESS;
771}
772
773/**
774 @brief Get the size of elements in the CeedElemRestriction
775
776 @param rstr CeedElemRestriction
777 @param[out] elem_size Variable to store size of elements
778
779 @return An error code: 0 - success, otherwise - failure
780
766**/
767int CeedElemRestrictionGetNumElements(CeedElemRestriction rstr,
768 CeedInt *num_elem) {
769 *num_elem = rstr->num_elem;
770 return CEED_ERROR_SUCCESS;
771}
772
773/**
774 @brief Get the size of elements in the CeedElemRestriction
775
776 @param rstr CeedElemRestriction
777 @param[out] elem_size Variable to store size of elements
778
779 @return An error code: 0 - success, otherwise - failure
780
781 @ref Backend
781 @ref Advanced
782**/
783int CeedElemRestrictionGetElementSize(CeedElemRestriction rstr,
784 CeedInt *elem_size) {
785 *elem_size = rstr->elem_size;
786 return CEED_ERROR_SUCCESS;
787}
788
789/**
790 @brief Get the size of the l-vector for a CeedElemRestriction
791
792 @param rstr CeedElemRestriction
793 @param[out] l_size Variable to store number of nodes
794
795 @return An error code: 0 - success, otherwise - failure
796
782**/
783int CeedElemRestrictionGetElementSize(CeedElemRestriction rstr,
784 CeedInt *elem_size) {
785 *elem_size = rstr->elem_size;
786 return CEED_ERROR_SUCCESS;
787}
788
789/**
790 @brief Get the size of the l-vector for a CeedElemRestriction
791
792 @param rstr CeedElemRestriction
793 @param[out] l_size Variable to store number of nodes
794
795 @return An error code: 0 - success, otherwise - failure
796
797 @ref Backend
797 @ref Advanced
798**/
799int CeedElemRestrictionGetLVectorSize(CeedElemRestriction rstr,
800 CeedInt *l_size) {
801 *l_size = rstr->l_size;
802 return CEED_ERROR_SUCCESS;
803}
804
805/**
806 @brief Get the number of components in the elements of a
807 CeedElemRestriction
808
809 @param rstr CeedElemRestriction
810 @param[out] num_comp Variable to store number of components
811
812 @return An error code: 0 - success, otherwise - failure
813
798**/
799int CeedElemRestrictionGetLVectorSize(CeedElemRestriction rstr,
800 CeedInt *l_size) {
801 *l_size = rstr->l_size;
802 return CEED_ERROR_SUCCESS;
803}
804
805/**
806 @brief Get the number of components in the elements of a
807 CeedElemRestriction
808
809 @param rstr CeedElemRestriction
810 @param[out] num_comp Variable to store number of components
811
812 @return An error code: 0 - success, otherwise - failure
813
814 @ref Backend
814 @ref Advanced
815**/
816int CeedElemRestrictionGetNumComponents(CeedElemRestriction rstr,
817 CeedInt *num_comp) {
818 *num_comp = rstr->num_comp;
819 return CEED_ERROR_SUCCESS;
820}
821
822/**
823 @brief Get the number of blocks in a CeedElemRestriction
824
825 @param rstr CeedElemRestriction
826 @param[out] num_block Variable to store number of blocks
827
828 @return An error code: 0 - success, otherwise - failure
829
815**/
816int CeedElemRestrictionGetNumComponents(CeedElemRestriction rstr,
817 CeedInt *num_comp) {
818 *num_comp = rstr->num_comp;
819 return CEED_ERROR_SUCCESS;
820}
821
822/**
823 @brief Get the number of blocks in a CeedElemRestriction
824
825 @param rstr CeedElemRestriction
826 @param[out] num_block Variable to store number of blocks
827
828 @return An error code: 0 - success, otherwise - failure
829
830 @ref Backend
830 @ref Advanced
831**/
832int CeedElemRestrictionGetNumBlocks(CeedElemRestriction rstr,
833 CeedInt *num_block) {
834 *num_block = rstr->num_blk;
835 return CEED_ERROR_SUCCESS;
836}
837
838/**
839 @brief Get the size of blocks in the CeedElemRestriction
840
841 @param rstr CeedElemRestriction
842 @param[out] blk_size Variable to store size of blocks
843
844 @return An error code: 0 - success, otherwise - failure
845
831**/
832int CeedElemRestrictionGetNumBlocks(CeedElemRestriction rstr,
833 CeedInt *num_block) {
834 *num_block = rstr->num_blk;
835 return CEED_ERROR_SUCCESS;
836}
837
838/**
839 @brief Get the size of blocks in the CeedElemRestriction
840
841 @param rstr CeedElemRestriction
842 @param[out] blk_size Variable to store size of blocks
843
844 @return An error code: 0 - success, otherwise - failure
845
846 @ref Backend
846 @ref Advanced
847**/
848int CeedElemRestrictionGetBlockSize(CeedElemRestriction rstr,
849 CeedInt *blk_size) {
850 *blk_size = rstr->blk_size;
851 return CEED_ERROR_SUCCESS;
852}
853
854/**

--- 82 unchanged lines hidden ---
847**/
848int CeedElemRestrictionGetBlockSize(CeedElemRestriction rstr,
849 CeedInt *blk_size) {
850 *blk_size = rstr->blk_size;
851 return CEED_ERROR_SUCCESS;
852}
853
854/**

--- 82 unchanged lines hidden ---