⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rcm.h

📁 OpenFVM-v1.1 open source cfd code
💻 H
📖 第 1 页 / 共 2 页
字号:
     *               @c #RCM_NO_SORT,     *               @c #RCM_INSERTION_SORT,     *               @c #RCM_NO_REVERSE and     *               @c #RCM_USE_MASK.     *      * @param[in] xadj     *               Pointers (indices) into  @a adj.  @a xadj[@a p]     *               points  to  the     *               start  of  the  adjacency  list for @a p.     *               @a xadj[<i>p</i>+1]-1 points to the last element in     *               the adjacency list for @a p.     *               If the graph has <i>n</i> nodes, then     *               @a xadj has to have <i>n</i>+1 entries.     *     * @param[in] adj     *               The adjacency lists. The lists are stored  in  strictly     *               increasing order without gaps.     *               An entry in @a xadj is the index of the first     *               entry in the associated adjacency list stored in @a adj.     *               Hence the     *               elements adjacent to node @a p are stored in @a adj in     *               the block     *               pointed to by @a xadj[@a p] (low-end, included)     *               and @a xadj[<i>p</i>+1]     *               (high-end, excluded).     *     * @param[in,out] mask     *               The  nodes  numbered by RCM will have their     *               @a mask values     *               set to @c -1.  The  @a mask  array  is  used  to     *               mark  nodes     *               already  consumed  by RCM. On output all nodes are     *               consumed, i.e., all entries have been set to @c -1.     *           @n     *               If the flag @c #RCM_USE_MASK is set, a slightly     *               different algorithm is used. In this case a     *               @a mask[@a p] value strictly greater than zero is used     *               to indicate that the node @a p is not to be considered     *               part  of  the  graph.     *           @n     *               Notice that the algorithm is slightly slower, if     *               the @c #RCM_USE_MASK flag is set.     *     * @param[out] perm     *               is  used to store the reverse Cuthill-McKee ordering of     *               the nodes in the graph.     *     * @param[out] deg     *               Storage used for the degrees of the nodes in the graph.     *               On output @a deg[@a p] will contain the degree of     *               node @a p.     */  extern    void RCM_FUNC (genrcmi) (const int n, const int flags,			     const int *xadj, const int *adj,			     int *perm, signed char *mask, int *deg);    /**     * @brief Version of @c genrcmi() for @c long data.     */  extern    void RCM_FUNC (genrcml) (const long n, const int flags,			     const long *xadj, const long *adj,			     long *perm, signed char *mask, long *deg);    /**     * @brief Find a pseudo-peripheral node for the subgraph specified     * by @a root.     *      * Find a pseudo-peripheral node for the subgraph specified     * by @a root.     *      * @param[in] flags     *               are used to select variations of  the  way  RCM  works.     *               Use  @c 0 if no flag should be set. Otherwise use the     *               bitwise OR of one or more @c RCM_* flags. @c fnrooti()     *               supports the @c #RCM_FORTRAN_INDICES flag.     *     * @param[in] xadj     *               Pointers to the adjacency lists in @a adj.     *               See the @a xadj parameter of @c genrcmi()     *               for more details.     *     * @param[in] adj     *               The adjacency lists.     *               See the @a adj parameter of @c genrcmi()     *               for more details.     *     * @param[in] deg     *               The degrees of the nodes in the graph.     *     * @param[in,out] root     *               On input the starting node for the search and     *               representant     *               of the connected component in which we look for a     *               pseudo-peripheral node.   On  onput,  it  is  the  node     *               found.     *      * @param[in] mask     *               Used  to  keep track of found nodes in the traversal of     *               the graph component.  Nodes marked by having a non-zero     *               mask  value  on input are considered to be removed from     *               the graph.  Although mask is modified during  the     *               running  of  fnroot,  on output the values in mask will     *               be  the same as on input.     * @param[out] ccsize     *               The size of the component rooted by root.     * @parma ls     *               Temporary storage used internally.     *     * @see     * N.&nbsp;E. Gibbs, W.&nbsp;G. Poole, and P.&nbsp;K. Stockemeyer.     * <b>An algorithm for reducing the bandwidth and     * profile of a sparse matrix</b>.     * <em>SIAM Journal of Numerical Analysis</em>, 13(2):236-250, April 1976.     *     * @see     * Alan George and Joseph W.&nbsp;H. Liu.     * <b><a href="http://doi.acm.org/10.1145/355841.355845"     * style="color:black;">An     * implementation of a pseudoperipheral node finder</a></b>.     * <em>ACM Trans. Math. Softw.</em>, 5(3):284-295, 1979.     */  extern    void RCM_FUNC (fnrooti) (int *root, const int flags,			     const int *xadj, const int *adj,			     const int *deg,			     int *ccsize, signed char *mask, int *ls);    /**     * @brief Version of @c fnrooti() for @c long data.     */  extern    void RCM_FUNC (fnrootl) (long *root, const int flags,			     const long *xadj, const long *adj,			     const long *deg,			     long *ccsize, signed char *mask, long *ls);    /**     * @brief Find a reverse Cuthill-McKee ordering of the     * connected component specified by @a root.     *     * Find a reverse Cuthill-McKee ordering of the     * connected component specified by @a root.     * The numbering process is to be started at the node @a root.     *      * @param[in] root     *               is  the  root  node  of the connected component and the     *               starting node of the RCM ordering.     *     * @param[in] flags     *               changes the way the function works.     *               Use the value @c 0 to not set any flag.     *               Multiple flags can be combined by using binary OR.     *               The following flags are supported:     *               @c #RCM_FORTRAN_INDICES,     *               @c #RCM_NO_REVERSE,     *               @c #RCM_NO_SORT,     *               @c #RCM_INSERTION_SORT     *               and     *               @c #RCM_USE_MASK.     *               Other @c RCM_* flags are silently ignored.     *      * @param[in] xadj     *               Pointers to the adjacency lists in @a adj.     *               See the @a xadj parameter of @c genrcmi()     *               for more details.     *     * @param[in] adj     *               The adjacency lists.     *               See the @a adj parameter of @c genrcmi()     *               for more details.     *     * @param[in] deg     *               An array of the node degrees.   The  array  has  to  be     *               filled  by the caller, @a deg[@a p] is used for the     *               degree     *               of node @a p. No further checking is done.     *      * @param[in,out] mask     *               The nodes numbered by RCM will have their     *               @a mask values     *               set to @c -1.  The mask array is used to mark nodes     *               in the component already consumed by RCM.     *               Therefore  on  function  entry @a mask[@a p]  must     *               be @c 0 for all nodes @a p in the     *               same component as @a root. It is the responsibility     *               of the caller to ensure this.     *           @n     *               If the flag @c #RCM_USE_MASK is set, a slightly     *               different algorithm is used. In this case a     *               @a mask[@a p] value strictly greater than zero is used     *               to indicate that the node @a p is not to be considered     *               part  of  the  graph.     *           @n     *               Notice  that the degree of a node changes when a     *               part of the  graph  is  masked  out.   As  the  degrees     *               (stored  in @a deg) are supplied by the caller,     *               the caller     *               is responsible for setting  the  entries  of  @a deg     *               correctly.     *      * @param[out] perm     *               is  used to store the reverse Cuthill-McKee ordering of     *               the nodes in the component rooted by  @a root. Only the     *               first @a ccsize entries of @a perm are overwritten.     *      * @param[out] ccsize     *               The size of the component found.     */  extern    void RCM_FUNC (rcmi) (const int root, const int flags,			  const int *xadj, const int *adj,			  const int *deg,			  signed char *mask, int *perm, int *ccsize);    /**     * @brief Version of @c rcmi() for @c long data.     */  extern    void RCM_FUNC (rcml) (const long root, const int flags,			  const long *xadj, const long *adj,			  const long *deg,			  signed char *mask, long *perm, long *ccsize);#ifdef __cplusplus}#endif#endif				/* RCM__H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -