Classes | |
struct | do_pow |
struct | do_pow< 0, T > |
struct | do_pow< 1, T > |
struct | do_pow< 6, T > |
class | ReverseBytes |
Functions | |
std::string | get_timestamp () |
uint32_t | hashword (const uint32_t *k, size_t length, uint32_t initval=0) |
uint32_t | hashword (const std::vector< uint32_t > &keys, uint32_t initval=0) |
uint32_t | hashword2 (const uint32_t &first, const uint32_t &second, uint32_t initval=0) |
uint64_t | hashword2 (const uint64_t first, const uint64_t second) |
uint16_t | hashword2 (const uint16_t first, const uint16_t second) |
uint64_t | hashword (const uint64_t *k, size_t length) |
uint16_t | hashword (const uint16_t *k, size_t length) |
template<typename Container > | |
Container::value_type | hashword (const Container &keys) |
template<typename T > | |
T | string_to_enum (const std::string &s) |
template<typename T > | |
std::string | enum_to_string (const T e) |
void | print_timestamp (std::ostream &target=std::cout) |
std::string | system_info () |
template<typename ForwardIter , typename T > | |
void | iota (ForwardIter first, ForwardIter last, T value) |
template<class InputIterator > | |
bool | is_sorted (InputIterator first, InputIterator last) |
template<class ForwardIterator , class T > | |
ForwardIterator | binary_find (ForwardIterator first, ForwardIterator last, const T &value) |
template<class ForwardIterator , class T , class Compare > | |
ForwardIterator | binary_find (ForwardIterator first, ForwardIterator last, const T &value, Compare comp) |
template<int N, typename T > | |
T | pow (const T &x) |
unsigned int | factorial (unsigned int n) |
template<typename T > | |
T | binomial (T n, T k) |
template<typename T > | |
void | deallocate (std::vector< T > &vec) |
std::string | complex_filename (const std::string &basename, unsigned int r_o_c=0) |
void | prepare_complex_data (const std::vector< Complex > &source, std::vector< Real > &real_part, std::vector< Real > &imag_part) |
int | mkdir (const char *pathname) |
ForwardIterator libMesh::Utility::binary_find | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
const T & | value | ||
) |
The STL provides std::binary_search()
which returns true
or false
depending on whether the searched-for value is found. In contrast, Utility::binary_find() uses a std::lower_bound() based search on a sorted range to find the required value.
Definition at line 135 of file utility.h.
References value.
Referenced by libMesh::ReplicatedMesh::stitching_helper(), and libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
ForwardIterator libMesh::Utility::binary_find | ( | ForwardIterator | first, |
ForwardIterator | last, | ||
const T & | value, | ||
Compare | comp | ||
) |
T libMesh::Utility::binomial | ( | T | n, |
T | k | ||
) |
Definition at line 224 of file utility.h.
Referenced by libMesh::FE< Dim, LAGRANGE_VEC >::shape(), and libMesh::FE< Dim, LAGRANGE_VEC >::shape_deriv().
std::string libMesh::Utility::complex_filename | ( | const std::string & | basename, |
unsigned int | r_o_c = 0 |
||
) |
r_o_c
= 0 the filename for output of the real part of complex data, and for r_o_c
= 1 the filename for the imaginary part. Definition at line 105 of file utility.C.
References libMesh::Quality::name().
void libMesh::Utility::deallocate | ( | std::vector< T > & | vec | ) |
A convenient method to truly empty a vector using the "swap trick"
Definition at line 247 of file utility.h.
References swap().
Referenced by libMesh::Nemesis_IO::read().
std::string libMesh::Utility::enum_to_string | ( | const T | e | ) |
string
which matches the enumeration e
of type T
. Referenced by libMesh::LaspackLinearSolver< T >::adjoint_solve(), libMesh::AbaqusIO::assign_sideset_ids(), libMesh::AbaqusIO::assign_subdomain_ids(), libMesh::MeshTools::find_nodal_neighbors(), libMesh::ReferenceElem::get(), libMesh::Elem::get_info(), libMesh::LinearSolver< Number >::print_converged_reason(), libMesh::Elem::quality(), libMesh::ExodusII_IO::read(), libMesh::AbaqusIO::read_elements(), libMesh::DofMap::reinit(), libMesh::PetscLinearSolver< T >::set_petsc_solver_type(), libMesh::SlepcEigenSolver< T >::set_slepc_solver_type(), libMesh::AztecLinearSolver< T >::set_solver_type(), libMesh::EigenSparseLinearSolver< T >::solve(), libMesh::LaspackLinearSolver< T >::solve(), libMesh::GMVIO::write_ascii_old_impl(), libMesh::GMVIO::write_discontinuous_gmv(), and libMesh::ExodusII_IO_Helper::write_elements().
|
inline |
std::string libMesh::Utility::get_timestamp | ( | ) |
Definition at line 37 of file timestamp.C.
References libMesh::out.
Referenced by libMesh::PerfLog::get_info_header(), print_timestamp(), and system_info().
|
inline |
The hashword function takes an array of uint32_t's of length 'length' and computes a single key from it.
Definition at line 153 of file hashword.h.
Referenced by libMesh::Elem::compute_key(), hashword(), and libMesh::Elem::key().
|
inline |
Calls function above with slightly more convenient std::vector interface.
Definition at line 195 of file hashword.h.
References hashword().
|
inline |
Call the 64-bit FNV hash function.
Definition at line 249 of file hashword.h.
|
inline |
In a personal communication from Bob Jenkins, he recommended using "Probably final() from lookup3.c... You could hash up to 6 16-bit integers that way. The output is c, or the top or bottom 16 bits of c if you only need 16 bit hash values." [JWP]
Definition at line 263 of file hashword.h.
|
inline |
Calls functions above with slightly more convenient std::vector/array compatible interface.
Definition at line 304 of file hashword.h.
References hashword().
|
inline |
This is a hard-coded version of hashword for hashing exactly 2 numbers.
Definition at line 210 of file hashword.h.
Referenced by libMesh::Elem::compute_key().
|
inline |
|
inline |
Definition at line 240 of file hashword.h.
void libMesh::Utility::iota | ( | ForwardIter | first, |
ForwardIter | last, | ||
T | value | ||
) |
Utility::iota
is a duplication of the SGI STL extension std::iota
. It simply assigns sequentially increasing values to a range. That is, it assigns value
to *first
, value
+ 1 to *
(first + 1) and so on. In general, each iterator i
in the range [first, last) is assigned value
+ (i - first
).
Definition at line 57 of file utility.h.
References value.
Referenced by libMesh::PetscVector< T >::create_subvector(), libMesh::PetscVector< T >::localize(), libMesh::System::project_vector(), and libMesh::System::projection_matrix().
bool libMesh::Utility::is_sorted | ( | InputIterator | first, |
InputIterator | last | ||
) |
Utility::is_sorted mimics the behavior of the SGI STL extension std::is_sorted. Checks to see if the range [first,last) is sorted in non-decreasing order, ie. for each "i" in [first,last) *i <= *(i+1).
Definition at line 77 of file utility.h.
References libMesh::MeshTools::Subdivision::prev.
int libMesh::Utility::mkdir | ( | const char * | pathname | ) |
|
inline |
Definition at line 198 of file utility.h.
References libMesh::Utility::do_pow< N, T >::apply().
Referenced by libMesh::FEHermite< Dim >::hermite_raw_shape_second_deriv(), libMesh::FESubdivision::regular_shape(), libMesh::FE< Dim, LAGRANGE_VEC >::shape(), libMesh::FE< Dim, LAGRANGE_VEC >::shape_deriv(), and libMesh::FE< Dim, LAGRANGE_VEC >::shape_second_deriv().
void libMesh::Utility::prepare_complex_data | ( | const std::vector< Complex > & | source, |
std::vector< Real > & | real_part, | ||
std::vector< Real > & | imag_part | ||
) |
Prepare complex data for writing.
|
inline |
T libMesh::Utility::string_to_enum | ( | const std::string & | s | ) |
T
which matches the string s
. std::string libMesh::Utility::system_info | ( | ) |
Definition at line 57 of file utility.C.
References get_timestamp().