|
openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
|
Namespaces | |
| detail | |
Classes | |
| class | dmat |
| Dense matrix class. More... | |
| struct | abstract_linear_solver |
| class | abstract_matrix |
| class | abstract_vector |
| class | scattering |
| Container for a PETSc VecScatter. More... | |
| class | scatter_registry |
| The scatterer registry class. More... | |
| struct | Point |
| Point and vector struct. More... | |
| class | overlapping_layout |
| The overlapping_layout class contains the algorithms related to managing overlapping parallel index sets, such as the indexing of the nodes, faces or edges of a distributed mesh. More... | |
| class | non_overlapping_layout |
| The parallel layout of non overlapping indices. More... | |
| class | index_mapping |
| Index mapping class. This is a bijective mapping. More... | |
| class | meshdata |
| The mesh storage class. It contains both element and vertex data. More... | |
| class | commgraph |
| The class holds the communication graph for a MPI_Exchange() call. More... | |
| struct | tuple |
| struct | mixed_tuple |
| struct | triple |
| struct | mixed_triple |
| struct | quadruple |
| class | element_view |
| Comfort class. Provides getter functions to access the mesh member variables more comfortably. More... | |
| class | matrix_integrator |
| Abstract matrix integration base class. More... | |
| class | vector_integrator |
| Abstract vector integration base class. More... | |
| class | sparse_multiply_transpose |
| Functor for the sparse matrix multiply-transpose operation. More... | |
| class | numbering |
| The abstract numbering class. More... | |
| class | submesh_numbering |
| Functor class applying a submesh renumbering. More... | |
| class | petsc_numbering |
| Functor class generating a numbering optimized for PETSc. More... | |
| class | parallel_layout |
| The base class for parallel layouts. More... | |
| class | abstract_partitioner |
| Abstract base class for a mesh partitioner. More... | |
| class | kdtree_partitioner |
| class | vector |
| A vector storing arbitrary data. More... | |
Enumerations | |
| enum | elem_t { Tetra = 0 , Hexa , Octa , Pyramid , Prism , Quad , Tri , Line } |
| element type enum More... | |
| enum | SF_nbr { NBR_REF , NBR_SUBMESH , NBR_PETSC , NBR_ELEM_REF , NBR_ELEM_SUBMESH } |
| Enumeration encoding the different supported numberings. More... | |
Functions | |
| template<class S > | |
| dmat< S > | operator* (const dmat< S > &a, const dmat< S > &b) |
| template<class S > | |
| S * | operator* (const dmat< S > &a, const S *v) |
| template<class S > | |
| dmat< S > | operator* (const dmat< S > &a, const S v) |
| template<class S > | |
| dmat< S > | operator* (const S v, const dmat< S > &a) |
| template<class S > | |
| dmat< S > | operator/ (const dmat< S > &a, const S v) |
| template<class S > | |
| dmat< S > | operator+ (const dmat< S > &a, const dmat< S > &b) |
| template<class S > | |
| dmat< S > | operator- (const dmat< S > &a, const dmat< S > &b) |
| template<class S > | |
| dmat< S > | transpose (const dmat< S > &a) |
| template<class S > | |
| double | double_cont (const dmat< S > &A, const dmat< S > &B) |
| mat-mat double contraction A:B More... | |
| template<class S > | |
| void | invert_3x3 (S *ele, S &det) |
| template<class S > | |
| void | invert_3x3 (dmat< S > &m, S &det) |
| template<class S > | |
| dmat< S > | invert_3x3 (const dmat< S > &m) |
| template<class S > | |
| S | det_3x3 (const dmat< S > &m) |
| template<class S > | |
| dmat< S > | invert_2x2 (const dmat< S > &m) |
| template<class S > | |
| void | invert_2x2 (S *ele, S &det) |
| template<class S > | |
| void | invert_2x2 (dmat< S > &m, S &det) |
| template<class S , class V > | |
| void | array_to_tensors (const vector< S > &arr, vector< dmat< V > > &m) |
| template<class S , class V > | |
| void | tensors_to_array (const vector< dmat< S > > &m, vector< V > &arr) |
| template<class T , class S > | |
| bool | is_init (const abstract_vector< T, S > *v) |
| template<typename V , typename W > | |
| V | clamp (const V val, const W start, const W end) |
| Clamp a value into an interval [start, end]. More... | |
| template<class V > | |
| Point | arr_to_point (V *arr) |
| template<class V > | |
| void | point_to_arr (Point &p, V *arr) |
| Point | cross (const Point &a, const Point &b) |
| cross product More... | |
| double | inner_prod (const Point &a, const Point &b) |
| void | outer_prod (const Point &a, const Point &b, const double s, double *buff, const bool add=false) |
| void | outer_prod (const Point &a, const Point &b, double *buff) |
| double | mag (const Point &vect) |
| vector magnitude More... | |
| Point | normalize (const Point &vect) |
| Point | operator- (const Point &a, const Point &b) |
| Point | operator+ (const Point &a, const Point &b) |
| Point | operator* (const Point &a, const double &s) |
| Point | project (const Point &a, const Point &b) |
| project b onto a More... | |
| Point | orthogonalize (const Point &a, const Point &b) |
| double | distance (const Point &a, const Point &b) |
| elem_t | getElemTypeID (char *eletype) |
| Generate element type enum from string. More... | |
| template<class S , class POINT > | |
| void | array_to_points (const vector< S > &arr, vector< POINT > &pts) |
| template<class T , class S > | |
| void | nodal_connectivity_graph (const meshdata< T, S > &mesh, vector< T > &n2n_cnt, vector< T > &n2n_con) |
| Compute the node-to-node connectivity. More... | |
| template<class T , class S > | |
| int | max_nodal_edgecount (const meshdata< T, S > &mesh) |
| Compute the maximum number of node-to-node edges for a mesh. More... | |
| template<class T , class S > | |
| void | get_alg_mask (const meshdata< T, S > &mesh, vector< bool > &alg_mask) |
| template<class T > | |
| bool | operator< (const struct tuple< T > &lhs, const struct tuple< T > &rhs) |
| template<class T , class S > | |
| bool | operator< (const struct mixed_tuple< T, S > &lhs, const struct mixed_tuple< T, S > &rhs) |
| template<class T > | |
| bool | operator< (const struct triple< T > &lhs, const struct triple< T > &rhs) |
| template<class T > | |
| bool | operator< (const struct quadruple< T > &lhs, const struct quadruple< T > &rhs) |
| short | num_dof (elem_t type, short order) |
| Get number of d.o.f. for an element type and an Ansatz function order. More... | |
| void | general_integration_points (const elem_t type, const short order, Point *ip, double *w, int &nint) |
| Compute the integration point locations and weights. More... | |
| void | reference_shape (const elem_t type, const Point ip, dmat< double > &rshape) |
| Compute shape function and its derivatives on a reference element. More... | |
| void | jacobian_matrix (const dmat< double > &rshape, const int npts, const Point *pts, double *J) |
| Compute Jacobian matrix from the real element to the reference element. More... | |
| void | invert_jacobian_matrix (const elem_t type, double *J, double &detJ) |
| void | shape_deriv (const double *iJ, const dmat< double > &rshape, const int ndof, dmat< double > &shape) |
| Compute shape derivatives for an element, based on the shape derivatives of the associated reference element. More... | |
| template<typename T , typename V > | |
| void | canonic_indices (const T *nidx, const T *nbr, const T esize, const short dpn, V *cidx) |
| Compute canonical indices from nodal indices and dpn. More... | |
| template<class T , class S > | |
| void | assemble_matrix (abstract_matrix< T, S > &mat, meshdata< mesh_int_t, mesh_real_t > &domain, matrix_integrator< mesh_int_t, mesh_real_t > &integrator) |
| Generalized matrix assembly. More... | |
| template<class T , class S > | |
| void | assemble_lumped_matrix (abstract_matrix< T, S > &mat, meshdata< mesh_int_t, mesh_real_t > &domain, matrix_integrator< mesh_int_t, mesh_real_t > &integrator) |
| template<class T , class S > | |
| void | assemble_vector (abstract_vector< T, S > &vec, meshdata< mesh_int_t, mesh_real_t > &domain, vector_integrator< mesh_int_t, mesh_real_t > &integrator) |
| Generalized vector assembly. More... | |
| template<class T , class S > | |
| void | extract_element_data (const element_view< mesh_int_t, mesh_real_t > &view, abstract_vector< T, S > &vec, SF_real *buffer) |
| template<class T , class S > | |
| void | set_element_data (const element_view< mesh_int_t, mesh_real_t > &view, SF_real *buffer, abstract_vector< T, S > &vec) |
| template<class T , class S > | |
| void | get_transformed_pts (const element_view< T, S > &view, Point *loc_pts, Point &trsf_fibre) |
| template<typename T > | |
| T | byte_swap (T in) |
| swap the bytes of int, float, doubles, etc.. More... | |
| bool | fileExists (std::string filename) |
| Function which checks if a given file exists. More... | |
| size_t | file_size (FILE *fd) |
| return file size from a file descriptor More... | |
| void | treat_file_open_error (const char *file, const char *caller, const int errnum, const bool do_exit, int rank) |
| treat a file open error by displaying the errnum string interpretation and the caller More... | |
| template<class T > | |
| void | multiply_connectivities (const vector< T > &a_cnt, const vector< T > &a_con, const vector< T > &b_cnt, const vector< T > &b_con, vector< T > &c_cnt, vector< T > &c_con) |
| template<class T > | |
| void | transpose_connectivity (const vector< T > &a_cnt, const vector< T > &a_con, vector< T > &b_cnt, vector< T > &b_con) |
| Transpose CRS matrix graph A into B. More... | |
| size_t | read_num_pts (std::string basename) |
| Function returns the number of points in a CARP points file. More... | |
| void | read_headers (FILE *ele_fd, FILE *fib_fd, bool read_binary, size_t &numelem, bool &twoFib) |
| Read the header from the element and fiber files. More... | |
| void | write_elem_headers (FILE *&ele_fd, FILE *&fib_fd, bool binary, size_t numelem, bool twoFib) |
| Write the header of the element and fiber files. More... | |
| void | write_pts_header (FILE *&pts_fd, bool binary, size_t numpts) |
| Write the header of the points file. More... | |
| template<class T , class S > | |
| void | read_elem_block (FILE *&fd, bool read_binary, size_t bstart, size_t bsize, meshdata< T, S > &mesh) |
| Read a block of size bsize from an CARP element file. More... | |
| template<class T , class S > | |
| void | write_elem_block (FILE *fd, bool write_binary, const meshdata< T, S > &mesh) |
| Write the local element block to a file. More... | |
| template<class T , class S > | |
| void | read_fib_block (FILE *&fd, bool read_binary, bool twoFib, size_t bsize, meshdata< T, S > &mesh) |
| Read a chunk of fibers from a file descriptor. More... | |
| template<class T , class S > | |
| void | write_fib_block (FILE *&fd, bool write_binary, const meshdata< T, S > &mesh) |
| Write the local chunk of fibers to a file. More... | |
| template<class T , class S > | |
| void | read_elements (meshdata< T, S > &mesh, std::string basename) |
| Read the element data (elements and fibers) of a CARP mesh. More... | |
| template<class T , class S > | |
| void | write_elements (const meshdata< T, S > &mesh, bool binary, std::string basename) |
| Write the element data (elements and fibers) of a CARP mesh. More... | |
| template<class T , class S > | |
| void | write_surface (const meshdata< T, S > &surfmesh, std::string surffile) |
| template<class S > | |
| void | read_pts_block (FILE *&fd, bool read_binary, size_t bsize, vector< S > &xyz) |
| Read a chunk of points from a file descriptor. More... | |
| template<class S > | |
| void | write_pts_block (FILE *&fd, bool write_binary, const vector< S > &xyz) |
| Write a chunk of points to a file. More... | |
| template<class T , class S > | |
| void | read_points (const std::string basename, const MPI_Comm comm, vector< S > &pts, vector< T > &ptsidx) |
| Read the points and insert them into a list of meshes. More... | |
| template<class T , class S > | |
| void | insert_points (const vector< S > &pts, const vector< T > &ptsidx, std::list< meshdata< T, S > * > &meshlist) |
| Insert the points from the read-in buffers into a list of distributed meshes. More... | |
| template<class T , class S > | |
| void | writeVTKmesh_binary (const meshdata< T, S > &mesh, std::string file) |
| Write a mesh in binary vtk format. More... | |
| template<class T , class S > | |
| void | permute_mesh (const meshdata< T, S > &inmesh, meshdata< T, S > &outmesh, const vector< T > &perm) |
| Permute the element data of a mesh based on a given permutation. More... | |
| template<class T , class S > | |
| void | redistribute_elements (meshdata< T, S > &mesh, meshdata< T, S > &sendbuff, vector< T > &part) |
| Redistribute the element data of a parallel mesh among the ranks based on a partitioning. More... | |
| template<class T , class S > | |
| void | redistribute_elements (meshdata< T, S > &mesh, vector< T > &part) |
| Redistribute the element data of a parallel mesh among the ranks based on a partitioning. More... | |
| template<class T , class S > | |
| void | redistribute_mesh (meshdata< T, S > &mesh, vector< T > &part) |
| Redistribute both element and vertex data of a mesh. More... | |
| template<class T , class S > | |
| void | write_mesh_parallel (const meshdata< T, S > &mesh, bool binary, std::string basename) |
| Write a parallel mesh to harddisk without gathering it on one rank. More... | |
| template<class T , class S > | |
| void | gather_mesh (const meshdata< T, S > &locmesh, meshdata< T, S > &globmesh) |
| Gather a mesh on rank 0. More... | |
| template<class T , class S > | |
| void | print_DD_info (const meshdata< T, S > &mesh) |
| Print some basic information on the domain decomposition of a mesh. More... | |
| template<class T , class S > | |
| void | extract_mesh (const vector< bool > &keep, const meshdata< T, S > &mesh, meshdata< T, S > &submesh) |
| Extract a submesh from a given mesh. More... | |
| template<class T , class S > | |
| void | rebalance_mesh (meshdata< T, S > &mesh) |
| Rebalance the parallel distribution of a mesh, if a local size is 0. More... | |
| template<class T , class S > | |
| void | extract_myocardium (const meshdata< T, S > &mesh, meshdata< T, S > &submesh) |
| Extract the myocardium submesh. More... | |
| template<class T , class S > | |
| void | extract_tagbased (const meshdata< T, S > &mesh, meshdata< T, S > &submesh) |
| Extract a submesh based on element tags. More... | |
| template<class T , class S > | |
| void | print_mesh_graph (meshdata< T, S > &mesh) |
| One-by-one each process prints the graph of a given mesh. More... | |
| template<class T , class S > | |
| void | inter_domain_mapping (const meshdata< T, S > &mesh_a, const meshdata< T, S > &mesh_b, const SF_nbr snbr, index_mapping< T > &a_to_b) |
| Submesh index mapping between different domains/meshes. More... | |
| template<class T > | |
| void | insert_surf_tri (T n1, T n2, T n3, size_t eidx, triple< T > &surf, tri_sele< T > &sele, hashmap::unordered_map< triple< T >, tri_sele< T > > &surfmap) |
| template<class T > | |
| void | insert_surf_quad (T n1, T n2, T n3, T n4, size_t eidx, vector< T > &buff, quadruple< T > &surf, quad_sele< T > &sele, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &surfmap) |
| template<class T > | |
| void | insert_surf_tet (const T *nod, const size_t eidx, hashmap::unordered_map< triple< T >, tri_sele< T > > &surfmap) |
| template<class T > | |
| void | insert_surf_pyr (const T *nod, const size_t eidx, vector< T > &buff, hashmap::unordered_map< triple< T >, tri_sele< T > > &surfmap, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &qsurfmap) |
| template<class T > | |
| void | insert_surf_pri (const T *nod, const size_t eidx, vector< T > &buff, hashmap::unordered_map< triple< T >, tri_sele< T > > &surfmap, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &qsurfmap) |
| template<class T > | |
| void | insert_surf_hex (const T *nod, const size_t eidx, vector< T > &buff, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &surfmap) |
| template<class T , class S > | |
| void | search_for_surface (const meshdata< T, S > &mesh, const SF_nbr numbering, const hashmap::unordered_map< triple< T >, tri_sele< T > > &search_tri, const hashmap::unordered_map< quadruple< T >, quad_sele< T > > &search_quad, hashmap::unordered_map< triple< T >, tri_sele< T > > &found_tri, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &found_quad) |
| template<class T , class S > | |
| void | compute_surface (const meshdata< T, S > &mesh, const SF_nbr numbering, const hashmap::unordered_set< T > &tags, hashmap::unordered_map< triple< T >, tri_sele< T > > &tri_surf, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &quad_surf) |
| template<class T , class S > | |
| void | compute_surface (const meshdata< T, S > &mesh, const SF_nbr numbering, hashmap::unordered_map< triple< T >, tri_sele< T > > &tri_surf, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &quad_surf) |
| template<class V > | |
| void | get_hashmap_duplicates (const vector< V > &data, const MPI_Comm comm, vector< bool > &is_dup) |
| template<class K , class V > | |
| void | remove_duplicates (hashmap::unordered_map< K, V > &map, const MPI_Comm comm) |
| remove parallel duplicates from a hashmap::unordered_map More... | |
| template<class K > | |
| void | remove_duplicates (hashmap::unordered_set< K > &set, const MPI_Comm comm) |
| remove parallel duplicates from a hashmap::unordered_set More... | |
| template<class T > | |
| void | remove_parallel_duplicates (hashmap::unordered_map< triple< T >, tri_sele< T >> &tri_surf, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &quad_surf, MPI_Comm comm) |
| template<class T , class S > | |
| void | convert_surface_mesh (hashmap::unordered_map< triple< T >, tri_sele< T >> &tri_surf, hashmap::unordered_map< quadruple< T >, quad_sele< T > > &quad_surf, meshdata< T, S > &surfmesh, vector< T > &elem_orig) |
| template<class T , class S > | |
| void | convert_mesh_surface (const meshdata< T, S > &surfmesh, hashmap::unordered_map< triple< T >, tri_sele< T >> &tri_surf, hashmap::unordered_map< quadruple< T >, quad_sele< T >> &quad_surf) |
| template<class T , class S > | |
| void | compute_surface_mesh (const meshdata< T, S > &mesh, const SF_nbr numbering, const hashmap::unordered_set< T > &tags, meshdata< T, S > &surfmesh) |
| Compute the surface of a given mesh. More... | |
| template<class T , class S > | |
| void | compute_surface_mesh (const meshdata< T, S > &mesh, const SF_nbr numbering, meshdata< T, S > &surfmesh) |
| Compute the surface of a given mesh. More... | |
| template<class T , class S > | |
| void | read_surface_mesh (const meshdata< T, S > &mesh, meshdata< T, S > &surface, std::string filename) |
| template<class T > | |
| void | restrict_to_set (vector< T > &v, const hashmap::unordered_set< T > &set) |
| template<class T > | |
| void | restrict_to_set (vector< T > &v, const vector< T > &vset) |
| template<class T , class S > | |
| void | MPI_Exchange (commgraph< T > &grph, vector< S > &send, vector< S > &recv, MPI_Comm comm) |
| Exchange data in parallel over MPI. More... | |
| template<class T > | |
| T | parallel_fallback_value (const vector< T > &vec, MPI_Comm comm) |
| Get a fallback value for operations on parallel vectors if the local vector is of 0 size. More... | |
| template<class T > | |
| T | global_min (const vector< T > &vec, MPI_Comm comm) |
| Compute the global minimum of a distributed vector. More... | |
| template<class T > | |
| T | global_max (const vector< T > &vec, MPI_Comm comm) |
| Compute the global maximum of a distributed vector. More... | |
| template<class T > | |
| T | global_max (const T val, MPI_Comm comm) |
| Compute the global maximum of a distributed vector. More... | |
| template<class T > | |
| void | layout_from_count (const T count, vector< T > &layout, MPI_Comm comm) |
| template<class T > | |
| T | index_in_layout (const T idx, const vector< T > &layout) |
| template<class T > | |
| void | make_global (const vector< T > &vec, vector< T > &out, MPI_Comm comm) |
| make a parallel vector global More... | |
| template<class T > | |
| void | make_global (vector< T > &vec, MPI_Comm comm) |
| template<class T > | |
| void | reindex_cuthill_mckee (const vector< T > &n2n_cnt, const vector< T > &n2n_dsp, const vector< T > &n2n_con, const bool reverse, hashmap::unordered_map< T, T > &old2new) |
| template<class T > | |
| void | parallel_distribution (const vector< T > >arget, const vector< T > &cnt, const vector< T > &dsp, const vector< T > &ranks, const int myrank, vector< T > &owner, vector< T > &counts) |
| The distribution distributes entities between all ranks. More... | |
| template<class T > | |
| void | refine_distribution (const vector< T > >arget, const vector< T > &cnt, const vector< T > &dsp, const vector< T > &ranks, const int myrank, vector< T > &owner, vector< T > &counts) |
| Further refine a distribution generated by parallel_distribution(). More... | |
| template<class T > | |
| void | parallel_distribution_minrank (const vector< T > >arget, const vector< T > &cnt, const vector< T > &dsp, const vector< T > &ranks, vector< T > &owner, vector< T > &counts) |
| template<class T , class S > | |
| T | local_nodal_to_local_petsc (const meshdata< T, S > &mesh, int rank, T local_nodal) |
| template<class T , class S > | |
| T | local_petsc_to_local_nodal (const meshdata< T, S > &mesh, int rank, T local_petsc) |
| template<class T , class S > | |
| void | local_petsc_to_nodal_mapping (const meshdata< T, S > &mesh, index_mapping< T > &petsc_to_nodal) |
| template<class T > | |
| void | sort_parallel (MPI_Comm comm, const vector< T > &idx, vector< T > &out_idx) |
| Sort index values parallel ascending across the ranks. More... | |
| template<class T , class V > | |
| void | sort_parallel (MPI_Comm comm, const vector< T > &idx, const vector< V > &val, vector< T > &out_idx, vector< V > &out_val) |
| Sort index-value tuples parallel ascending across the ranks. More... | |
| template<class T , class V > | |
| void | sort_parallel (MPI_Comm comm, const vector< T > &idx, const vector< T > &cnt, const vector< V > &val, vector< T > &out_idx, vector< T > &out_cnt, vector< V > &out_val) |
| template<class V > | |
| size_t | root_write (FILE *fd, const vector< V > &vec, MPI_Comm comm) |
| Write vector data binary to disk. More... | |
| template<class V > | |
| size_t | root_write (FILE *fd, V *vec, const size_t vec_size, MPI_Comm comm) |
| root_write wrapper that takes array pointers instead of vectors. More... | |
| template<class V > | |
| size_t | root_read (FILE *fd, vector< V > &vec, MPI_Comm comm) |
| Read binary data into a vector. More... | |
| template<class V > | |
| size_t | root_read_ascii (FILE *fd, vector< V > &vec, MPI_Comm comm, bool int_data) |
| Read binary data into a vector. More... | |
| size_t | root_count_ascii_lines (std::string file, MPI_Comm comm) |
| count the lines in a ascii file More... | |
| template<class V > | |
| size_t | root_read (FILE *fd, V *vec, const size_t vec_size, MPI_Comm comm) |
| root_read wrapper that takes array pointers instead of vectors. More... | |
| template<class V > | |
| size_t | root_read_ascii (FILE *fd, V *vec, const size_t vec_size, MPI_Comm comm, bool int_type) |
| root_read_ascii wrapper that takes array pointers instead of vectors. More... | |
| template<class T , class V > | |
| size_t | root_write_ordered (FILE *fd, const vector< T > &idx, const vector< V > &vec, MPI_Comm comm) |
| Write index value pairs to disk in ordered permutation. More... | |
| template<class T , class V > | |
| size_t | root_write_ordered (FILE *fd, const vector< T > &idx, const vector< T > &cnt, const vector< V > &vec, MPI_Comm comm) |
| Write index value pairs to disk in ordered permutation. More... | |
| template<class T , class V > | |
| size_t | root_write_ordered (FILE *fd, T *idx, V *vec, const size_t vec_size, MPI_Comm comm) |
| root_write_ordered wrapper that takes array pointers instead of vectors. More... | |
| template<class T , class V > | |
| size_t | root_write_ordered (FILE *fd, T *idx, T *cnt, V *vec, const size_t idx_size, const size_t vec_size, MPI_Comm comm) |
| root_write_ordered wrapper that takes array pointers instead of vectors. More... | |
| template<class T > | |
| void | print_vector (MPI_Comm comm, const vector< T > &vec, const short dpn, FILE *fd) |
| template<class T , class S > | |
| void | write_data_ascii (const MPI_Comm comm, const vector< T > &idx, const vector< S > &data, std::string file, short dpn=1) |
| template<class T > | |
| void | _binary_sort (T *_P, T *_Q, T s) |
| template<class T , class S > | |
| void | _binary_sort_copy (T *_P, T *_Q, S *_U, S *_V, T s) |
| template<class T , class S , class R > | |
| void | _binary_sort_copy_copy (T *_P, T *_Q, S *_A, S *_B, R *_U, R *_V, T s) |
| template<class T > | |
| void | _binary_sort_sort (T *_P, T *_Q, T *_A, T *_B, T s, T t) |
| template<class T , class S > | |
| void | _binary_sort_sort_copy (T *_P, T *_Q, T *_A, T *_B, S *_U, S *_V, T s, T t) |
| template<class T > | |
| T | _binary_log (const T *P, const T *Q) |
| template<class T > | |
| void | binary_sort (vector< T > &_V) |
| template<class T , class S > | |
| void | binary_sort_copy (vector< T > &_V, vector< S > &_W) |
| template<class T , class S , class R > | |
| void | binary_sort_copy_copy (vector< T > &_V, vector< S > &_W, vector< R > &_A) |
| template<class T > | |
| void | binary_sort_sort (vector< T > &_V, vector< T > &_W) |
| template<class T , class S > | |
| void | binary_sort_sort_copy (vector< T > &_V, vector< T > &_W, vector< S > &_A) |
| template<class T > | |
| void | unique_resize (vector< T > &_P) |
| template<class T > | |
| void | unique_resize (vector< T > &_P, vector< T > &_U) |
| template<class T , class S > | |
| void | unique_accumulate (vector< T > &_P, vector< S > &_A) |
| template<class T , class S > | |
| void | unique_accumulate (vector< T > &_P, vector< T > &_U, vector< S > &_A) |
| template<class T > | |
| void | global_to_local_sorted (const vector< T > &glob, vector< T > &data, bool sortedData, bool doWarn) |
| template<class T > | |
| void | global_to_local (const vector< T > &glob, vector< T > &data, bool sortedData, bool doWarn) |
| template<class T > | |
| void | global_to_local (const hashmap::unordered_map< T, T > &g2l, vector< T > &data, bool doWarn) |
| template<class T > | |
| void | dsp_from_cnt (const vector< T > &cnt, vector< T > &dsp) |
| Compute displacements from counts. More... | |
| template<class T > | |
| void | cnt_from_dsp (const vector< T > &dsp, vector< T > &cnt) |
| Compute counts from displacements. More... | |
| template<class T , class S > | |
| void | count (const vector< T > &data, vector< S > &cnt) |
| Count number of occurrences of indices. More... | |
| template<class T > | |
| T | sum (const vector< T > &vec) |
| Compute sum of a vector's entries. More... | |
| template<class T > | |
| void | interval (vector< T > &vec, size_t start, size_t end) |
| Create an integer interval between start and end. More... | |
| template<class T > | |
| void | divide (const size_t gsize, const size_t num_parts, vector< T > &loc_sizes) |
| divide gsize into num_parts local parts with even distribution of the remainder More... | |
| template<class S , class V > | |
| void | vec_assign (S *lhs, const V *rhs, size_t size) |
| Assign the values in rhs to lhs. The data-type of rhs is cast to the type of lhs. More... | |
| template<class T > | |
| bool | isEmpty (vector< T > &v) |
| Return whether an vector is empty (all values are 0). More... | |
| template<class T , class S > | |
| void | init_vector (SF::abstract_vector< T, S > **vec) |
| template<class T , class S > | |
| void | init_vector (SF::abstract_vector< T, S > **vec, int igsize, int ilsize, int idpn=1, typename abstract_vector< T, S >::ltype ilayout=abstract_vector< T, S >::unset) |
| template<class T , class S > | |
| void | init_vector (SF::abstract_vector< T, S > **vec, const SF::meshdata< mesh_int_t, mesh_real_t > &mesh, int i, typename SF::abstract_vector< T, S >::ltype ltype) |
| template<class T , class S > | |
| void | init_vector (SF::abstract_vector< T, S > **vec, SF::abstract_vector< T, S > *in) |
| template<class T , class S > | |
| void | init_matrix (SF::abstract_matrix< T, S > **mat) |
| template<class T , class S > | |
| void | init_solver (SF::abstract_linear_solver< T, S > **sol) |
| enum SF::elem_t |
element type enum
| Enumerator | |
|---|---|
| Tetra | |
| Hexa | |
| Octa | |
| Pyramid | |
| Prism | |
| Quad | |
| Tri | |
| Line | |
Definition at line 52 of file SF_container.h.
| enum SF::SF_nbr |
Enumeration encoding the different supported numberings.
Definition at line 188 of file SF_container.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 72 of file SF_container.h.
|
inline |
Definition at line 180 of file SF_container.h.
| void SF::array_to_tensors | ( | const vector< S > & | arr, |
| vector< dmat< V > > & | m | ||
| ) |
Definition at line 547 of file dense_mat.hpp.
|
inline |
|
inline |
Generalized matrix assembly.
All the assembly details – both the computation as well as the parameters handling – are encapsulated in the used integrator.
| mat | matrix to add values into |
| domain | The domain we compute the integral on |
| integrator | The integral computation functor |
Definition at line 1009 of file SF_fem_utils.h.
|
inline |
Generalized vector assembly.
All the assembly details – both the computation as well as the parameters handling – are encapsulated in the used integrator.
| vec | vector to add values into |
| domain | The domain we compute the integral on |
| integrator | The integral computation functor |
| prg | Progress display class |
Definition at line 1119 of file SF_fem_utils.h.
|
inline |
|
inline |
The binary_sort_copy procedure partially sorts pairs in place in ascending order only looking at the first argument.
| _V | Input: Vector of nonnegative integers to sort, first argument. Output: Partially sorted vector in ascending order, first argument. |
| _W | Input: Vector of arbitrary type to sort, second argument. Output: Partially sorted vector in ascending order, second argument. |
Definition at line 296 of file SF_sort.h.
|
inline |
The binary_sort_copy_copy procedure partially sorts triples in place in ascending order only looking at the first argument.
| _V | Input: Vector of nonnegative integers to sort, first argument. Output: Partially sorted vector in ascending order, first argument. |
| _W | Input: Vector of arbitrary type to sort, second argument. Output: Partially sorted vector in ascending order, second argument. |
| _A | Input: Vector of arbitrary type to sort, third argument. Output: Partially sorted vector in ascending order, second argument. |
The binary_sort_sort procedure sorts pairs of nonnegative integers in place in lexicographic order looking at both arguments.
| _V | Input: Vector of nonnegative integers to sort, first argument. Output: Sorted vector in ascending order, first argument. |
| _W | Input: Vector of nonnegative integers to sort, second argument. Output: Sorted vector in ascending order, second argument. |
Definition at line 321 of file SF_sort.h.
|
inline |
The binary_sort_sort_copy procedure partially sorts triples in place in lexicographic order only looking at the first and second argument.
| _V | Input: Vector of nonnegative integers to sort, first argument. Output: Partially sorted vector in ascending order, first argument. |
| _W | Input: Vector of nonnegative integers to sort, second argument. Output: Partially sorted vector in ascending order, second argument. |
| _A | Input: Vector of arbitrary type to sort, third argument. Output: Partially sorted vector in ascending order, third argument. |
| T SF::byte_swap | ( | T | in | ) |
swap the bytes of int, float, doubles, etc..
Definition at line 22 of file SF_io_base.h.
|
inline |
Compute canonical indices from nodal indices and dpn.
| nidx | Nodal indices in local indexing. |
| nbr | Numbering to use. |
| esize | Element size. |
| dpn | Degrees of freedom per node. |
| cidx | Canonical indices. |
Definition at line 987 of file SF_fem_utils.h.
| V SF::clamp | ( | const V | val, |
| const W | start, | ||
| const W | end | ||
| ) |
Compute counts from displacements.
Definition at line 319 of file SF_vector.h.
|
inline |
|
inline |
Definition at line 1167 of file SF_mesh_utils.h.
|
inline |
Compute the surface of a given mesh.
| T | Integer type. |
| S | Floating point type. |
| mesh | Input mesh. |
| numbering | Input global numbering. |
| tags | Surface is computed for region defined by these tags. |
| surfmesh | Output surface. |
Definition at line 1373 of file SF_mesh_utils.h.
|
inline |
Compute the surface of a given mesh.
| T | Integer type. |
| S | Floating point type. |
| mesh | Input mesh. |
| numbering | Input global numbering. |
| surfmesh | Output surface. |
Definition at line 1419 of file SF_mesh_utils.h.
|
inline |
this is somewhat similar to extract_surface(), but we dont try to be smart and just assume the surface con is already in correct indexing and we have a surface mesh and we dont care about the element indices. Maybe we can use compute_surface() but I dont have time to make it work nicely .. Aurel, 20.06.2023
Definition at line 1341 of file SF_mesh_utils.h.
|
inline |
Count number of occurrences of indices.
| data | Vector of index data. |
| cnt | cnt[i] is the number of occurrences of index i. |
Definition at line 332 of file SF_vector.h.
cross product
Definition at line 84 of file SF_container.h.
| S SF::det_3x3 | ( | const dmat< S > & | m | ) |
Definition at line 497 of file dense_mat.hpp.
|
inline |
divide gsize into num_parts local parts with even distribution of the remainder
Definition at line 358 of file SF_vector.h.
mat-mat double contraction A:B
Definition at line 438 of file dense_mat.hpp.
Compute displacements from counts.
Definition at line 310 of file SF_vector.h.
|
inline |
Definition at line 1160 of file SF_fem_utils.h.
|
inline |
Extract a submesh from a given mesh.
| [in] | keep | keep[i] tell whether element i is extracted into the submesh. |
| [in] | mesh | The mesh to extract from. |
| [out] | submesh | The submesh extracted into. |
Definition at line 524 of file SF_mesh_utils.h.
|
inline |
Extract the myocardium submesh.
The myocardium is currently identified by empty fiber definitions.
| [in] | mesh | The mesh to extract from. |
| [out] | submesh | The submesh extracted into. |
Definition at line 644 of file SF_mesh_utils.h.
|
inline |
Extract a submesh based on element tags.
Note: The tag set the extraction is based on is expected to be in the submesh!
| [in] | mesh | The mesh. |
| [out] | submesh | The extracted submesh. |
Definition at line 687 of file SF_mesh_utils.h.
|
inline |
return file size from a file descriptor
Definition at line 72 of file SF_io_base.h.
|
inline |
Function which checks if a given file exists.
| [in] | filename | Name of the file. |
Definition at line 66 of file SF_io_base.h.
|
inline |
Gather a mesh on rank 0.
| [in] | locmesh | The local mesh. |
| [out] | globmesh | The gathered global mesh. |
Definition at line 456 of file SF_mesh_utils.h.
|
inline |
Compute the integration point locations and weights.
| type | Element type. |
| order | Integration order. |
| ip | Integration point locations. |
| w | Integration weights. |
| nint | Number of integration points. |
Definition at line 121 of file SF_fem_utils.h.
| void SF::get_alg_mask | ( | const meshdata< T, S > & | mesh, |
| vector< bool > & | alg_mask | ||
| ) |
Definition at line 611 of file SF_container.h.
|
inline |
|
inline |
Generate element type enum from string.
Definition at line 155 of file SF_container.h.
|
inline |
Compute the global maximum of a distributed vector.
| [in] | vec | |
| [in] | comm |
Definition at line 186 of file SF_network.h.
|
inline |
Compute the global maximum of a distributed vector.
| [in] | vec | |
| [in] | comm |
Definition at line 156 of file SF_network.h.
|
inline |
Compute the global minimum of a distributed vector.
| [in] | vec | |
| [in] | comm |
Definition at line 126 of file SF_network.h.
|
inline |
|
inline |
Map data, which consists of indices defined by glob, with glob.size() == N, to the range [0, ..., N-1]. glob can be unsorted.
| glob | The global index set. |
| data | The data to map. |
| sortedData | Whether the data is sorted or not. |
| doWarn | Whether to issue a warning if an index cannot be mapped. |
Definition at line 540 of file SF_sort.h.
|
inline |
Map data, which consists of indices in the range [glob[0], ..., glob[N-1]] to the range [0, ..., N-1]. glob needs to be sorted in ascending order.
| glob | The global index set. |
| data | The data to map. |
| sortedData | Whether the data is sorted or not. |
| doWarn | Whether to issue a warning if an index cannot be mapped. |
|
inline |
Definition at line 212 of file SF_network.h.
|
inline |
Initialize a default SF::abstract_matrix based on the param_globals::flavor setting.
| mat | The matrix to initialize |
| T | Integer type (indices). |
| S | Floating point type (values). |
| std::error | if the user requests an uncompiled flavor |
Definition at line 199 of file SF_init.h.
|
inline |
Initialize a default SF::abstract_linear_solver based on the param_globals::flavor setting.
| sol | The solver to initialize |
| T | Integer type (indices). |
| S | Floating point type (values). |
| std::error | if the user requests an uncompiled flavor |
Definition at line 220 of file SF_init.h.
|
inline |
Initialize a default SF::abstract_vector based on the param_globals::flavor setting.
| vec | The vector to initialize.j |
| T | Integer type (indices). |
| S | Floating point type (values). |
| std::error | if the user requests an uncompiled flavor |
Definition at line 99 of file SF_init.h.
|
inline |
Initialize an SF::abstract_vector from a mesh based on the param_globals::flavor setting.
| vec | The vector to initialize |
| mesh | The mesh defining the parallel layout of the vector. |
| i | The number of d.o.f. per mesh vertex. |
| ltype | The vector layout. |
| T | Integer type (indices). |
| S | Floating point type (values). |
| std::error | if the user requests an uncompiled flavor |
|
inline |
Initialize an SF::abstract_vector with specified sizes based on the param_globals::flavor setting.
| vec | The vector to initialize |
| igsize | Global size |
| ilsize | Local size |
| idpn | Number of d.o.f. used per mesh node |
| ilayout | Vector layout w.r.t. used mesh. |
| T | Integer type (indices). |
| S | Floating point type (values). |
| std::error | if the user requests an uncompiled flavor |
|
inline |
Initialize an SF::abstract_vector from another vector based on the param_globals::flavor setting.
| vec | The vector to initialize |
| in | The vector to initialize from |
| T | Integer type (indices). |
| S | Floating point type (values). |
| std::error | if the user requests an uncompiled flavor |
|
inline |
Insert the points from the read-in buffers into a list of distributed meshes.
| meshlist | A list of meshes. | |
| [in] | The | basename of the points file. |
Definition at line 915 of file SF_mesh_io.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Submesh index mapping between different domains/meshes.
Since the parallel distribution is not the same for different meshes, we need MPI communication to generate the mapping information.
| T | Integer type. |
| S | Floating point type. |
| [in] | mesh_a | Mesh A. |
| [in] | mesh_b | Mesh B. |
| [in] | snbr | The type of submesh indexing (NBR_SUBMESH or NBR_PETSC). |
| [out] | a_to_b | The index mapping. |
Definition at line 763 of file SF_mesh_utils.h.
|
inline |
Create an integer interval between start and end.
Definition at line 350 of file SF_vector.h.
| void SF::invert_2x2 | ( | dmat< S > & | m, |
| S & | det | ||
| ) |
Definition at line 537 of file dense_mat.hpp.
| void SF::invert_2x2 | ( | S * | ele, |
| S & | det | ||
| ) |
Definition at line 521 of file dense_mat.hpp.
Definition at line 483 of file dense_mat.hpp.
| void SF::invert_3x3 | ( | dmat< S > & | m, |
| S & | det | ||
| ) |
Definition at line 474 of file dense_mat.hpp.
| void SF::invert_3x3 | ( | S * | ele, |
| S & | det | ||
| ) |
|
inline |
|
inline |
check is v is initialized. since we have abstract vector pointers in the simulator we need to first check for nullptr, then for v->is_init().
Definition at line 675 of file SF_abstract_vector.h.
|
inline |
Return whether an vector is empty (all values are 0).
Definition at line 378 of file SF_vector.h.
|
inline |
Compute Jacobian matrix from the real element to the reference element.
| rshape | Reference element shape derivatives. |
| npts | Number of points. |
| pts | Points array. |
| J | Jacobian matrix. |
Definition at line 610 of file SF_fem_utils.h.
|
inline |
compute a vector holding the parallel partitioning displacements (i.e. the layout) from a data count input
Definition at line 201 of file SF_network.h.
| T SF::local_nodal_to_local_petsc | ( | const meshdata< T, S > & | mesh, |
| int | rank, | ||
| T | local_nodal | ||
| ) |
A helper function to convert from a local node index in the DD data to the local index of a local PETSc vector chunk. This function expects local_nodal to be in the set mesh.pl.algebraic_nodes().
Definition at line 912 of file SF_parallel_layout.h.
| T SF::local_petsc_to_local_nodal | ( | const meshdata< T, S > & | mesh, |
| int | rank, | ||
| T | local_petsc | ||
| ) |
A helper function to convert from the index in a local PETSc vector chunk to a local node index in the DD data. For many calls use a SF::mapping instead!
Definition at line 925 of file SF_parallel_layout.h.
| void SF::local_petsc_to_nodal_mapping | ( | const meshdata< T, S > & | mesh, |
| index_mapping< T > & | petsc_to_nodal | ||
| ) |
|
inline |
vector magnitude
Definition at line 111 of file SF_container.h.
|
inline |
make a parallel vector global
Definition at line 225 of file SF_network.h.
|
inline |
Definition at line 237 of file SF_network.h.
| int SF::max_nodal_edgecount | ( | const meshdata< T, S > & | mesh | ) |
Compute the maximum number of node-to-node edges for a mesh.
| T | Integer type. |
| S | Floating point type. |
| mesh | The mesh. |
Definition at line 596 of file SF_container.h.
|
inline |
Exchange data in parallel over MPI.
| [in] | grph | The communications graph. |
| [in] | send | The send buffer. |
| [out] | revc | The receive buffer. |
Definition at line 47 of file SF_network.h.
|
inline |
Matrix graph (aka connectivity) multiplication function.
We compute the matrix multiplications C := (A * B)'. Only the matrix graphs are exposed to the outside.
| T | Integer type |
| a_cnt | [in] A matrix counts |
| a_con | [in] A matrix column indices |
| b_cnt | [in] B matrix counts |
| b_con | [in] B matrix column indices |
| b_cnt | [out] C matrix counts |
| b_con | [out] C matrix column indices |
Definition at line 159 of file SF_linalg_utils.h.
|
inline |
Compute the node-to-node connectivity.
| mesh | The mesh. |
| n2n_cnt | Counts of the connectivity matrix rows. |
| n2n_con | Column indices of the connectivity matrix. |
Definition at line 571 of file SF_container.h.
|
inline |
Get number of d.o.f. for an element type and an Ansatz function order.
| type | Element type. |
| order | Ansatz function order |
Definition at line 58 of file SF_fem_utils.h.
Definition at line 373 of file dense_mat.hpp.
| S* SF::operator* | ( | const dmat< S > & | a, |
| const S * | v | ||
| ) |
Definition at line 381 of file dense_mat.hpp.
Definition at line 389 of file dense_mat.hpp.
Definition at line 132 of file SF_container.h.
Definition at line 397 of file dense_mat.hpp.
Definition at line 413 of file dense_mat.hpp.
Definition at line 127 of file SF_container.h.
Definition at line 421 of file dense_mat.hpp.
Definition at line 122 of file SF_container.h.
Definition at line 405 of file dense_mat.hpp.
| bool SF::operator< | ( | const struct mixed_tuple< T, S > & | lhs, |
| const struct mixed_tuple< T, S > & | rhs | ||
| ) |
Definition at line 769 of file SF_container.h.
| bool SF::operator< | ( | const struct quadruple< T > & | lhs, |
| const struct quadruple< T > & | rhs | ||
| ) |
Definition at line 789 of file SF_container.h.
| bool SF::operator< | ( | const struct triple< T > & | lhs, |
| const struct triple< T > & | rhs | ||
| ) |
Definition at line 778 of file SF_container.h.
| bool SF::operator< | ( | const struct tuple< T > & | lhs, |
| const struct tuple< T > & | rhs | ||
| ) |
Definition at line 761 of file SF_container.h.
Definition at line 143 of file SF_container.h.
Definition at line 105 of file SF_container.h.
|
inline |
The distribution distributes entities between all ranks.
The graph (cnt, dsp, ranks) holds the redistribution candidates. For each entity index i, cnt[i] is the number of ranks that i can be assigned to and the rank indices are ranks[dsp[i]] to ranks[dsp[i+1]].
| [in] | gtarget | Global number of entities that need to be assigned to each rank. |
| [in] | cnt | Counts w.r.t. the ranks vector. |
| [in] | dsp | Displacements w.r.t. the ranks vector. |
| [in] | ranks | The ranks which can be assigned to each individual entity. |
| [in] | myrank | The rank of the calling process. |
| [out] | owner | The process index of the owner of each entity. |
| [out] | counts | The number of entities that has been assigned to each process. |
Definition at line 57 of file SF_parallel_layout.h.
|
inline |
Definition at line 201 of file SF_parallel_layout.h.
|
inline |
Get a fallback value for operations on parallel vectors if the local vector is of 0 size.
The fallback value is the first value of the first rank with a nonzero local size.
| T | Vector data type |
| vec | the vector. |
| comm | MPI communicator used. |
Definition at line 92 of file SF_network.h.
|
inline |
Permute the element data of a mesh based on a given permutation.
| [in] | inmesh | The input mesh. |
| [out] | outmesh | The output mesh. |
| [in] | perm | The permutation as in: outmesh[i] = inmesh[perm[i]] |
Definition at line 56 of file SF_mesh_utils.h.
|
inline |
Definition at line 78 of file SF_container.h.
|
inline |
Print some basic information on the domain decomposition of a mesh.
Definition at line 473 of file SF_mesh_utils.h.
|
inline |
One-by-one each process prints the graph of a given mesh.
| mesh | The mesh to print the graph of. |
Definition at line 730 of file SF_mesh_utils.h.
| void SF::print_vector | ( | MPI_Comm | comm, |
| const vector< T > & | vec, | ||
| const short | dpn, | ||
| FILE * | fd | ||
| ) |
project b onto a
Definition at line 138 of file SF_container.h.
|
inline |
Read a block of size bsize from an CARP element file.
| [in] | fd | File descriptor of the element file. |
| [in] | read_binary | Boolean telling if the file is in binary format. |
| [in] | bstart | Starting index of elements. |
| [in] | bsize | Number of elements to read. |
| [out] | mesh | Mesh structure. |
Definition at line 210 of file SF_mesh_io.h.
|
inline |
Read the element data (elements and fibers) of a CARP mesh.
The elements are distributed linearly across the process range.
| [out] | mesh | The mesh. |
| [in] | basename | Base of the element file (without file extension). |
Definition at line 546 of file SF_mesh_io.h.
|
inline |
Read a chunk of fibers from a file descriptor.
| [in] | fd | The file descriptor. |
| [in] | read_binary | Whether the file is in binary format. |
| [in] | twoFib | Whether two fiber directions are provided. |
| [in] | bsize | The chunk size to read. |
| [out] | mesh | The mesh. |
Definition at line 401 of file SF_mesh_io.h.
|
inline |
Read the header from the element and fiber files.
The files can be in either text or binary format.
| [in] | ele_fd | File descriptor of the element file. |
| [in] | fib_fd | File descriptor of the fibers file. |
| [in] | read_binary | Boolean telling if the file is in binary format. |
| [out] | numelem | The number of elements. |
| [out] | twoFib | Boolean holding whether two fiber directions are used. |
Definition at line 90 of file SF_mesh_io.h.
|
inline |
Function returns the number of points in a CARP points file.
| [in] | filename | Name of the file. |
Definition at line 55 of file SF_mesh_io.h.
|
inline |
Read the points and insert them into a list of meshes.
| meshlist | A list of meshes. | |
| [in] | The | basename of the points file. |
Definition at line 844 of file SF_mesh_io.h.
|
inline |
Read a chunk of points from a file descriptor.
| [in] | fd | The file descriptor. |
| [in] | read_binary | Whether the file is in binary format. |
| [in] | bsize | The chunk size to read. |
| [out] | xyz | The buffer where the coordinates are read. |
Definition at line 780 of file SF_mesh_io.h.
|
inline |
Definition at line 1427 of file SF_mesh_utils.h.
|
inline |
Rebalance the parallel distribution of a mesh, if a local size is 0.
| mesh | The mesh to rebalance. |
Definition at line 606 of file SF_mesh_utils.h.
|
inline |
Redistribute the element data of a parallel mesh among the ranks based on a partitioning.
| [in,out] | mesh | The mesh before and after redistribution. |
| [out] | sendbuff | An auxiliary mesh used for communication. |
| [in] | part | The partitioning. One process rank per element. |
Definition at line 125 of file SF_mesh_utils.h.
|
inline |
Redistribute the element data of a parallel mesh among the ranks based on a partitioning.
| [in,out] | mesh | The mesh. |
| [in] | part | The partitioning. One process rank per element. |
Definition at line 206 of file SF_mesh_utils.h.
|
inline |
Redistribute both element and vertex data of a mesh.
Note: This is more expensive than redistribute_elements. Use that function if you can.
| [in,out] | mesh | The mesh. |
| [in] | part | The partitioning. One process rank per element. |
Definition at line 222 of file SF_mesh_utils.h.
Compute shape function and its derivatives on a reference element.
| type | Element type. |
| order | Order of the Ansatz functions. |
| ip | Integration point. |
| rshape | Reference shape and deriv. matrix. |
Definition at line 383 of file SF_fem_utils.h.
|
inline |
Further refine a distribution generated by parallel_distribution().
| [in] | gtarget | Global number of entities that need to be assigned to each rank. |
| [in] | cnt | Counts w.r.t. the ranks vector. |
| [in] | dsp | Displacements w.r.t. the ranks vector. |
| [in] | ranks | The ranks which can be assigned to each individual entity. |
| [in] | myrank | The rank of the calling process. |
| [out] | owner | The process index of the owner of each entity. |
| [out] | counts | The number of entities that has been assigned to each process. |
Definition at line 139 of file SF_parallel_layout.h.
|
inline |
|
inline |
remove parallel duplicates from a hashmap::unordered_map
Definition at line 1238 of file SF_mesh_utils.h.
|
inline |
remove parallel duplicates from a hashmap::unordered_set
Definition at line 1254 of file SF_mesh_utils.h.
|
inline |
|
inline |
Definition at line 1557 of file SF_mesh_utils.h.
|
inline |
count the lines in a ascii file
Definition at line 440 of file SF_parallel_utils.h.
| size_t SF::root_read | ( | FILE * | fd, |
| V * | vec, | ||
| const size_t | vec_size, | ||
| MPI_Comm | comm | ||
| ) |
root_read wrapper that takes array pointers instead of vectors.
Definition at line 478 of file SF_parallel_utils.h.
| size_t SF::root_read | ( | FILE * | fd, |
| vector< V > & | vec, | ||
| MPI_Comm | comm | ||
| ) |
Read binary data into a vector.
Only rank 0 reads, communicates in chunks.
| V | Value type. |
| fd | File descriptor to use for reading. |
| vec | The data vector to read into. Must be already of correct size. |
| comm | MPI communicator to use. |
Definition at line 322 of file SF_parallel_utils.h.
| size_t SF::root_read_ascii | ( | FILE * | fd, |
| V * | vec, | ||
| const size_t | vec_size, | ||
| MPI_Comm | comm, | ||
| bool | int_type | ||
| ) |
root_read_ascii wrapper that takes array pointers instead of vectors.
Definition at line 494 of file SF_parallel_utils.h.
| size_t SF::root_read_ascii | ( | FILE * | fd, |
| vector< V > & | vec, | ||
| MPI_Comm | comm, | ||
| bool | int_data | ||
| ) |
Read binary data into a vector.
Only rank 0 reads, communicates in chunks.
| V | Value type. |
| fd | File descriptor to use for reading. |
| vec | The data vector to read into. Must be already of correct size. |
| comm | MPI communicator to use. |
| int_data | Whether to interpret read data as integer or float type. |
Definition at line 376 of file SF_parallel_utils.h.
| size_t SF::root_write | ( | FILE * | fd, |
| const vector< V > & | vec, | ||
| MPI_Comm | comm | ||
| ) |
Write vector data binary to disk.
Only rank 0 writes, rest communicates in chunks.
| V | Value type. |
| fd | File descriptor to use for writing. |
| vec | The data vector to write. |
| comm | MPI communicator to use. |
Definition at line 250 of file SF_parallel_utils.h.
| size_t SF::root_write | ( | FILE * | fd, |
| V * | vec, | ||
| const size_t | vec_size, | ||
| MPI_Comm | comm | ||
| ) |
root_write wrapper that takes array pointers instead of vectors.
Definition at line 296 of file SF_parallel_utils.h.
| size_t SF::root_write_ordered | ( | FILE * | fd, |
| const vector< T > & | idx, | ||
| const vector< T > & | cnt, | ||
| const vector< V > & | vec, | ||
| MPI_Comm | comm | ||
| ) |
Write index value pairs to disk in ordered permutation.
This function usese sort_parallel before writing with root write.
| T | Integer type. |
| V | Value type. |
| fd | File descriptor to use for writing. |
| idx | The indices of each logical unit |
| cnt | The number of vector entries associated to each logical unit |
| vec | The data vector holding the logical units |
| comm | MPI communicator to use. |
Definition at line 548 of file SF_parallel_utils.h.
| size_t SF::root_write_ordered | ( | FILE * | fd, |
| const vector< T > & | idx, | ||
| const vector< V > & | vec, | ||
| MPI_Comm | comm | ||
| ) |
Write index value pairs to disk in ordered permutation.
This function usese sort_parallel before writing with root write.
| T | Integer type. |
| V | Value type. |
| fd | File descriptor to use for writing. |
| idx | The indices vector |
| vec | The data vector to write. |
| comm | MPI communicator to use. |
Definition at line 522 of file SF_parallel_utils.h.
| size_t SF::root_write_ordered | ( | FILE * | fd, |
| T * | idx, | ||
| T * | cnt, | ||
| V * | vec, | ||
| const size_t | idx_size, | ||
| const size_t | vec_size, | ||
| MPI_Comm | comm | ||
| ) |
root_write_ordered wrapper that takes array pointers instead of vectors.
Definition at line 582 of file SF_parallel_utils.h.
| size_t SF::root_write_ordered | ( | FILE * | fd, |
| T * | idx, | ||
| V * | vec, | ||
| const size_t | vec_size, | ||
| MPI_Comm | comm | ||
| ) |
root_write_ordered wrapper that takes array pointers instead of vectors.
Definition at line 563 of file SF_parallel_utils.h.
|
inline |
|
inline |
Definition at line 1176 of file SF_fem_utils.h.
|
inline |
Compute shape derivatives for an element, based on the shape derivatives of the associated reference element.
| iJ | Inverse Jacobian from the reference element to the real element. |
| rshape | Reference shape funciton and derivatives. |
| ndof | Number of d.o.f. |
| shape | Shape derivatives. |
Definition at line 674 of file SF_fem_utils.h.
| void SF::sort_parallel | ( | MPI_Comm | comm, |
| const vector< T > & | idx, | ||
| const vector< T > & | cnt, | ||
| const vector< V > & | val, | ||
| vector< T > & | out_idx, | ||
| vector< T > & | out_cnt, | ||
| vector< V > & | out_val | ||
| ) |
Definition at line 154 of file SF_parallel_utils.h.
| void SF::sort_parallel | ( | MPI_Comm | comm, |
| const vector< T > & | idx, | ||
| const vector< V > & | val, | ||
| vector< T > & | out_idx, | ||
| vector< V > & | out_val | ||
| ) |
Sort index-value tuples parallel ascending across the ranks.
| T | Integer type. |
| V | Value type. |
| comm | MPI communicator to use. |
| idx | Indices vector |
| val | Values vector |
| out_idx | Output indices vector |
| out_val | Output values vector |
Definition at line 106 of file SF_parallel_utils.h.
| void SF::sort_parallel | ( | MPI_Comm | comm, |
| const vector< T > & | idx, | ||
| vector< T > & | out_idx | ||
| ) |
Sort index values parallel ascending across the ranks.
| T | Integer type. |
| V | Value type. |
| comm | MPI communicator to use. |
| idx | Indices vector |
| out_idx | Output indices vector |
Definition at line 52 of file SF_parallel_utils.h.
|
inline |
Compute sum of a vector's entries.
Definition at line 340 of file SF_vector.h.
| void SF::tensors_to_array | ( | const vector< dmat< S > > & | m, |
| vector< V > & | arr | ||
| ) |
Definition at line 557 of file dense_mat.hpp.
Definition at line 429 of file dense_mat.hpp.
|
inline |
Transpose CRS matrix graph A into B.
| T | Integer type |
| a_cnt | [in] A matrix counts |
| a_con | [in] A matrix column indices |
| b_cnt | [out] B matrix counts |
| b_con | [out] B matrix column indices |
Definition at line 186 of file SF_linalg_utils.h.
|
inline |
treat a file open error by displaying the errnum string interpretation and the caller
Definition at line 83 of file SF_io_base.h.
|
inline |
The unique_accumulate procedure calculates a partial set union of pairs only looking at the first argument and accumulates the values of the second argument of partially matching pairs.
| _P | Input: Vector sorted in ascending order, first argument. Output: Vector sorted in ascending order with only unique elements, first argument. |
| _A | Input: Vector to accumulate, second argument. Output: Vector of accumulated values, second argument. |
Definition at line 409 of file SF_sort.h.
|
inline |
The unique_accumulate procedure calculates a partial set union of triples only looking at the first and second argument and accumulates the values of the third argument of partially matching triples.
| _P | Input: Vector sorted in lexicographic order, first argument. Output: Vector sorted in lexicographic order with only unique elements, first argument. |
| _U | Input: Vector sorted in lexicographic order, second argument. Output: Vector sorted in lexicographic order with only unique elements, second argument. |
| _A | Input: Vector to accumulate, third argument. Output: Vector of accumulated values, third argument. |
|
inline |
The unique_resize procedure calculates the set union of an in ascending order sorted vector.
| _P | Input: Vector sorted in ascending order. Output: Vector sorted in ascending order with only unique elements. |
Definition at line 348 of file SF_sort.h.
The unique_resize procedure calculates the set union of an in ascending order sorted vector.
| _P | Input: Vector sorted in ascending order. Output: Vector sorted in ascending order with only unique elements. |
| _U | Input: Vector sorted in ascending order. Output: Vector sorted in ascending order with only unique elements. |
|
inline |
Assign the values in rhs to lhs. The data-type of rhs is cast to the type of lhs.
Definition at line 371 of file SF_vector.h.
|
inline |
Write the local element block to a file.
| [in] | fd | The file descriptor. |
| [in] | write_binary | Whether to write in binary format. |
| [in] | mesh | The mesh. |
Definition at line 319 of file SF_mesh_io.h.
|
inline |
Write the header of the element and fiber files.
The files can be in either text or binary format.
| [in] | ele_fd | File descriptor of the element file. |
| [in] | fib_fd | File descriptor of the fibers file. |
| [in] | binary | Whether to write in binary file format. |
| [in] | numelem | The number of elements. |
| [in] | twoFib | One or two fiber directions. |
Definition at line 147 of file SF_mesh_io.h.
|
inline |
Write the element data (elements and fibers) of a CARP mesh.
The elements are distributed linearly across the process range.
| [in] | mesh | The mesh. |
| [out] | basename | Base of the element file (without file extension). |
Definition at line 674 of file SF_mesh_io.h.
|
inline |
Write the local chunk of fibers to a file.
| [in] | fd | The file descriptor we write to. |
| [in] | write_binary | Whether to write in binary format. |
| [in] | mesh | The mesh we write. |
Definition at line 498 of file SF_mesh_io.h.
|
inline |
Write a parallel mesh to harddisk without gathering it on one rank.
| T | Integer type. |
| S | Floating point type. |
| [in] | mesh | The mesh to write. |
| [in] | binary | Whether to write in binary format. |
| [in] | basename | The basename of the mesh files. |
Definition at line 334 of file SF_mesh_utils.h.
|
inline |
Write a chunk of points to a file.
| [in] | fd | The file descriptor we write to. |
| [in] | write_binary | Whether to write in binary format. |
| [in] | xyz | The points coord vector. |
Definition at line 817 of file SF_mesh_io.h.
|
inline |
Write the header of the points file.
The files can be in either text or binary format.
| [in] | pts_fd | File descriptor of the points file. |
| [in] | binary | Whether to write in binary file format. |
| [in] | numpts | The number of points. |
Definition at line 183 of file SF_mesh_io.h.
|
inline |
|
inline |
Write a mesh in binary vtk format.
| mesh | The mesh. |
| file | The output file name. |
Definition at line 991 of file SF_mesh_io.h.