<commit_before>#ifndef UM_H_
#define UM_H_

// data type and functions for unstructured mesh
//STARTUM
typedef struct {
    int      N,     // number of nodes
             K,     // number of elements
             P;     // number of boundary segments
    Vec      x,     // x-coordinate of node; length N
             y;     // y-coordinate of node; length N
    IS       e,     // element triples; length 3K
                    //     values e[3*k+0],e[3*k+1],e[3*k+2]
                    //     are indices into node-based Vecs
             bfn,   // flag for boundary node; length N
                    //     if abfn[i] > 0 then node i is on boundary
                    //     if abfn[i] == 2 then node i is on Dirichlet bdry
             s,     // boundary segment pairs; length 2P
                    //     values s[2*p+0],s[2*p+1]
                    //     are indices into node-based Vecs
             bfs;   // flag for boundary segment; length P
                    //     if abfs[i] == 1 then segment i is on Neumann bdry
                    //     if abfs[i] == 2 then segment i is on Dirichlet bdry
} UM;
//ENDUM

PetscErrorCode UMInitialize(UM *mesh);
PetscErrorCode UMDestroy(UM *mesh);

// view node coordinates, element triples, boundary flags to STDOUT
PetscErrorCode UMView(UM *mesh, PetscViewer viewer);

// read node coordinates from file and create all nodal-based Vecs
PetscErrorCode UMReadVecs(UM *mesh, char *rootname);

// read element index triples, boundary segments, and boundary node/segment flags,
// each created as an IS, from file; call UMReadNodes() first
PetscErrorCode UMReadISs(UM *mesh, char *rootname);
#endif
<commit_msg>clean up comments documenting UM<commit_after>#ifndef UM_H_
#define UM_H_

// data type and functions for unstructured mesh
//STARTUM
typedef struct {
    int      N,     // number of nodes
             K,     // number of elements
             P;     // number of boundary segments
    Vec      x,     // x-coordinate of node; length N
             y;     // y-coordinate of node; length N
    IS       e,     // element triples; length 3K
                    //     values e[3*k+0],e[3*k+1],e[3*k+2]
                    //     are indices into node-based Vecs
             bfn,   // flag for boundary node; length N
                    //     if abfn[i] > 0 then node i is on boundary
                    //     if abfn[i] == 2 then node i is on Dirichlet bdry
             s,     // boundary segment pairs; length 2P
                    //     values s[2*p+0],s[2*p+1]
                    //     are indices into node-based Vecs
             bfs;   // flag for boundary segment; length P
                    //     if abfs[p] == 1 then segment p is on Neumann bdry
                    //     if abfs[p] == 2 then segment p is on Dirichlet bdry
} UM;
//ENDUM

PetscErrorCode UMInitialize(UM *mesh);
PetscErrorCode UMDestroy(UM *mesh);

// view node coordinates, element triples, boundary segments, and boundary node/segment flags
PetscErrorCode UMView(UM *mesh, PetscViewer viewer);

// read node coordinates from file
// create as Vecs
PetscErrorCode UMReadVecs(UM *mesh, char *rootname);

// read element triples, boundary segments, and boundary node/segment flags
// each created as an IS
// call UMReadNodes() first
PetscErrorCode UMReadISs(UM *mesh, char *rootname);
#endif

{'fraction_non_alphanumeric': 0.09023005676725426, 'fraction_numerical': 0.009560800717060053, 'mean_word_length': 1.771523178807947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4244116', 'n_tokens_mistral': 1013, 'n_tokens_neox': 947, 'n_words': 367}