USER GUIDES: More...
Namespaces | |
| namespace | arguments |
| namespace | arpack |
| namespace | assert |
| namespace | banners |
| namespace | cell |
| namespace | constant |
| namespace | database |
| namespace | electronics |
| namespace | fem |
| namespace | gasmodels |
| namespace | gastables |
| namespace | graph |
| namespace | hdf5 |
| namespace | input |
| namespace | integration |
| namespace | lapack |
| namespace | map |
| namespace | material |
| namespace | mesh |
| namespace | ode |
| namespace | opt |
| namespace | parpack |
| namespace | prandtlmeyer |
| namespace | solver |
| namespace | sparse |
| namespace | spline |
| namespace | tensor |
| namespace | vtk |
Classes | |
| class | Arguments |
| Command-line argument parsing. More... | |
| class | Ascii |
| Line-based ASCII file interface. More... | |
| class | Bezier |
| class | Bitset |
| Compile-time fixed-size bitset. More... | |
| class | Cell |
| Cell is a wrapper around the standard vector. More... | |
| class | Circuit |
| class | CommunicationObject |
| class | Communicator |
| Global MPI communicator manager. More... | |
| class | CsvFile |
| CSV reader for numeric data. More... | |
| class | Database |
| Precomputed lookup table on a tensor grid; evaluation, derivatives and HDF5 persistence. More... | |
| class | DynamicBitset |
| Runtime-sized bitset; one bit per flag, packed into 64-bit words. More... | |
| class | Gas |
| The gas class that provides the fluid model. More... | |
| class | Genome |
| class | Hash |
| Incremental hash computation. More... | |
| class | HDF5 |
| Hierarchical data format I/O. More... | |
| class | InputFile |
| Parser for the input.conf configuration format. More... | |
| struct | is_scalar |
| struct | is_scalar< Matrix< T > > |
| struct | is_scalar< Vector< T > > |
| struct | is_shift_register_safe |
| Type trait: may T be stored in a ShiftRegister? More... | |
| struct | is_shift_register_safe< Matrix< T > > |
| struct | is_shift_register_safe< Vector< T > > |
| class | Logger |
| Hierarchical logging with info levels. More... | |
| class | Map |
| Hash map (unordered key-value). More... | |
| class | Material |
| Base class for all materials in BELFEM. More... | |
| class | MaterialFactory |
| Factory class for creating material objects and associated property functions. More... | |
| class | Matrix |
| Dense column-major matrix. More... | |
| class | Mesh |
| Top-level container for all mesh entities. More... | |
| class | MeshChecker |
| class | MeshOptions |
| struct | opGenomeSort |
| struct | OpVertexDegree |
| struct | OpVertexID |
| struct | OpVertexIndex |
| struct | OpVertexLevel |
| struct | OpVertexOwner |
| class | OrderConverter |
| class | OrderedMap |
| Sorted map (ordered key-value). More... | |
| class | Profiler |
| gperftools CPU profiling with Callgrind-format output. More... | |
| class | Progressbar |
| Progress display for long-running loops. More... | |
| class | Protoshell |
| Thin shell configuration object for electromagnetic simulations. More... | |
| class | Quaternion |
| Scalar-first quaternion value type for 3D rotations. More... | |
| class | Queue |
| FIFO queue. More... | |
| class | Set |
| Hash set with set operations. More... | |
| class | ShiftRegister |
| Fixed-capacity FIFO with history, for time-stepping. More... | |
| class | Solver |
| Unified interface to the sparse direct solvers. More... | |
| class | SolverParameters |
| Configuration for a Solver. More... | |
| class | SourceFunction |
| class | Spline |
| Cubic spline on a uniform grid, C2, with natural, parabolic or clamped boundary conditions. More... | |
| class | SpMatrix |
| Sparse matrix in CSR or CSC format. More... | |
| class | StringList |
| a help class needed for the Exodus Writer More... | |
| class | Tensor |
| Third- or fourth-order tensor container; the constitutive helpers (contraction, rotation, inversion, Voigt conversion) are specialised to 3x3x3x3. More... | |
| class | TensorMeshConfig |
| class | TensorMeshFactory |
| class | Timer |
| High-resolution wall-clock timing. More... | |
| class | Vector |
| Column vector. More... | |
| class | XML |
| XML document interface. More... | |
Typedefs | |
| typedef int | comm_t |
| typedef int | proc_t |
| typedef size_t | size_t |
| typedef std::string | string |
| typedef int | sint |
| typedef long int | lsint |
| typedef unsigned int | uint |
| typedef unsigned char | uchar |
| typedef short unsigned int | suint |
| typedef long unsigned int | luint |
| typedef long long unsigned int | lluint |
| typedef double | real |
| typedef std::complex< real > | cplx |
| typedef unsigned int | id_t |
| typedef long long unsigned int | key_t |
| typedef __uint128_t | key128_t |
| typedef int32_t | int_t |
| typedef uint32_t | index_t |
| typedef std::array< real, 7 > | unit |
| typedef std::pair< real, unit > | value |
| typedef int | hid_t |
| typedef int | herr_t |
| typedef int | hsize_t |
| typedef Cell< graph::Vertex * > | Graph |
| typedef int | metis_t |
| typedef int | scotch_t |
| typedef real | UserFunc(const real) |
| typedef Bitset< static_cast< size_t >(MaterialDependency::UNDEFINED) > | MaterialDependencyBitset |
| Bitset for tracking material property dependencies. | |
| typedef real | MatFunc1(const Material *, const real) |
| typedef real | MatFunc2(const Material *, const real, const real) |
| typedef real | MatFunc3(const Material *, const real, const real, const real) |
| typedef real | DefectFunc(const real, const real, const real, const real) |
| typedef real | HeatFunc(const real, const real, const real, const real) |
Functions | |
| void | comm_abort (const int aErrorCode=1) |
| Kill the whole job. | |
| proc_t | comm_size () |
| Returns the number of processes in the communicator. | |
| proc_t | comm_rank () |
| Returns the rank of the current process in the communicator. | |
| void | comm_check (const int aErrorCode) |
| Checks the MPI error code and reports any errors. | |
| void | comm_barrier () |
| Synchronizes all processes in the communicator. | |
| int | comm_tag (const proc_t aSource, const proc_t aTarget) |
| Generates a unique tag for MPI communication between two processes. | |
| void | comm_drain_check (const char *aLabel) |
| Debug-build tripwire for the two-tags-per-pair ordering contract of the point-to-point fabric ( see comm_tag() in commtools.cpp ). | |
| Cell< int > | comm_split (const index_t aLength) |
| Splits a message into chunks for MPI communication. | |
| index_t | comm_splitcount (const Vector< index_t > &aLengths, const proc_t aRoot) |
| Calculates the total number of chunks needed for a set of message lengths. | |
| index_t | comm_splitcount (index_t aLength) |
| void | broadcast (Cell< string > &aData, const proc_t aRoot) |
| void | send (const string &aMessage, const proc_t aTarget) |
| void | receive (string &aMessage, const proc_t aSource) |
| template<typename T> | |
| void | broadcast (T &aMessage, const proc_t aRoot=0, typename std::enable_if< is_scalar< T >::value >::type *=nullptr) |
| Broadcasts a scalar value to all processes. | |
| template<typename T> | |
| void | broadcast (T *aMessage, const proc_t aRoot, const proc_t aLength) |
| template<typename T> | |
| void | allreduce (const T *aSend, T *aRecv, const int aCount) |
| Collective MAX-reduction visible on every rank. | |
| template<typename T> | |
| void | allreduce_min (const T *aSend, T *aRecv, const int aCount) |
| Collective MIN-reduction visible on every rank. | |
| template<typename T> | |
| void | send (const T aData, const proc_t aTarget=0, typename std::enable_if< is_scalar< T >::value >::type *=nullptr) |
| Sends a scalar value to a specific target process. | |
| template<typename T> | |
| void | receive (T &aData, const proc_t aSource=0, typename std::enable_if< is_scalar< T >::value >::type *=nullptr) |
| Receives a scalar value from a specific source process. | |
| template<typename T> | |
| void | send (T *aData, const index_t aLength, const proc_t aTarget) |
| Sends a raw array to a specified target process using MPI. | |
| template<typename T> | |
| void | receive (T *aData, index_t &aLength, const proc_t aSource) |
| Receives a raw array from a specified source process using MPI. | |
| template<typename T> | |
| void | send (Cell< T > &aData, const proc_t aTarget=0) |
| Sends a cell to a specific target process. | |
| template<typename T> | |
| void | receive (Cell< T > &aData, const proc_t aSource=0) |
| Receives a cell from a specific source process. | |
| template<typename T> | |
| void | broadcast (Cell< T > &aData, const proc_t aRoot=0) |
| Broadcasts a cell to all processes. | |
| template<typename T> | |
| void | distribute (Cell< T > &aData) |
| Distributes elements of a cell to other processes. | |
| template<typename T> | |
| void | collect (Cell< T > &aData, const T aMyValue=0) |
| Collects scalar values from all processes into a cell. | |
| template<typename T> | |
| void | send (Vector< T > &aData, const proc_t aTarget=0) |
| Sends a vector to a specific target process. | |
| template<typename T> | |
| void | receive (Vector< T > &aData, const proc_t aSource=0) |
| Receives a vector from a specific source process. | |
| template<typename T> | |
| void | broadcast (Vector< T > &aData, const proc_t aRoot=0) |
| Broadcasts a vector to all processes. | |
| template<typename T> | |
| void | distribute (Vector< T > &aData) |
| Distributes elements of a vector to other processes. | |
| template<typename T> | |
| void | collect (Vector< T > &aData, const T aMyValue=0) |
| Collects scalar values from all processes into a vector. | |
| template<typename T> | |
| void | distribute (Cell< Vector< T > > &aData) |
| Distributes a collection of vectors to other processes. | |
| template<typename T> | |
| void | distribute (Cell< Cell< T > > &aData) |
| Distributes a collection of cells to other processes. | |
| template<typename T, typename U> | |
| void | distribute (const T *aData, const Vector< U > &aOffsets) |
| Distributes a raw vector based on lengths and offsets. | |
| template<typename T, typename U> | |
| void | collect (T *aData, const Vector< U > &aOffsets) |
| template<typename T> | |
| void | collect (Cell< Vector< T > > &aData, Vector< T > aMyData={}) |
| Collects vectors from all processes into a cell. | |
| template<typename T> | |
| void | share (Vector< T > &aData) |
| template<typename T> | |
| void | share (Cell< T > &aData) |
| template<typename T> | |
| void | broadcast (Matrix< T > &aData, const proc_t aRoot=0) |
| Broadcasts a matrix to all processes. | |
| template<typename T> | |
| void | send (Matrix< T > &aData, const proc_t aTarget=0) |
| template<typename T> | |
| void | receive (Matrix< T > &aData, const proc_t aSource=0) |
| Receives a matrix from a specific source process. | |
| template<typename T> | |
| void | distribute (Cell< Matrix< T > > &aData) |
| Distributes a collection of matrices to other processes. | |
| template<typename T> | |
| void | collect (Cell< Matrix< T > > &aData) |
| Collects matrices from all processes into a cell. | |
| template<typename T> | |
| comm_t | comm_type () |
| returns the MPI datatype handle for T | |
| template<typename T> | |
| void | sort (Cell< T > &aCell) |
| template<typename T, class C> | |
| void | sort (Cell< T > &aCell, C &aComp, const size_t aNumberOfItems=0) |
| template<typename T> | |
| void | unique (Cell< T > &aCell) |
| template<typename T> | |
| index_t | find_index_in_unique_cell (const Cell< T > &aCell, const T &aMember) |
| returns the position of a member inside a cell. | |
| template<typename T> | |
| void | reverse (Cell< T > &aCell) |
| template<typename T> | |
| void | append (Cell< T > &aA, const Cell< T > &aB) |
| template<typename T> | |
| void | append_move (Cell< T > &aTarget, Cell< T > &aSource) |
| template<typename T> | |
| void | swap (Cell< T > &aA, Cell< T > &aB) noexcept |
| Swap specialization for Cell. | |
| std::string | exec (const std::string &aCommand) |
| std::string | uname () |
| returns the Unix version ( Linux or Darwin ) | |
| std::string | cpu_info () |
| grabs the cpu info for the banner | |
| std::string | os_string () |
| std::string | version () |
| returns the BELFEM semantic version as "major.minor.patch" (e.g. | |
| bool | is_built_from_git () |
| true if the build was produced from a git checkout (i.e. | |
| std::string | git_commit_hash () |
| returns the full git commit hash of the build, or "unknown" if built outside a git repository (e.g. | |
| std::string | git_commit_hash_short () |
| returns the abbreviated (short) git commit hash of the build | |
| std::string | git_branch () |
| returns the git branch name at build time, or "unknown" | |
| bool | git_is_dirty () |
| true if the working tree had uncommitted changes at build time | |
| void | print_banner (const std::string aExecName="") |
| prints the banner | |
| std::size_t | available_memory () |
| Bytes a new allocation by this process can claim without swapping, or 0 when that cannot be established. | |
| bool | check_unit (const value &aValue, const string &aUnit) |
| check if a value has the correct unit | |
| template<typename ... Args> | |
| std::string | sprint (const char *aFormat, const Args ... aArgs) |
| A format script similar to write( , ) in fortran. | |
| template<typename T> | |
| void | to_enum (const string &aString, T &aEnum) |
| template<typename T> | |
| void | random_seed (T &aSeed) |
| void | random_seed () |
| seed the random generator. | |
| real | rand () |
| a random number between 0 and 1 must call seed first | |
| std::string | basename (const std::string &aFilePath) |
| returns the basename of a file | |
| std::string | dirname (const std::string &aFilePath) |
| returns the directory name of a file | |
| std::string | filetype (const std::string &aFilePath) |
| returns the filetype of a file | |
| std::string | filename (const std::string &aFilePath) |
| returns the name of a file without the path | |
| std::string | clean_string (const std::string &aString) |
| tidy up the string | |
| string | first_word (const std::string &aString, const char aDelimiter=' ') |
| return the first word of the string | |
| Cell< string > | string_to_words (const std::string &aString, const char aDelimiter=' ') |
| create a cell of words from a string | |
| std::string | search_and_replace (const std::string &aString, const std::string &aSearch, const std::string &aReplace) |
| std::string | string_to_lower (const std::string &aString) |
| convert the string to lower case | |
| std::string | string_to_upper (const std::string &aString) |
| convert the string to upper case | |
| bool | string_to_bool (const std::string &aString) |
| return true if string is either 1, on, true or yes | |
| real | to_real (const std::string &aString) |
| convert string to real, return NAN if it is not real | |
| value | unit_to_si (const string &aString) |
| string | format_with_leading_zeros (const uint aNumber) |
| bool | is_integer (const string &aString) |
| size_t | utf8_character_count (const string &aString) |
| template<typename T> | |
| std::string | datatype_string () |
| template<> | |
| std::string | datatype_string< bool > () |
| template<> | |
| std::string | datatype_string< int > () |
| template<> | |
| std::string | datatype_string< unsigned int > () |
| template<> | |
| std::string | datatype_string< long unsigned int > () |
| template<> | |
| std::string | datatype_string< double > () |
| template<> | |
| std::string | datatype_string< std::string > () |
| template<> | |
| std::string | datatype_string< std::complex< double > > () |
| template<typename T> | |
| void | string_to_cell (const string &aString, Cell< T > &aValues) |
| template<typename T> | |
| void | to_pair (const std::string &aString, Cell< std::pair< std::string, T > > &aResult) |
| bool | is_maxwell (const IwgType aType) |
| std::pair< uint, uint > | minNonzero (Matrix< int > &aMat, const uint k) |
| void | moveMinNonzero (Matrix< int > &aMat, Matrix< int > &aQ, Matrix< int > &aQ_, Matrix< int > &aR, Matrix< int > &aR_, const uint k) |
| std::tuple< bool, uint, uint, int > | checkForDivisibility (Matrix< int > &aMat, const uint k) |
| void | partSmithForm (Matrix< int > &aMat, Matrix< int > &aQ, Matrix< int > &aQ_, Matrix< int > &aR, Matrix< int > &aR_, const uint k) |
| std::tuple< Matrix< int >, Matrix< int >, Matrix< int >, Matrix< int >, uint, uint > | smithForm (Matrix< int > &aMat) |
| Matrix< int > | SolveInt (Matrix< int > aMat, Matrix< int > &aVec) |
| template<typename T> | |
| void | rowExchange (Matrix< T > &aMat, const uint i, const uint j) |
| template<typename T> | |
| void | columnExchange (Matrix< T > &aMat, const uint i, const uint j) |
| template<typename T> | |
| void | rowMultiply (Matrix< T > &aMat, const uint i) |
| template<typename T> | |
| void | columnMultiply (Matrix< T > &aMat, const uint i) |
| template<typename T> | |
| void | rowAdd (Matrix< T > &aMat, const uint i, const uint j, const int q) |
| template<typename T> | |
| void | columnAdd (Matrix< T > &aMat, const uint i, const uint j, const int q) |
| template<typename T> | |
| void | rowExchangeOperation (Matrix< T > &aMat, Matrix< T > &aQ, Matrix< T > &aQ_, const uint i, const uint j) |
| template<typename T> | |
| void | rowMultiplyOperation (Matrix< T > &aMat, Matrix< T > &aQ, Matrix< T > &aQ_, const uint i) |
| template<typename T> | |
| void | rowAddOperation (Matrix< T > &aMat, Matrix< T > &aQ, Matrix< T > &aQ_, const uint i, const uint j, const int q) |
| template<typename T> | |
| void | columnExchangeOperation (Matrix< T > &aMat, Matrix< T > &aR, Matrix< T > &aR_, const uint i, const uint j) |
| template<typename T> | |
| void | columnMultiplyOperation (Matrix< T > &aMat, Matrix< T > &aR, Matrix< T > &aR_, const uint i) |
| template<typename T> | |
| void | columnAddOperation (Matrix< T > &aMat, Matrix< T > &aR, Matrix< T > &aR_, const uint i, const uint j, const int q) |
| template<typename T> | |
| void | partRowReduce (Matrix< T > &aMat, Matrix< T > &aQ, Matrix< T > &aQ_, const uint k, const uint l) |
| template<typename T> | |
| void | partColumnReduce (Matrix< T > &aMat, Matrix< T > &aR, Matrix< T > &aR_, const uint k, const uint l) |
| template<typename T> | |
| std::pair< uint, uint > | smallestNonzero (Vector< T > &v, uint k) |
| template<typename T> | |
| void | rowPrepare (Matrix< T > &aMat, Matrix< T > &aQ, Matrix< T > &aQ_, const uint k, const uint l) |
| template<typename T> | |
| void | rowReduce (Matrix< T > &aMat, Matrix< T > &aQ, Matrix< T > &aQ_, const uint k, const uint l) |
| template<typename T> | |
| std::tuple< Matrix< T >, Matrix< T >, uint > | rowEchelon (Matrix< T > &aMat) |
| template<typename T> | |
| std::tuple< Matrix< T >, Matrix< T > > | kernelImage (Matrix< T > &aMat) |
| bool | file_exists (const std::string &aPath) |
| this function tests if a file exists | |
| std::string | search_data_file (const std::string &aFile, const std::string &aSubDirectory) |
| Resolve a data file named in an input file, looking below aSubDirectory of the shared data directory. | |
| std::string | make_path_parallel (const std::string &aPath) |
| this function takes a path and makes it parallel | |
| template<typename ET> | |
| auto | cross (const ET &aA, const ET &aB) -> decltype(arma::cross(aA, aB)) |
| template<typename T, typename ET> | |
| auto | cross (Vector< T > &aA, const ET &aB) -> decltype(arma::cross(aA.vector_data(), aB)) |
| template<typename ET, typename T> | |
| auto | cross (const ET &aA, const Vector< T > &aB) -> decltype(arma::cross(aA, aB.vector_data())) |
| template<typename T> | |
| auto | det (const T &A) -> decltype(arma::det(A)) |
| template<typename T> | |
| auto | det (T &A) -> decltype(arma::det(A)) |
| template<typename T> | |
| auto | dot (const Vector< T > &aA, const Vector< T > &aB) -> decltype(arma::dot(aA.vector_data(), aB.vector_data())) |
| Scalar product of two vectors. | |
| template<typename T> | |
| auto | dot (const Matrix< T > &aA, const Vector< T > &aB) -> decltype(arma::dot(aA.matrix_data(), aB.vector_data())) |
| Scalar product of a matrix and a vector, both read as flat sequences. | |
| template<typename T> | |
| auto | dot (const Vector< T > &aA, const Matrix< T > &aB) -> decltype(arma::dot(aA.vector_data(), aB.matrix_data())) |
| Scalar product of a vector and a matrix, both read as flat sequences. | |
| template<typename ET> | |
| auto | dot (const ET &aA, const ET &aB) -> decltype(arma::dot(aA, aB)) |
| template<typename T, typename ET> | |
| auto | dot (Vector< T > &aA, const ET &aB) -> decltype(arma::dot(aA.vector_data(), aB)) |
| template<typename ET, typename T> | |
| auto | dot (const ET &aA, const Vector< T > &aB) -> decltype(arma::dot(aA, aB.vector_data())) |
| int_t | eigen (const Matrix< real > &aMatrix, Vector< real > &aValues, const bool aAbortOnComplex=true) |
| Eigenvalues of a general (not necessarily symmetric) square matrix. | |
| void | eigen_sym (const Matrix< real > &aMatrix, Vector< real > &aValues) |
| Eigenvalues of a symmetric matrix. | |
| template<typename T> | |
| auto | inv (const T &aExpression) -> decltype(arma::inv(aExpression)) |
| template<typename T> | |
| void | linspace (const T &aStart, const T &aEnd, const belfem::size_t &aN, Vector< T > &aValues) |
| template<typename T> | |
| auto | linspace (const T &aStart, const T &aEnd, const belfem::size_t &aN) -> decltype(arma::linspace< arma::Mat< T > >(aStart, aEnd, aN)) |
| template<typename T> | |
| T | max (const Vector< T > &aVector) |
| template<typename T> | |
| T | max (const Matrix< T > &aMatrix) |
| template<typename T> | |
| T | max (const arma::Mat< T > &aMatrix) |
| template<typename T> | |
| T | min (const Vector< T > &aVector) |
| template<typename T> | |
| T | min (const Matrix< T > &aMatrix) |
| template<typename T> | |
| T | min (const arma::Mat< T > &aMatrix) |
| template<typename T> | |
| void | polyfit (const Vector< T > &aX, const Vector< T > &aY, const uint &aN, Vector< T > &aCoeffs) |
| template<typename T> | |
| bool | operator== (const Matrix< T > &aA, const Matrix< T > &aB) |
| template<typename T> | |
| bool | operator== (const T &aA, const Matrix< T > &aB) |
| template<typename T> | |
| bool | operator== (const Matrix< T > &aA, const T &aB) |
| template<typename T> | |
| auto | operator% (const Vector< T > &aA, const Vector< T > &aB) -> decltype(aA.vector_data() % aB.vector_data()) |
| template<typename T> | |
| auto | operator% (const arma::Mat< T > &aA, const arma::Mat< T > &aB) -> decltype(aA.data() % aB.data()) |
| template<typename T, typename ET> | |
| auto | operator% (const Vector< T > &aA, const ET &aB) -> decltype(aA.vector_data() % aB) |
| template<typename ET, typename T> | |
| auto | operator% (const ET &aA, const Vector< T > &aB) -> decltype(aA % aB.vector_data()) |
| template<typename T> | |
| bool | operator== (const Vector< T > &aA, const Vector< T > &aB) |
| template<typename T> | |
| bool | operator== (const T &aA, const Vector< T > &aB) |
| template<typename T> | |
| bool | operator== (const Vector< T > &aA, const T &aB) |
| template<typename ET> | |
| auto | cross (const ET &aA, const ET &aB) -> decltype(blaze::cross(aA, aB)) |
| template<typename T, typename ET> | |
| auto | cross (Vector< T > &aA, const ET &aB) -> decltype(blaze::cross(aA.vector_data(), aB)) |
| template<typename ET, typename T> | |
| auto | cross (const ET &aA, const Vector< T > &aB) -> decltype(blaze::cross(aA, aB.vector_data())) |
| template<typename T> | |
| auto | det (const T &A) -> decltype(blaze::det(A)) |
| template<typename T> | |
| auto | det (T &A) -> decltype(blaze::det(A)) |
| template<typename T> | |
| auto | dot (const Vector< T > &aA, const Vector< T > &aB) -> decltype(blaze::dot(aA.vector_data(), aB.vector_data())) |
| template<typename T> | |
| auto | dot (const Matrix< T > &aA, const Vector< T > &aB) -> decltype(blaze::dot(aA.matrix_data(), aB.vector_data())) |
| template<typename T> | |
| auto | dot (const Vector< T > &aA, const Matrix< T > &aB) -> decltype(blaze::dot(aA.vector_data(), aB.matrix_data())) |
| template<typename ET1, typename ET2> | |
| auto | dot (const ET1 &aA, const ET2 &aB) -> decltype(blaze::dot(aA, aB)) |
| template<typename MT, bool SO, bool SF, bool DF, typename ET> | |
| auto | dot (const blaze::Rows< MT, SO, SF, DF > &aA, const ET &aB) -> decltype(blaze::dot(blaze::row(aA, 0UL), aB)) |
| template<typename ET, typename MT, bool SO, bool SF, bool DF> | |
| auto | dot (const ET &aA, const blaze::Rows< MT, SO, SF, DF > &aB) -> decltype(blaze::dot(aA, blaze::row(aB, 0UL))) |
| template<typename MT1, bool SO1, bool SF1, bool DF1, typename MT2, bool SO2, bool SF2, bool DF2> | |
| auto | dot (const blaze::Rows< MT1, SO1, SF1, DF1 > &aA, const blaze::Rows< MT2, SO2, SF2, DF2 > &aB) -> decltype(blaze::dot(blaze::row(aA, 0UL), blaze::row(aB, 0UL))) |
| template<typename MT, bool SO, bool SF, bool DF, typename T> | |
| T | dot (const blaze::Rows< MT, SO, SF, DF > &aA, const Vector< T > &aB) |
| template<typename T, typename MT, bool SO, bool SF, bool DF> | |
| T | dot (const Vector< T > &aA, const blaze::Rows< MT, SO, SF, DF > &aB) |
| template<typename MT, bool SO, bool SF, bool DF, typename ET> | |
| auto | dot (const blaze::Columns< MT, SO, SF, DF > &aA, const ET &aB) -> decltype(blaze::dot(blaze::column(aA, 0UL), aB)) |
| template<typename ET, typename MT, bool SO, bool SF, bool DF> | |
| auto | dot (const ET &aA, const blaze::Columns< MT, SO, SF, DF > &aB) -> decltype(blaze::dot(aA, blaze::column(aB, 0UL))) |
| template<typename MT1, bool SO1, bool SF1, bool DF1, typename MT2, bool SO2, bool SF2, bool DF2> | |
| auto | dot (const blaze::Columns< MT1, SO1, SF1, DF1 > &aA, const blaze::Columns< MT2, SO2, SF2, DF2 > &aB) -> decltype(blaze::dot(blaze::column(aA, 0UL), blaze::column(aB, 0UL))) |
| template<typename MT, bool SO, bool SF, bool DF, typename T> | |
| T | dot (const blaze::Columns< MT, SO, SF, DF > &aA, const Vector< T > &aB) |
| template<typename T, typename MT, bool SO, bool SF, bool DF> | |
| T | dot (const Vector< T > &aA, const blaze::Columns< MT, SO, SF, DF > &aB) |
| template<typename MT1, bool SO1, bool SF1, bool DF1, typename MT2, bool SO2, bool SF2, bool DF2> | |
| auto | dot (const blaze::Rows< MT1, SO1, SF1, DF1 > &aA, const blaze::Columns< MT2, SO2, SF2, DF2 > &aB) -> decltype(blaze::dot(blaze::row(aA, 0UL), blaze::column(aB, 0UL))) |
| template<typename MT1, bool SO1, bool SF1, bool DF1, typename MT2, bool SO2, bool SF2, bool DF2> | |
| auto | dot (const blaze::Columns< MT1, SO1, SF1, DF1 > &aA, const blaze::Rows< MT2, SO2, SF2, DF2 > &aB) -> decltype(blaze::dot(blaze::column(aA, 0UL), blaze::row(aB, 0UL))) |
| template<typename T, typename ET> | |
| auto | dot (const Vector< T > &aA, const ET &aB) -> decltype(blaze::dot(aA.vector_data(), aB)) |
| template<typename ET, typename T> | |
| auto | dot (const ET &aA, const Vector< T > &aB) -> decltype(blaze::dot(aA, aB.vector_data())) |
| template<typename T, typename = blaze::EnableIf_t< blaze::IsMatrix_v< T > >> | |
| blaze::DynamicMatrix< blaze::ElementType_t< T >, BLAZE_DEFAULT_STORAGE_ORDER > | inv (const T &aExpression) |
| template<typename T> | |
| Vector< T > | linspace (const T &aStart, const T &aEnd, const belfem::size_t &aN) |
| template<typename T> | |
| T | max (const blaze::Columns< blaze::DynamicMatrix< T, BLAZE_DEFAULT_STORAGE_ORDER >, true, true, false > &aColumn) |
| template<typename T> | |
| T | max (const blaze::Rows< blaze::DynamicMatrix< T, BLAZE_DEFAULT_STORAGE_ORDER >, false, true, false > &aColumn) |
| template<typename T> | |
| T | min (const blaze::Columns< blaze::DynamicMatrix< T, BLAZE_DEFAULT_STORAGE_ORDER >, true, true, false > &aColumn) |
| template<typename T> | |
| T | min (const blaze::Rows< blaze::DynamicMatrix< T, BLAZE_DEFAULT_STORAGE_ORDER >, false, true, false > &aColumn) |
| template<typename T> | |
| blaze::DynamicVector< T, blaze::columnVector > | operator% (const Vector< T > &aA, const Vector< T > &aB) |
| template<typename T> | |
| void | append (Vector< T > &aA, Vector< T > &aB) |
| Appends one vector onto the end of another, in place. | |
| template<typename T> | |
| void | append (Vector< T > &aA, const Vector< T > &aB) |
| template<typename T> | |
| void | combine (const Vector< T > &aA, const Vector< T > &aB, Vector< T > &aC) |
| template<typename T> | |
| void | combine (const Vector< T > &aA, const Vector< T > &aB, const Vector< T > &aC, Vector< T > &aD) |
| template<typename T> | |
| void | combine (const Vector< T > &aA, const Vector< T > &aB, const Vector< T > &aC, const Vector< T > &aD, Vector< T > &aE) |
| template<typename T> | |
| auto | cross (const Vector< T > &aA, const Vector< T > &aB) -> decltype(cross(aA.vector_data(), aB.vector_data())) |
| Cross product of two length-3 vectors. | |
| void | crossmat (const Vector< real > &aN, const Matrix< real > &aA, Vector< real > &aNxA) |
| Crosses a normal vector with every column of a matrix, 2D. | |
| void | crossmat (const Vector< real > &aN, const Matrix< real > &aA, const real aScale, Vector< real > &aNxA) |
| Crosses a normal vector with every column of a matrix, 2D, scaled. | |
| void | crossmat (const Vector< real > &aN, const Matrix< real > &aA, Matrix< real > &aNxA) |
| Crosses a normal vector with every column of a matrix, 3D. | |
| void | crossmat (const Vector< real > &aN, const Matrix< real > &aA, const real aScale, Matrix< real > &aNxA) |
| Crosses a normal vector with every column of a matrix, 3D, scaled. | |
| template<typename T> | |
| T | ddpolyval (const Vector< T > &aCoeffs, const T aX) |
| Evaluates the second derivative of a polynomial at one point. | |
| template<typename T> | |
| auto | det (const Matrix< T > &aA) -> decltype(det(aA.matrix_data())) const |
| Determinant of a square matrix. | |
| template<typename T> | |
| auto | det (Matrix< T > &aA) -> decltype(det(aA.matrix_data())) |
| template<typename T> | |
| T | dpolyval (const Vector< T > &aCoeffs, const T aX) |
| Evaluates the first derivative of a polynomial at one point. | |
| template<typename T> | |
| auto | inv (const Matrix< T > &aA) -> decltype(inv(aA.matrix_data())) const |
| Inverse of a square matrix. | |
| template<typename T> | |
| auto | inv (Matrix< T > &aA) -> decltype(inv(aA.matrix_data())) |
| real | inv2 (const Matrix< real > &aA, Matrix< real > &aB) |
| Inverse of a 2x2 matrix from the closed-form adjugate. | |
| real | inv3 (const Matrix< real > &aA, Matrix< real > &aB) |
| Inverse of a 3x3 matrix from the closed-form adjugate. | |
| template<typename T> | |
| auto | norm (const Vector< T > &aA) -> decltype(norm(aA.vector_data())) |
| Euclidean (L2) norm of a vector. | |
| template<typename T> | |
| T | polyval (const Vector< T > &aCoeffs, const T aX) |
| Evaluates a polynomial at one point, by Horner's scheme. | |
| template<typename T> | |
| void | polyval (const Vector< T > &aCoeffs, const Vector< T > &aX, Vector< T > &aY) |
| real | r2 (const Vector< real > &aApproximated, const Vector< real > &aExact) |
| calculates the R2 coefficient of determination from values of an evaluated function with respect to given samples. | |
| real | r2 (const Matrix< real > &aApproximated, const Matrix< real > &aExact) |
| template<typename T> | |
| auto | reverse (const Vector< T > &aA) -> decltype(reverse(aA.vector_data())) |
| template<typename T> | |
| void | sort (Vector< T > &aVector) |
| Sorts a vector in place, in ascending order. | |
| template<typename T> | |
| auto | sum (const Vector< T > &aA) -> decltype(sum(aA.vector_data())) |
| template<typename T> | |
| Cell< T > | to_cell (const Vector< T > &aVector) |
| convert a Vector< T > into a Cell< T > | |
| template<typename T> | |
| Vector< T > | to_vector (const Cell< T > &aCell) |
| convert a Cell< T > into a Vector< T > | |
| template<typename T> | |
| auto | trans (Matrix< T > &aMatrix) -> decltype(trans(aMatrix.matrix_data())) |
| template<typename T> | |
| auto | trans (const Matrix< T > &aMatrix) -> decltype(trans(aMatrix.matrix_data())) |
| template<typename T> | |
| void | unique (Vector< T > &aVector) |
| Sorts a vector in place and drops duplicate entries. | |
| template<typename T> | |
| int_t | gees (Matrix< T > &A, Vector< lapack::cplx_t< T > > &W, Matrix< T > &VS, Vector< lapack::real_t< T > > &Work, Vector< int_t > &BWork, lapack::gees_select_t< T > select=nullptr, const char jobvs='V', const char sort='N', int_t *aSdim=nullptr, const bool AbortOnError=true) |
| Schur decomposition of a general square matrix via LAPACK ?gees: A = Z * T * Z^T for the real flavors, A = Z * T * Z^H for the complex ones. | |
| template<typename T> | |
| int_t | geev (Matrix< T > &A, Vector< lapack::cplx_t< T > > &W, Matrix< T > &VL, Matrix< T > &VR, Vector< lapack::real_t< T > > &Work, const char jobvl='V', const char jobvr='V', const bool AbortOnError=true) |
| eigenvalues and eigenvectors of a general square matrix, A * v = lambda * v, via LAPACK ?geev | |
| template<typename T> | |
| int_t | geev (Matrix< T > &A, Vector< lapack::cplx_t< T > > &W, Vector< lapack::real_t< T > > &Work, const bool AbortOnError=true) |
| eigenvalues only of a general square matrix, see the full version above | |
| template<typename T> | |
| int_t | gels (Matrix< T > &A, Vector< T > &B, Vector< T > &Work, const bool AbortOnError=true) |
| solve the least squares problem min || A * x - b || via LAPACK ?gels ( QR or LQ factorization, A must have full rank ) | |
| template<typename T> | |
| int_t | gels (Matrix< T > &A, Matrix< T > &B, Vector< T > &Work, const bool AbortOnError=true) |
| solve min || A * X - B || for multiple right hand sides, see the single right hand side version above | |
| template<typename T> | |
| void | gemm (const Matrix< T > &A, const Matrix< T > &B, Matrix< T > &C, const T alpha=1.0, const T beta=0.0, const char transa='N', const char transb='N') |
| matrix-matrix product C := alpha * op(A) * op(B) + beta * C via BLAS ?gemm, where op is the identity ( trans = 'N' ) or the ( conjugate ) transpose ( 'T' / 'C' ) | |
| template<typename T> | |
| int_t | gesv (Matrix< T > &A, Vector< T > &B, Vector< int_t > &Pivot, const bool AbortOnError=true) |
| solve the square linear system A * x = b via LAPACK ?gesv ( LU factorization with partial pivoting ) | |
| template<typename T> | |
| int_t | gesv (Matrix< T > &A, Matrix< T > &B, Vector< int_t > &Pivot, const bool AbortOnError=true) |
| solve A * X = B for multiple right hand sides via LAPACK ?gesv, see the vector version above | |
| template<typename T> | |
| int_t | gesvd (Matrix< T > &A, Vector< lapack::real_t< T > > &S, Matrix< T > &U, Matrix< T > &VT, Vector< lapack::real_t< T > > &Work, const char jobu='A', const char jobvt='A', const bool AbortOnError=true) |
| singular value decomposition A = U * diag( S ) * VT via LAPACK ?gesvd | |
| template<typename T> | |
| int_t | getrf (Matrix< T > &A, Vector< int_t > &Pivot, const bool AbortOnError=true) |
| LU factorization with partial pivoting via LAPACK ?getrf, A = P * L * U; use together with getri() to invert a matrix. | |
| template<typename T> | |
| int_t | getri (Matrix< T > &A, Vector< int_t > &Pivot, Vector< T > &Work, const bool AbortOnError=true) |
| invert a square matrix in place via LAPACK ?getri, using the LU factorization computed by getrf() | |
| template<typename T> | |
| int_t | posv (Matrix< T > &A, Vector< T > &B, const bool AbortOnError=true) |
| solve A * x = b for a symmetric ( real ) or Hermitian ( complex ) positive definite matrix via LAPACK ?posv ( Cholesky factorization, no pivoting ) | |
| template<typename T> | |
| int_t | posv (Matrix< T > &A, Matrix< T > &B, const bool AbortOnError=true) |
| solve A * X = B for multiple right hand sides of a symmetric ( real ) or Hermitian ( complex ) positive definite matrix, see the vector version above | |
| template<typename T> | |
| auto | operator- (const Matrix< T > &aA, const Matrix< T > &aB) -> decltype(aA.matrix_data() - aB.matrix_data()) |
| template<typename A, typename B> | |
| auto | operator- (const Matrix< A > &aA, const B &aB) -> decltype(aA.matrix_data() - aB) |
| template<typename A, typename B> | |
| auto | operator- (const A &aA, const Matrix< B > &aB) -> decltype(aA - aB.matrix_data()) |
| template<typename T> | |
| auto | operator+ (const Matrix< T > &aA, const Matrix< T > &aB) -> decltype(aA.matrix_data()+aB.matrix_data()) |
| template<typename A, typename B> | |
| auto | operator+ (const Matrix< A > &aA, const B &aB) -> decltype(aA.matrix_data()+aB) |
| template<typename A, typename B> | |
| auto | operator+ (const A &aA, const Matrix< B > &aB) -> decltype(aA+aB.matrix_data()) |
| template<typename T> | |
| auto | operator* (const Matrix< T > &aA, const Matrix< T > &aB) -> decltype(aA.matrix_data() *aB.matrix_data()) |
| template<typename T> | |
| auto | operator* (const Matrix< T > &aA, const Vector< T > &aB) -> decltype(aA.matrix_data() *aB.vector_data()) |
| template<typename A, typename B> | |
| auto | operator* (const Matrix< A > &aA, const B &aB) -> decltype(aA.matrix_data() *aB) |
| template<typename A, typename B> | |
| auto | operator* (const A &aA, const Matrix< B > &aB) -> decltype(aA *aB.matrix_data()) |
| template<typename T> | |
| auto | operator/ (const Vector< T > &aA, const T &aB) -> decltype(aA.vector_data()/aB) |
| template<typename T> | |
| auto | operator- (const Vector< T > &aA, const Vector< T > &aB) -> decltype(aA.vector_data() - aB.vector_data()) |
| template<typename A, typename B> | |
| auto | operator- (const Vector< A > &aA, const B &aB) -> decltype(aA.vector_data() - aB) |
| template<typename A, typename B> | |
| auto | operator- (const A &aA, const Vector< B > &aB) -> decltype(aA - aB.vector_data()) |
| template<typename T> | |
| auto | operator+ (const Vector< T > &aA, const Vector< T > &aB) -> decltype(aA.vector_data()+aB.vector_data()) |
| template<typename A, typename B> | |
| auto | operator+ (const Vector< A > &aA, const B &aB) -> decltype(aA.vector_data()+aB) |
| template<typename A, typename B> | |
| auto | operator+ (const A &aA, const Vector< B > &aB) -> decltype(aA+aB.vector_data()) |
| template<typename A, typename B> | |
| auto | operator* (const Vector< A > &aA, const B &aB) -> decltype(aA.vector_data() *aB) |
| template<typename A, typename B> | |
| auto | operator* (const A &aA, const Vector< B > &aB) -> decltype(aA *aB.vector_data()) |
| template<typename T> | |
| Quaternion< T > | operator+ (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| Quaternion< T > | operator- (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| Quaternion< T > | operator* (const Quaternion< T > &aLHS, T aScalar) |
| template<typename T> | |
| Quaternion< T > | operator* (T aScalar, const Quaternion< T > &aRHS) |
| template<typename T> | |
| Quaternion< T > | operator/ (const Quaternion< T > &aLHS, T aScalar) |
| template<typename T> | |
| Quaternion< T > | operator* (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| bool | operator== (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| bool | operator!= (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| T | dot (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| Quaternion< T > | cross (const Quaternion< T > &aLHS, const Quaternion< T > &aRHS) |
| template<typename T> | |
| Quaternion< T > | slerp (const Quaternion< T > &aQ1, const Quaternion< T > &aQ2, T aT) |
| Spherical linear interpolation between two quaternions. | |
| template<typename T> | |
| Quaternion< T > | quaternion_from_rotation_matrix (const Matrix< T > &aMatrix) |
| Extract a unit quaternion from a 3x3 rotation matrix. | |
| template<typename T> | |
| void | quaternion_rotate_vector (const Quaternion< T > &aQ, const Vector< T > &aVector, Vector< T > &aResult) |
| Rotate a 3D vector by a unit quaternion (optimized, in-place). | |
| template<typename T> | |
| void | quaternion_to_rotation_matrix (const Quaternion< T > &aQ, Matrix< T > &aMatrix) |
| Convert a unit quaternion to a 3x3 rotation matrix. | |
| template<typename T> | |
| Tensor< T > | operator+ (const Tensor< T > &aB, const Tensor< T > &aC) |
| template<typename T> | |
| Tensor< T > | operator- (const Tensor< T > &aB, const Tensor< T > &aC) |
| template<typename T> | |
| Tensor< T > | operator% (const Tensor< T > &aA, const Tensor< T > &aB) |
| template<typename T> | |
| Matrix< T > | operator% (const Tensor< T > &aA, const Matrix< T > &aB) |
| template<typename T> | |
| bool | operator== (const Tensor< T > &aA, const Tensor< T > &aB) |
| template<typename T> | |
| void | compliance_matrix (const T &aE1, const T &aE2, const T &aE3, const T &aNu23, const T &aNu13, const T &aNu12, const T &aG23, const T &aG31, const T &aG12, Matrix< T > &aS) |
| template<typename T> | |
| void | ddot (const Tensor< T > &aA, const Tensor< T > &aB, Tensor< T > &aC) |
| template<typename T> | |
| void | ddot (const Tensor< T > &aA, const Matrix< T > &aB, Matrix< T > &aC) |
| template<typename T> | |
| void | fiber_polarization (const Matrix< T > &aC, Tensor< T > &aP) |
| create the Hill polarization tensor P for a unidirectional fiber (transversely isotropic host); the Eshelby tensor follows as S = P : C. | |
| template<typename T> | |
| void | kelvin_christoffel (const Tensor< T > &aA, const Vector< T > &aB, Matrix< T > &aC) |
| template<typename T> | |
| void | rotate (const Tensor< T > &aB, const Matrix< T > &aR, Tensor< T > &aA) |
| template<typename T> | |
| void | cardano (const T a, const T b, const T c, const T d, Vector< T > &X) |
| solve a cubic equation a*x^3 + b*x^2 + c*x + d = 0 for its real roots (Cardano / trigonometric method). | |
| template<typename T> | |
| void | cardano (const Vector< T > &A, Vector< T > &X) |
| void | circle_from_points (const Vector< real > &aX, const Vector< real > &aY, Vector< real > &aCircle) |
| void | create_beam_poly (const real aX1, const real aF1, const real adF1dX, const real aX2, const real aF2, const real adF2dX, Vector< real > &aCoefficients, Matrix< real > &aWork, Vector< int_t > &aPivot) |
| void | create_beam_poly (const real aX1, const real aF1, const real adF1dX, const real aX2, const real aF2, const real adF2dX, Vector< real > &aCoefficients) |
| void | create_fifth_order_beam_poly (const real aX1, const real aF1, const real adF1dX, const real ad2F1dX, const real aX2, const real aF2, const real adF2dX, const real ad2F2dX, Vector< real > &aCoefficients, Matrix< real > &aWork, Vector< int_t > &aPivot) |
| void | create_fifth_order_beam_poly (const real aX1, const real aF1, const real adF1dX, const real ad2F1dX, const real aX2, const real aF2, const real adF2dX, const real ad2F2dX, Vector< real > &aCoefficients) |
| template<typename T> | |
| void | cubic_bezier (const Matrix< T > &aPoints, Vector< T > &aWork, const T &aXi, Vector< T > &aPoint) |
| template<typename T> | |
| void | cubic_bezier_derivative (const Matrix< T > &aPoints, Vector< T > &aWork, const T &aXi, Vector< T > &aPoint) |
| template<typename T> | |
| void | ferrari (const Vector< T > &A, Vector< T > &X) |
| solve a quartic equation A(0)*x^4 + A(1)*x^3 + A(2)*x^2 + A(3)*x + A(4) = 0 for its real roots using Ferrari's method. | |
| void | find_interval (const Vector< real > &aData, const real aValue, index_t &aIndex, real &aXi) |
| template<typename T> | |
| void | hessian (const Matrix< T > &J, const Matrix< T > &K, Matrix< T > &H) |
| Assemble the 9x9 chain-rule matrix H that maps physical first and second shape-function derivatives onto reference-space first and second derivatives for a 3D isoparametric element: | |
| template<typename T> | |
| T | quadratic_gradient (const Vector< T > &aF, const Vector< T > &aX, const index_t aIndex=1) |
| compute the derivative of F to X at index | |
| template<typename T> | |
| void | rotation_matrix (const Vector< T > &aAxis, const T &aAngle, Matrix< real > &aMatrix) |
| rotate around an axis with an angle | |
| template<typename T> | |
| void | rotation_matrix_strip (const Vector< T > &aAxis, const T &aAngle, Matrix< real > &aMatrix) |
| template<typename T> | |
| void | rotation_matrix (const T &aYaw, const T &aPitch, const T &aRoll, Matrix< real > &aMatrix) |
| rotate using euler angles project from body to global according to DIN 9300 | |
| template<typename T> | |
| T | sign (const T aX) |
| template<typename T> | |
| void | symratiospace (const T &aXmin, const T &aXmax, const T &aRatio, const index_t aN, Vector< T > &aX) |
| string | to_string (const DomainType aDomainType) |
| DomainType | domain_type (const string &aString) |
| EntityType | entity_type (const string &aFieldLabel) |
| guesses the type of the entity based on the passed field | |
| string | to_string (const EntityType aEntityType) |
| void | ratio_ar2 (const real &aDeltaX0, const real &aLength, const index_t &aNumCells, Vector< real > &aX) |
| void | ratio_adx2 (const real &aRatio, const real &aLength, const index_t &aNumCells, Vector< real > &aX) |
| real | _check_ratio (const real &aDeltaX0, const real &aLength, const index_t &aNumCells, const real &aRatio) |
| std::string | to_string (const GeometryType aGeometryType) |
| std::string | to_string (const ElementType aElementType) |
| ElementType | element_type (const std::string &aStr) |
| string | to_string (const IntegrationScheme &aIntegrationScheme) |
| IntegrationScheme | string_to_integration_scheme (const string &aString) |
| void | intpoints (const enum IntegrationScheme aIntegrationScheme, const enum GeometryType aGeometryType, const uint aOrder, Vector< real > &aWeights, Matrix< real > &aPoints) |
| uint | auto_integration_order (const ElementType aType) |
| tries to automatically detect the appropriate integration order | |
| SourceFunctionType | boundary_condition_function_type (const string &aString) |
| void | create_glue_poly (const real &aX, const real &aDeltaX, const Vector< real > &aF, Vector< real > &aC) |
| consider an element such as | |
| template<typename T> | |
| void | create_truss_poly (const Vector< T > &aX, const Vector< T > &aF, Vector< T > &aC) |
| create a polynomial so that f = a*x^3 + b*x^2 + c*x + d | |
| string | to_string (const MaterialProperty aProperty) |
| Convert material property enum to string. | |
| unit | get_unit (const MaterialProperty aProperty) |
| Get the SI unit for a material property. | |
| Mesh * | create_database_mesh (const uint aOrder=2) |
| bool | rho_database_is_current (const string &aPath) |
| Test whether a cached rho database was written by the current format. | |
| Vector< real > | operator* (SpMatrix &aA, const Vector< real > &aX) |
| multiply operator | |
| string | to_string (const SolverType aSolverType) |
| SolverType | solver_type (const string &aString) |
| string | to_string (const DistributedMatrixType aDistributedMatrixType) |
| DistributedMatrixType | distributed_matrix_type (const string &aString) |
| DistributedMatrixType | distributed_matrix_format (const string &aString) |
| string | to_string (const EulerMethod aEulerMethod) |
| EulerMethod | euler_method (const string &aString) |
| string | to_string (const Preconditioner aPreconditioner) |
| Preconditioner | preconditioner (const string &aString) |
| string | to_string (const KrylovMethod aKrylovMethod) |
| KrylovMethod | krylov_method (const string &aString) |
| string | to_string (const ReorderingMethod aReorderingMethod) |
| ReorderingMethod | reordering_method (const string &aString) |
| string | to_string (const CompressionMethod aCompressionMethod) |
| CompressionMethod | compression_method (const string &aString) |
| string | to_string (const MumpsSerialReodrdering aSerialReodrdering) |
| MumpsSerialReodrdering | serial_reordering (const string &aString) |
| std::string | to_string (const MumpsParallelReodrdering aParallelReodrdering) |
| MumpsParallelReodrdering | parallel_reordering (const string &aString) |
| string | to_string (const MumpsBlockLowRanking aBLR) |
| MumpsBlockLowRanking | block_low_ranking (const string &aString) |
| SpMatrixType | matrix_type (const SolverType aType) |
| SpMatrixType | preferred_matrix_format (SolverType aSolver) |
| real | rcond (SpMatrix &aMatrix) |
| string | petsctools_error_message (const PetscErrorCode aStatus) |
| PetscErrorCode | petsctools_allocate_vector (MPI_Comm aComm, Vec &aVec, const PetscInt aGlobalLength, const PetscInt aLocalLength) |
| PetscErrorCode | petsctools_set_vector (const Vector< PetscReal > &aVector, const Vector< PetscInt > &aIndices, Vec &aVec) |
| convert a BELFEM vector to a PETSC vector aVac must have been initialized. | |
| PetscErrorCode | petsctools_get_vector (Vec &aVec, const Vector< PetscInt > &aIndices, Vector< PetscReal > &aVector) |
| convert a PETSC vector to a BELFEM vector | |
| PetscErrorCode | petsctools_get_local_vector (Vec &aVec, Vector< PetscReal > &aVector) |
| Extract the local portion of a distributed PETSC vector to a BELFEM vector. | |
| PetscErrorCode | petsctools_set_local_vector (const Vector< PetscReal > &aVector, Vec &aVec) |
| Set the local portion of a distributed PETSC vector from a BELFEM vector. | |
| PetscErrorCode | petsctools_create_matrix (sparse::PETScAIJ *aDistMatrix, Mat &aMat) |
| PetscErrorCode | petsctools_update_matrix (sparse::PETScAIJ *aDistMatrix, Mat &aMat) |
| PetscErrorCode | petsctools_link_matrix (COMM_TYPE aComm, SpMatrix &aMatrix, Mat &aMat) |
| PetscErrorCode | petsctools_notify_matrix_update (Mat &aMat) |
Variables | |
| constexpr int | gMaxCommChunkLength = 64 * 1024 |
| const std::string | gLongName = "BELFEM -- The Berkeley Lab Finite Element Framework" |
| const std::string | gURL = "http://belfem.lbl.gov" |
| greal | gTbulk |
| greal | gRhoMin |
| minimim resistrivity in Ohm*m, default: 0 | |
| greal | gRhoMax |
| maximim resistrivity in Ohm*m, default: 1e10 | |
| gstring | gBelfemDataPath |
| path to belfem data files, set by environment variable $BELFEM_DATA | |
| constexpr index_t | gNoIndex = std::numeric_limits<index_t>::max() |
| constexpr id_t | gNoID = std::numeric_limits<id_t>::max() |
| constexpr proc_t | gNoOwner = std::numeric_limits<proc_t>::max() |
| constexpr real | gTfreeze = 273.15 |
| constexpr real | gTref = 288.15 |
| constexpr real | gTroom = 293.15 |
| constexpr real | gTmin = 1.0 |
| constexpr real | gFinDiffDeltaT = 0.001 |
| constexpr real | gFinDiffDeltaB = 0.001 |
| constexpr real | gFinDiffDeltaAngle = 1.74532925199433e-3 |
| constexpr real | BELFEM_EPSILON = 10 * std::numeric_limits<real>::epsilon() |
| constexpr real | BELFEM_EPS = std::numeric_limits<real>::epsilon() |
| constexpr real | BELFEM_MESH_EPSILON = 1e-9 |
| struct belfem::OpVertexDegree | opVertexDegree |
| struct belfem::OpVertexID | opVertexID |
| struct belfem::OpVertexIndex | opVertexIndex |
| struct belfem::OpVertexLevel | opVertexLevel |
| struct belfem::OpVertexOwner | opVertexOwner |
| constexpr real | gTAlphaSwitchMax = 273.15 |
| Upper bound for the thermal expansion split temperature [K]. | |
| constexpr size_t | gNumNonConstantMaterialProperties = static_cast< size_t >( MaterialProperty::T_crit ) |
| Number of non-constant material properties. | |
| constexpr size_t | gNumMaterialProperties = static_cast< size_t >( MaterialProperty::UNDEFINED ) |
| Total number of material properties. | |
| const SolverType | gDefaultSolver = SolverType::UNDEFINED |
USER GUIDES:
look at : o src/fem/maxwell/matrices/mt_maxwell_phi.cpp o cl_IWG_StaticHeatConduction.cpp
if one adds new parameters, they must also be initialized in Communicator::set_globals()
recommendation: use BELFEM_QUIET_NAN if there is no clear default value
if the value is not set on all procs, set value on master (aka root proc ) and synchronize using
broadcast( T & value );
| typedef int belfem::comm_t |
| typedef std::complex<real> belfem::cplx |
| typedef Cell< graph::Vertex * > belfem::Graph |
| typedef int belfem::herr_t |
| typedef int belfem::hid_t |
| typedef int belfem::hsize_t |
| typedef unsigned int belfem::id_t |
| typedef uint32_t belfem::index_t |
| typedef int32_t belfem::int_t |
| typedef __uint128_t belfem::key128_t |
| typedef long long unsigned int belfem::key_t |
| typedef long long unsigned int belfem::lluint |
| typedef long int belfem::lsint |
| typedef long unsigned int belfem::luint |
| typedef Bitset< static_cast< size_t >( MaterialDependency::UNDEFINED ) > belfem::MaterialDependencyBitset |
Bitset for tracking material property dependencies.
| typedef int belfem::metis_t |
| typedef int belfem::proc_t |
| typedef double belfem::real |
| typedef int belfem::scotch_t |
| typedef int belfem::sint |
| typedef size_t belfem::size_t |
| typedef std::string belfem::string |
| typedef short unsigned int belfem::suint |
| typedef unsigned char belfem::uchar |
| typedef unsigned int belfem::uint |
| typedef std::array< real, 7 > belfem::unit |
| typedef std::pair< real, unit > belfem::value |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
how an eigenvalue diagnostic ended. The MASTER decides this and BROADCASTS it: every branch that may call run() again has to be taken from the same value on every rank, or the ranks part company inside a collective. Deriving it rank-locally from Ritz data is NOT safe – in a multi-rank build without PARPACK the workers' Ritz buffers are stale by construction ( see lambda_real() below )
|
strong |
Element types.
Numeric values follow gmsh where a gmsh type exists ( QUAD16 = 32 deviates from gmsh's 36; element_type_from_gmsh() in meshtools.cpp bridges that; the *TS and HEX8TB values are BELFEM extensions ). must not be bigger than 255
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
All material properties that can be defined.
Properties are organized by category:
|
strong |
Material classification based on physical behavior.
Material types determine which properties are available and their dependencies:
| Enumerator | |
|---|---|
| UserDefined | |
| Ferro | |
| HTS | |
| PureMetal | |
| LookupAlloy | |
| CompositeAlloy | |
| NonMetal | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
E-J law used for a superconductor's resistivity.
PowerLaw — power-law channel parallel to the normal-state channel ( Duron et al. 2004 ); the historical default. Piecewise — three-regime law: raw power law, Bézier flux-flow blend, normal state ( Rhyner 1993 exponent, log-log blend ). Riva — same parallel model as PowerLaw, but total over the full jc/n table range ( Riva 2021, EPFL thesis 8754 ): guarded against dead defects, under-/overflow and n → 1.
| Enumerator | |
|---|---|
| PowerLaw | |
| Piecewise | |
| Riva | |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| real belfem::_check_ratio | ( | const real & | aDeltaX0, |
| const real & | aLength, | ||
| const index_t & | aNumCells, | ||
| const real & | aRatio ) |
| void belfem::allreduce | ( | const T * | aSend, |
| T * | aRecv, | ||
| const int | aCount ) |
Collective MAX-reduction visible on every rank.
The reduction operation is MPI_MAX and deliberately not a parameter: the wrapper exists to keep vendor tokens out of the solver files, and the sites it serves ( solver verdicts, test exit codes ) all fold "worst rank wins". A SUM consumer extends this file rather than passing an MPI_Op through it; the MIN sibling is allreduce_min() below.
The count is MPI's own int, not int_t: the MPI-3 C binding takes int, and under BELFEM_INT64 an int_t count would narrow silently above 2^31-1. Payloads here are a few elements - bulk data goes through the chunked share / receive pair, as everywhere else.
Collective over gComm.world(); every rank must call it, after gComm.init() like every other collective in this file.
| void belfem::allreduce_min | ( | const T * | aSend, |
| T * | aRecv, | ||
| const int | aCount ) |
Collective MIN-reduction visible on every rank.
The MIN sibling of allreduce(), for the sites that fold "the most constrained rank decides" – a per-process memory budget, where a rank that could not measure ( 0 ) must pull every rank to 0 rather than be outvoted. Same contract as allreduce(): arithmetic types, MPI's own int for the count, collective over gComm.world().
| uint belfem::auto_integration_order | ( | const ElementType | aType | ) |
tries to automatically detect the appropriate integration order
| aType |
| std::size_t belfem::available_memory | ( | ) |
Bytes a new allocation by this process can claim without swapping, or 0 when that cannot be established.
Linux: the kernel's MemAvailable estimate ( /proc/meminfo, kB ), NOT sysinfo().freeram – "free" excludes the reclaimable page cache, and on a workstation with a warm cache the two differ by an order of magnitude. Capped by the tightest cgroup memory limit above this process ( v2 memory.max / memory.current, v1 memory.limit_in_bytes / memory.usage_in_bytes ), because a batch scheduler enforces that limit and the host figure would overstate what the job may take. Darwin: Mach host statistics, free plus inactive pages. Other platforms: 0.
Setup-path code: the file reads are the one-off allocation doc/coding_philosophy.md allows there. Never aborts – a consumer treats 0 as "unknown" and falls back to whatever it did before.
| std::string belfem::basename | ( | const std::string & | aFilePath | ) |
returns the basename of a file
| MumpsBlockLowRanking belfem::block_low_ranking | ( | const string & | aString | ) |
| SourceFunctionType belfem::boundary_condition_function_type | ( | const string & | aString | ) |
Broadcasts a cell to all processes.
| T | The type of the cell elements. |
| aData | The cell to broadcast. |
| aRoot | The root process rank (default is 0). |
Broadcasts a matrix to all processes.
| T | The type of the matrix elements. |
| aData | The matrix to broadcast. |
| aRoot | The root process rank (default is 0). |
| void belfem::broadcast | ( | T & | aMessage, |
| const proc_t | aRoot = 0, | ||
| typename std::enable_if< is_scalar< T >::value >::type * | = nullptr ) |
Broadcasts a scalar value to all processes.
| T | The type of the scalar. |
| aMessage | The scalar to broadcast. |
| aRoot | The root process rank (default is 0). |
| void belfem::broadcast | ( | T * | aMessage, |
| const proc_t | aRoot, | ||
| const proc_t | aLength ) |
Broadcasts a vector to all processes.
| T | The type of the vector elements. |
| aData | The vector to broadcast. |
| aRoot | The root process rank (default is 0). |
| void belfem::cardano | ( | const T | a, |
| const T | b, | ||
| const T | c, | ||
| const T | d, | ||
| Vector< T > & | X ) |
solve a cubic equation a*x^3 + b*x^2 + c*x + d = 0 for its real roots (Cardano / trigonometric method).
Returns the distinct real roots in X, sorted ascending: 1 root for positive discriminant, 3 for the casus irreducibilis, 1 or 2 for repeated roots, and 0-2 via the quadratic/linear cascade when the leading coefficients vanish. Complex roots are never returned.
Caveats (audited 2026-07-23, Claude Fable + Codex, all live branches verified correct in exact arithmetic):
check if a value has the correct unit
| std::tuple< bool, uint, uint, int > belfem::checkForDivisibility | ( | Matrix< int > & | aMat, |
| const uint | k ) |
|
inline |
| std::string belfem::clean_string | ( | const std::string & | aString | ) |
tidy up the string
Collects matrices from all processes into a cell.
| T | The type of the matrix elements. |
| aData | The cell to store collected matrices. |
| void belfem::collect | ( | Cell< T > & | aData, |
| const T | aMyValue = 0 ) |
Collects scalar values from all processes into a cell.
| T | The type of the scalar. |
| aData | The cell to store collected values. |
| aMyValue | The value from the current process (default is 0). |
Collects vectors from all processes into a cell.
| T | The type of the vector elements. |
| aData | The cell to store collected vectors. |
| aMyData | The vector contributed by this process. |
| void belfem::collect | ( | T * | aData, |
| const Vector< U > & | aOffsets ) |
| void belfem::collect | ( | Vector< T > & | aData, |
| const T | aMyValue = 0 ) |
Collects scalar values from all processes into a vector.
| T | The type of the scalar. |
| aData | The vector to store collected values. |
| aMyValue | The value from the current process (default is 0). |
| void belfem::columnAdd | ( | Matrix< T > & | aMat, |
| const uint | i, | ||
| const uint | j, | ||
| const int | q ) |
| void belfem::columnAddOperation | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aR, | ||
| Matrix< T > & | aR_, | ||
| const uint | i, | ||
| const uint | j, | ||
| const int | q ) |
| void belfem::columnExchangeOperation | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aR, | ||
| Matrix< T > & | aR_, | ||
| const uint | i, | ||
| const uint | j ) |
| void belfem::columnMultiplyOperation | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aR, | ||
| Matrix< T > & | aR_, | ||
| const uint | i ) |
| void belfem::combine | ( | const Vector< T > & | aA, |
| const Vector< T > & | aB, | ||
| const Vector< T > & | aC, | ||
| const Vector< T > & | aD, | ||
| Vector< T > & | aE ) |
| void belfem::combine | ( | const Vector< T > & | aA, |
| const Vector< T > & | aB, | ||
| const Vector< T > & | aC, | ||
| Vector< T > & | aD ) |
| void belfem::combine | ( | const Vector< T > & | aA, |
| const Vector< T > & | aB, | ||
| Vector< T > & | aC ) |
| void belfem::comm_abort | ( | const int | aErrorCode = 1 | ) |
Kill the whole job.
Never returns.
This is the error-path twin of the collectives in commtools.hpp, and it obeys a stricter contract than they do ( see error_abort in assert.cpp, whose body this wrapper absorbed on 2026-08-30 ):
Defined in commtools.cpp, like comm_barrier.
| void belfem::comm_barrier | ( | ) |
Synchronizes all processes in the communicator.
| void belfem::comm_check | ( | const int | aErrorCode | ) |
Checks the MPI error code and reports any errors.
| aErrorCode | The MPI error code to check. |
| void belfem::comm_drain_check | ( | const char * | aLabel | ) |
Debug-build tripwire for the two-tags-per-pair ordering contract of the point-to-point fabric ( see comm_tag() in commtools.cpp ).
Call at an exchange boundary: a point every rank passes with no exchange in flight. The check synchronizes, probes both fabric tags of every rank pair this rank belongs to ( comm_tag( rank, p ) and +1, never MPI_ANY_TAG – solver libraries share MPI_COMM_WORLD ), folds the verdict through allreduce, and on a hit raises BELFEM_ERROR on EVERY rank – detecting ranks name boundary/source/tag/bytes, the others point at the peer's error box. The collective verdict keeps the debug throw policy intact ( assert.cpp: debug throws, on every rank alike ) without stranding peers in a barrier, and doubles as the fence that stops a fast rank from sending the next exchange's first message into a peer's still-running sweep. So a stray dies loudly at the boundary where it was born instead of poisoning an innocent recv an arbitrary distance later.
aLabel names the boundary in the diagnostic and must not be null.
Collective wherever assertions are active; a call site reachable by a subset of ranks is itself a deadlock, same contract as comm_barrier. Compiles to a no-op in release builds and does nothing in serial runs. Best-effort by nature: a barrier does not flush unmatched messages, so a stray still in flight when the sweep runs can escape it – absence of an abort is not proof of a clean fabric – and a stray carrying a tag outside the pair's two fabric tags is invisible to it.
| proc_t belfem::comm_rank | ( | ) |
Returns the rank of the current process in the communicator.
| proc_t belfem::comm_size | ( | ) |
Returns the number of processes in the communicator.
Splits a message into chunks for MPI communication.
| aLength | The length of the message to split. |
Calculates the total number of chunks needed for a set of message lengths.
| aLengths | Vector of message lengths. |
| aRoot | The root process rank. |
Generates a unique tag for MPI communication between two processes.
| aSource | The source process rank. |
| aTarget | The target process rank. |
| comm_t belfem::comm_type | ( | ) |
returns the MPI datatype handle for T
|
inline |
| CompressionMethod belfem::compression_method | ( | const string & | aString | ) |
| std::string belfem::cpu_info | ( | ) |
grabs the cpu info for the banner
|
inline |
|
inline |
|
inline |
|
inline |
| void belfem::create_glue_poly | ( | const real & | aX, |
| const real & | aDeltaX, | ||
| const Vector< real > & | aF, | ||
| Vector< real > & | aC ) |
consider an element such as
f(x) ^ | (X-dX) (X) (X+dX) . o -— o -— o --> X 0 1 2
This function creates a polynomial of the shape
f = a*x^4 + b*x^3 + c*x^2 + d*x + e
| aX | |
| aDeltaX | |
| aF | = { f0, dfdx0, f1, f2, dfdx2 } |
| aC | = { a, b, c, d, e } |
| void belfem::create_truss_poly | ( | const Vector< T > & | aX, |
| const Vector< T > & | aF, | ||
| Vector< T > & | aC ) |
create a polynomial so that f = a*x^3 + b*x^2 + c*x + d
| T |
| aX | = { x0, x1 } |
| aF | = { f0, dfdx0, f1, dfdx1 } |
| aC | = { a, b, c, d } |
| auto belfem::cross | ( | const ET & | aA, |
| const ET & | aB ) -> decltype(arma::cross(aA, aB)) |
| auto belfem::cross | ( | const ET & | aA, |
| const ET & | aB ) -> decltype(blaze::cross(aA, aB)) |
| auto belfem::cross | ( | const ET & | aA, |
| const Vector< T > & | aB ) -> decltype(arma::cross(aA, aB.vector_data())) |
| auto belfem::cross | ( | const ET & | aA, |
| const Vector< T > & | aB ) -> decltype(blaze::cross(aA, aB.vector_data())) |
| Quaternion< T > belfem::cross | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| auto belfem::cross | ( | Vector< T > & | aA, |
| const ET & | aB ) -> decltype(arma::cross(aA.vector_data(), aB)) |
| auto belfem::cross | ( | Vector< T > & | aA, |
| const ET & | aB ) -> decltype(blaze::cross(aA.vector_data(), aB)) |
| void belfem::cubic_bezier | ( | const Matrix< T > & | aPoints, |
| Vector< T > & | aWork, | ||
| const T & | aXi, | ||
| Vector< T > & | aPoint ) |
| void belfem::cubic_bezier_derivative | ( | const Matrix< T > & | aPoints, |
| Vector< T > & | aWork, | ||
| const T & | aXi, | ||
| Vector< T > & | aPoint ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| auto belfem::det | ( | const T & | A | ) | -> decltype(arma::det(A)) |
| auto belfem::det | ( | const T & | A | ) | -> decltype(blaze::det(A)) |
| auto belfem::det | ( | Matrix< T > & | aA | ) | -> decltype(det(aA.matrix_data())) |
| auto belfem::det | ( | T & | A | ) | -> decltype(arma::det(A)) |
| auto belfem::det | ( | T & | A | ) | -> decltype(blaze::det(A)) |
| std::string belfem::dirname | ( | const std::string & | aFilePath | ) |
returns the directory name of a file
Distributes a collection of cells to other processes.
| T | The type of the cell elements. |
| aData | The collection of cells to distribute. |
Distributes a collection of matrices to other processes.
| T | The type of the matrix elements. |
| aData | The collection of matrices to distribute. |
| void belfem::distribute | ( | Cell< T > & | aData | ) |
Distributes elements of a cell to other processes.
| T | The type of the cell elements. |
| aData | The cell to distribute. |
Distributes a collection of vectors to other processes.
| T | The type of the vector elements. |
| aData | The collection of vectors to distribute. |
| void belfem::distribute | ( | const T * | aData, |
| const Vector< U > & | aOffsets ) |
Distributes a raw vector based on lengths and offsets.
| T | The type of the array elements. |
| aData | Pointer to the contiguous array to distribute. |
| aOffsets | offsets per proc |
| void belfem::distribute | ( | Vector< T > & | aData | ) |
Distributes elements of a vector to other processes.
| T | The type of the vector elements. |
| aData | The vector to distribute. |
| DistributedMatrixType belfem::distributed_matrix_format | ( | const string & | aString | ) |
| DistributedMatrixType belfem::distributed_matrix_type | ( | const string & | aString | ) |
| DomainType belfem::domain_type | ( | const string & | aString | ) |
| auto belfem::dot | ( | const blaze::Columns< MT, SO, SF, DF > & | aA, |
| const ET & | aB ) -> decltype(blaze::dot(blaze::column(aA, 0UL), aB)) |
| T belfem::dot | ( | const blaze::Columns< MT, SO, SF, DF > & | aA, |
| const Vector< T > & | aB ) |
| auto belfem::dot | ( | const blaze::Columns< MT1, SO1, SF1, DF1 > & | aA, |
| const blaze::Columns< MT2, SO2, SF2, DF2 > & | aB ) -> decltype(blaze::dot(blaze::column(aA, 0UL), blaze::column(aB, 0UL))) |
| auto belfem::dot | ( | const blaze::Columns< MT1, SO1, SF1, DF1 > & | aA, |
| const blaze::Rows< MT2, SO2, SF2, DF2 > & | aB ) -> decltype(blaze::dot(blaze::column(aA, 0UL), blaze::row(aB, 0UL))) |
| auto belfem::dot | ( | const blaze::Rows< MT, SO, SF, DF > & | aA, |
| const ET & | aB ) -> decltype(blaze::dot(blaze::row(aA, 0UL), aB)) |
| T belfem::dot | ( | const blaze::Rows< MT, SO, SF, DF > & | aA, |
| const Vector< T > & | aB ) |
| auto belfem::dot | ( | const blaze::Rows< MT1, SO1, SF1, DF1 > & | aA, |
| const blaze::Columns< MT2, SO2, SF2, DF2 > & | aB ) -> decltype(blaze::dot(blaze::row(aA, 0UL), blaze::column(aB, 0UL))) |
| auto belfem::dot | ( | const blaze::Rows< MT1, SO1, SF1, DF1 > & | aA, |
| const blaze::Rows< MT2, SO2, SF2, DF2 > & | aB ) -> decltype(blaze::dot(blaze::row(aA, 0UL), blaze::row(aB, 0UL))) |
| auto belfem::dot | ( | const ET & | aA, |
| const blaze::Columns< MT, SO, SF, DF > & | aB ) -> decltype(blaze::dot(aA, blaze::column(aB, 0UL))) |
| auto belfem::dot | ( | const ET & | aA, |
| const blaze::Rows< MT, SO, SF, DF > & | aB ) -> decltype(blaze::dot(aA, blaze::row(aB, 0UL))) |
| auto belfem::dot | ( | const ET & | aA, |
| const ET & | aB ) -> decltype(arma::dot(aA, aB)) |
| auto belfem::dot | ( | const ET & | aA, |
| const Vector< T > & | aB ) -> decltype(arma::dot(aA, aB.vector_data())) |
| auto belfem::dot | ( | const ET & | aA, |
| const Vector< T > & | aB ) -> decltype(blaze::dot(aA, aB.vector_data())) |
| auto belfem::dot | ( | const ET1 & | aA, |
| const ET2 & | aB ) -> decltype(blaze::dot(aA, aB)) |
| auto belfem::dot | ( | const Matrix< T > & | aA, |
| const Vector< T > & | aB ) -> decltype(blaze::dot(aA.matrix_data(), aB.vector_data())) |
| T belfem::dot | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| T belfem::dot | ( | const Vector< T > & | aA, |
| const blaze::Columns< MT, SO, SF, DF > & | aB ) |
| T belfem::dot | ( | const Vector< T > & | aA, |
| const blaze::Rows< MT, SO, SF, DF > & | aB ) |
| auto belfem::dot | ( | const Vector< T > & | aA, |
| const ET & | aB ) -> decltype(blaze::dot(aA.vector_data(), aB)) |
| auto belfem::dot | ( | const Vector< T > & | aA, |
| const Matrix< T > & | aB ) -> decltype(blaze::dot(aA.vector_data(), aB.matrix_data())) |
| auto belfem::dot | ( | const Vector< T > & | aA, |
| const Vector< T > & | aB ) -> decltype(blaze::dot(aA.vector_data(), aB.vector_data())) |
| auto belfem::dot | ( | Vector< T > & | aA, |
| const ET & | aB ) -> decltype(arma::dot(aA.vector_data(), aB)) |
|
inline |
| EntityType belfem::entity_type | ( | const string & | aFieldLabel | ) |
guesses the type of the entity based on the passed field
| EulerMethod belfem::euler_method | ( | const string & | aString | ) |
| std::string belfem::exec | ( | const std::string & | aCommand | ) |
solve a quartic equation A(0)*x^4 + A(1)*x^3 + A(2)*x^2 + A(3)*x + A(4) = 0 for its real roots using Ferrari's method.
Returns the distinct real roots in X, sorted ascending (0 to 4 entries; multiple roots are reported once, matching the cardano() convention). Degenerates to cardano() when A(0) ~ 0.
Method: depress with x = y - a/4 to y^4 + P y^2 + Q y + R = 0, solve the resolvent cubic z^3 + 2P z^2 + (P^2 - 4R) z - Q^2 = 0, take its largest root z = s^2 (which is >= 0 because the cubic is negative at z = 0), and split into the two quadratic factors ( y^2 + s*y + (P + z - Q/s)/2 ) * ( y^2 - s*y + (P + z + Q/s)/2 ). The Q ~ 0 case is handled separately as a biquadratic (this also covers s -> 0, which cannot occur on the general path since the resolvent's root product is Q^2).
Caveats (same class as cardano):
(Implementation completed + three-way verified 2026-07-23: the resolvent/factorization formulas were derived independently by Claude and Codex and agree; validated numerically against known quartics and random-coefficient sweeps.)
|
inline |
create the Hill polarization tensor P for a unidirectional fiber (transversely isotropic host); the Eshelby tensor follows as S = P : C.
see doi: 10.1016/S0020-7683(02)00369-4.
| bool belfem::file_exists | ( | const std::string & | aPath | ) |
this function tests if a file exists
| aPath |
| std::string belfem::filename | ( | const std::string & | aFilePath | ) |
returns the name of a file without the path
| std::string belfem::filetype | ( | const std::string & | aFilePath | ) |
returns the filetype of a file
| index_t belfem::find_index_in_unique_cell | ( | const Cell< T > & | aCell, |
| const T & | aMember ) |
returns the position of a member inside a cell.
The cell must be unique and sorted for this function to work.
|
inline |
| string belfem::first_word | ( | const std::string & | aString, |
| char | aDelimiter ) |
return the first word of the string
| int_t belfem::gees | ( | Matrix< T > & | A, |
| Vector< lapack::cplx_t< T > > & | W, | ||
| Matrix< T > & | VS, | ||
| Vector< lapack::real_t< T > > & | Work, | ||
| Vector< int_t > & | BWork, | ||
| lapack::gees_select_t< T > | select = nullptr, | ||
| const char | jobvs = 'V', | ||
| const char | sort = 'N', | ||
| int_t * | aSdim = nullptr, | ||
| const bool | AbortOnError = true ) |
Schur decomposition of a general square matrix via LAPACK ?gees: A = Z * T * Z^T for the real flavors, A = Z * T * Z^H for the complex ones.
| [in,out] | A | square input matrix; overwritten with the Schur form T — upper triangular for complex T, quasi upper triangular with 2x2 blocks for the complex conjugate eigenvalue pairs of the real flavors |
| [out] | W | the n eigenvalues — always complex valued |
| [out] | VS | Schur vectors Z, resized to n x n for jobvs = 'V'; untouched for 'N' |
| [in,out] | Work | single real-valued scratch, grown to the optimal size on first use: LAPACK's work array in its head ( for complex T reinterpreted in place ), the real scratch in its tail — wr/wi ( 2*n ) for real T, rwork ( n ) for complex T. No internal allocation. |
| [in,out] | BWork | LOGICAL scratch, referenced only when sorting; grown to n entries for sort = 'S' |
| [in] | select | moves the selected eigenvalues to the top left of the Schur form when sort = 'S'; pass nullptr with sort = 'N'. NOTE for real T: a complex conjugate pair is selected as a whole if select is true for EITHER member, and it counts as TWO towards sdim — so sdim can differ from the number of true returns, and can come out odd when reals and pairs mix |
| [in] | jobvs | 'V' or 'N' |
| [in] | sort | 'S' or 'N' |
| [out] | aSdim | if given, receives the number of selected eigenvalues |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::geev | ( | Matrix< T > & | A, |
| Vector< lapack::cplx_t< T > > & | W, | ||
| Matrix< T > & | VL, | ||
| Matrix< T > & | VR, | ||
| Vector< lapack::real_t< T > > & | Work, | ||
| const char | jobvl = 'V', | ||
| const char | jobvr = 'V', | ||
| const bool | AbortOnError = true ) |
eigenvalues and eigenvectors of a general square matrix, A * v = lambda * v, via LAPACK ?geev
| [in,out] | A | square input matrix; destroyed by the call |
| [out] | W | the n eigenvalues — always complex valued |
| [out] | VL | left eigenvectors, resized to n x n for jobvl = 'V'; untouched for 'N' |
| [out] | VR | right eigenvectors, likewise for jobvr. For real T, a complex conjugate eigenvalue pair ( W(j), W(j+1) ) stores its eigenvectors LAPACK-packed across two consecutive columns: v_j = VR(:,j) + i * VR(:,j+1) and v_{j+1} = conj( v_j ) |
| [in,out] | Work | single real-valued scratch, grown to the optimal size on first use: LAPACK's work array in its head ( for complex T reinterpreted in place, two reals per entry ), the 2*n real scratch ( wr/wi for real T, rwork for complex T ) in its tail — no internal allocation |
| [in] | jobvl | 'V' or 'N' |
| [in] | jobvr | 'V' or 'N' |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::geev | ( | Matrix< T > & | A, |
| Vector< lapack::cplx_t< T > > & | W, | ||
| Vector< lapack::real_t< T > > & | Work, | ||
| const bool | AbortOnError = true ) |
eigenvalues only of a general square matrix, see the full version above
| [in,out] | A | square input matrix; destroyed by the call |
| [out] | W | the n eigenvalues — always complex valued |
| [in,out] | Work | single real-valued scratch as in the full version; no internal allocation |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::gels | ( | Matrix< T > & | A, |
| Matrix< T > & | B, | ||
| Vector< T > & | Work, | ||
| const bool | AbortOnError = true ) |
solve min || A * X - B || for multiple right hand sides, see the single right hand side version above
| [in,out] | A | m x n system matrix; overwritten with the QR or LQ factorization |
| [in,out] | B | right hand sides in columns; must have at least max( m, n ) rows |
| [in,out] | Work | scratch, grown to the optimal size on first use |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::gels | ( | Matrix< T > & | A, |
| Vector< T > & | B, | ||
| Vector< T > & | Work, | ||
| const bool | AbortOnError = true ) |
solve the least squares problem min || A * x - b || via LAPACK ?gels ( QR or LQ factorization, A must have full rank )
| [in,out] | A | m x n system matrix; overwritten with the QR ( m >= n ) or LQ ( m < n ) factorization |
| [in,out] | B | right hand side on input ( first m entries ), solution on output ( first n entries ); must be allocated with at least max( m, n ) entries |
| [in,out] | Work | scratch, grown to the optimal size on first use |
| [in] | AbortOnError | abort on info != 0, or return info |
| void belfem::gemm | ( | const Matrix< T > & | A, |
| const Matrix< T > & | B, | ||
| Matrix< T > & | C, | ||
| const T | alpha = 1.0, | ||
| const T | beta = 0.0, | ||
| const char | transa = 'N', | ||
| const char | transb = 'N' ) |
matrix-matrix product C := alpha * op(A) * op(B) + beta * C via BLAS ?gemm, where op is the identity ( trans = 'N' ) or the ( conjugate ) transpose ( 'T' / 'C' )
| [in] | A | left operand, stored form |
| [in] | B | right operand, stored form |
| [in,out] | C | result; resized to op(A) * op(B) when beta is zero, otherwise it must already have that shape |
| [in] | alpha | scaling of the product ( default 1 ) |
| [in] | beta | scaling of the accumulator ( default 0 ) |
| [in] | transa | 'N', 'T' or 'C' for op(A) |
| [in] | transb | 'N', 'T' or 'C' for op(B) |
| int_t belfem::gesv | ( | Matrix< T > & | A, |
| Matrix< T > & | B, | ||
| Vector< int_t > & | Pivot, | ||
| const bool | AbortOnError = true ) |
solve A * X = B for multiple right hand sides via LAPACK ?gesv, see the vector version above
| [in,out] | A | square system matrix; overwritten with the LU factors |
| [in,out] | B | right hand sides in columns on input, solutions on output |
| [out] | Pivot | pivot indices, at least n entries |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::gesv | ( | Matrix< T > & | A, |
| Vector< T > & | B, | ||
| Vector< int_t > & | Pivot, | ||
| const bool | AbortOnError = true ) |
solve the square linear system A * x = b via LAPACK ?gesv ( LU factorization with partial pivoting )
| [in,out] | A | square system matrix; overwritten with the LU factors |
| [in,out] | B | right hand side on input, solution on output |
| [out] | Pivot | pivot indices, at least n entries |
| [in] | AbortOnError | abort on info != 0 ( default ); pass false to receive info instead, e.g. inside iterative schemes that recover from a singular matrix |
| int_t belfem::gesvd | ( | Matrix< T > & | A, |
| Vector< lapack::real_t< T > > & | S, | ||
| Matrix< T > & | U, | ||
| Matrix< T > & | VT, | ||
| Vector< lapack::real_t< T > > & | Work, | ||
| const char | jobu = 'A', | ||
| const char | jobvt = 'A', | ||
| const bool | AbortOnError = true ) |
singular value decomposition A = U * diag( S ) * VT via LAPACK ?gesvd
| [in,out] | A | m x n input matrix; destroyed by the call |
| [out] | S | the min( m, n ) singular values, descending — always real valued, also for complex A |
| [out] | U | left singular vectors; resized to m x m for jobu = 'A', m x min( m, n ) for 'S', untouched for 'N' |
| [out] | VT | transposed right singular vectors; resized to n x n for jobvt = 'A', min( m, n ) x n for 'S', untouched for 'N' |
| [in,out] | Work | single real-valued scratch, grown to the optimal size on first use: LAPACK's work array in its head ( for complex T reinterpreted in place, two reals per entry ), the complex-only 5*min( m, n ) real scratch rwork in its tail — no internal allocation |
| [in] | jobu | 'A', 'S' or 'N' ( 'O' is not supported ) |
| [in] | jobvt | 'A', 'S' or 'N' ( 'O' is not supported ) |
| [in] | AbortOnError | abort on info != 0, or return info |
| unit belfem::get_unit | ( | const MaterialProperty | aProperty | ) |
Get the SI unit for a material property.
| int_t belfem::getrf | ( | Matrix< T > & | A, |
| Vector< int_t > & | Pivot, | ||
| const bool | AbortOnError = true ) |
LU factorization with partial pivoting via LAPACK ?getrf, A = P * L * U; use together with getri() to invert a matrix.
| [in,out] | A | matrix to factorize; overwritten with L and U |
| [in,out] | Pivot | pivot indices; grown to min( m, n ) if too short. Feed the result unchanged into getri() |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::getri | ( | Matrix< T > & | A, |
| Vector< int_t > & | Pivot, | ||
| Vector< T > & | Work, | ||
| const bool | AbortOnError = true ) |
invert a square matrix in place via LAPACK ?getri, using the LU factorization computed by getrf()
| [in,out] | A | must hold the getrf() factorization on entry; overwritten with the inverse |
| [in] | Pivot | pivot indices exactly as produced by getrf() |
| [in,out] | Work | scratch, grown to the optimal size on first use; reused unchanged when already large enough |
| [in] | AbortOnError | abort on info != 0, or return info |
| std::string belfem::git_branch | ( | ) |
returns the git branch name at build time, or "unknown"
| std::string belfem::git_commit_hash | ( | ) |
returns the full git commit hash of the build, or "unknown" if built outside a git repository (e.g.
a source tarball)
| std::string belfem::git_commit_hash_short | ( | ) |
returns the abbreviated (short) git commit hash of the build
| bool belfem::git_is_dirty | ( | ) |
true if the working tree had uncommitted changes at build time
| void belfem::hessian | ( | const Matrix< T > & | J, |
| const Matrix< T > & | K, | ||
| Matrix< T > & | H ) |
Assemble the 9x9 chain-rule matrix H that maps physical first and second shape-function derivatives onto reference-space first and second derivatives for a 3D isoparametric element:
| dN/dxi | | dN/dx | | d2N/dxi2 | = H | d2N/dx2 |
Row ordering of H (reference space):
Column ordering of H (physical space):
Block structure:
Physical derivatives are obtained from reference derivatives by solving the corresponding 9x9 linear system with H (e.g. via H \ rhs).
| [in] | J | 3x3 Jacobian with layout J(i,j) = dx_j / dxi_i, where xi_0, xi_1, xi_2 = (xi, eta, zeta) and x_0, x_1, x_2 = (x, y, z). |
| [in] | K | 6x3 matrix of second derivatives of the geometry mapping, K(i,j) = d2 x_j / d(xi-pair)_i, with row pairing (xi2, eta2, zeta2, eta*zeta, xi*zeta, xi*eta). |
| [out] | H | 9x9 assembled transformation matrix (resized internally). |
| void belfem::intpoints | ( | const enum IntegrationScheme | aIntegrationScheme, |
| const enum GeometryType | aGeometryType, | ||
| const uint | aOrder, | ||
| Vector< real > & | aWeights, | ||
| Matrix< real > & | aPoints ) |
| blaze::DynamicMatrix< blaze::ElementType_t< T >, BLAZE_DEFAULT_STORAGE_ORDER > belfem::inv | ( | const T & | aExpression | ) |
| auto belfem::inv | ( | const T & | aExpression | ) | -> decltype(arma::inv(aExpression)) |
| auto belfem::inv | ( | Matrix< T > & | aA | ) | -> decltype(inv(aA.matrix_data())) |
| bool belfem::is_built_from_git | ( | ) |
true if the build was produced from a git checkout (i.e.
git commit metadata is available); false when built from a source tarball with no .git directory, in which case the git_* accessors return "unknown"
| bool belfem::is_integer | ( | const string & | aString | ) |
|
inline |
|
inline |
| std::tuple< Matrix< T >, Matrix< T > > belfem::kernelImage | ( | Matrix< T > & | aMat | ) |
| KrylovMethod belfem::krylov_method | ( | const string & | aString | ) |
| Vector< T > belfem::linspace | ( | const T & | aStart, |
| const T & | aEnd, | ||
| const belfem::size_t & | aN ) |
| auto belfem::linspace | ( | const T & | aStart, |
| const T & | aEnd, | ||
| const belfem::size_t & | aN ) -> decltype(arma::linspace< arma::Mat< T > >(aStart, aEnd, aN)) |
| void belfem::linspace | ( | const T & | aStart, |
| const T & | aEnd, | ||
| const belfem::size_t & | aN, | ||
| Vector< T > & | aValues ) |
| std::string belfem::make_path_parallel | ( | const std::string & | aPath | ) |
this function takes a path and makes it parallel
this function takes a path and makes it parrallel
|
inline |
| T belfem::max | ( | const arma::Mat< T > & | aMatrix | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| T belfem::min | ( | const arma::Mat< T > & | aMatrix | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| void belfem::moveMinNonzero | ( | Matrix< int > & | aMat, |
| Matrix< int > & | aQ, | ||
| Matrix< int > & | aQ_, | ||
| Matrix< int > & | aR, | ||
| Matrix< int > & | aR_, | ||
| const uint | k ) |
| bool belfem::operator!= | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| auto belfem::operator% | ( | const arma::Mat< T > & | aA, |
| const arma::Mat< T > & | aB ) -> decltype(aA.data() % aB.data()) |
| auto belfem::operator% | ( | const ET & | aA, |
| const Vector< T > & | aB ) -> decltype(aA % aB.vector_data()) |
| Matrix< T > belfem::operator% | ( | const Tensor< T > & | aA, |
| const Matrix< T > & | aB ) |
| Tensor< T > belfem::operator% | ( | const Tensor< T > & | aA, |
| const Tensor< T > & | aB ) |
| auto belfem::operator% | ( | const Vector< T > & | aA, |
| const ET & | aB ) -> decltype(aA.vector_data() % aB) |
| blaze::DynamicVector< T, blaze::columnVector > belfem::operator% | ( | const Vector< T > & | aA, |
| const Vector< T > & | aB ) |
| auto belfem::operator% | ( | const Vector< T > & | aA, |
| const Vector< T > & | aB ) -> decltype(aA.vector_data() % aB.vector_data()) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| Quaternion< T > belfem::operator* | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| Quaternion< T > belfem::operator* | ( | const Quaternion< T > & | aLHS, |
| T | aScalar ) |
|
inline |
multiply operator
| Quaternion< T > belfem::operator* | ( | T | aScalar, |
| const Quaternion< T > & | aRHS ) |
|
inline |
|
inline |
|
inline |
|
inline |
| Quaternion< T > belfem::operator+ | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| Tensor< T > belfem::operator+ | ( | const Tensor< T > & | aB, |
| const Tensor< T > & | aC ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| Quaternion< T > belfem::operator- | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| Tensor< T > belfem::operator- | ( | const Tensor< T > & | aB, |
| const Tensor< T > & | aC ) |
|
inline |
|
inline |
| Quaternion< T > belfem::operator/ | ( | const Quaternion< T > & | aLHS, |
| T | aScalar ) |
|
inline |
| bool belfem::operator== | ( | const Matrix< T > & | aA, |
| const T & | aB ) |
| bool belfem::operator== | ( | const Quaternion< T > & | aLHS, |
| const Quaternion< T > & | aRHS ) |
| bool belfem::operator== | ( | const T & | aA, |
| const Matrix< T > & | aB ) |
| bool belfem::operator== | ( | const T & | aA, |
| const Vector< T > & | aB ) |
| bool belfem::operator== | ( | const Vector< T > & | aA, |
| const T & | aB ) |
| std::string belfem::os_string | ( | ) |
| MumpsParallelReodrdering belfem::parallel_reordering | ( | const string & | aString | ) |
| void belfem::partColumnReduce | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aR, | ||
| Matrix< T > & | aR_, | ||
| const uint | k, | ||
| const uint | l ) |
| void belfem::partRowReduce | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aQ, | ||
| Matrix< T > & | aQ_, | ||
| const uint | k, | ||
| const uint | l ) |
| void belfem::partSmithForm | ( | Matrix< int > & | aMat, |
| Matrix< int > & | aQ, | ||
| Matrix< int > & | aQ_, | ||
| Matrix< int > & | aR, | ||
| Matrix< int > & | aR_, | ||
| const uint | k ) |
| PetscErrorCode belfem::petsctools_allocate_vector | ( | MPI_Comm | aComm, |
| Vec & | aVec, | ||
| const PetscInt | aGlobalLength, | ||
| const PetscInt | aLocalLength ) |
| PetscErrorCode belfem::petsctools_create_matrix | ( | sparse::PETScAIJ * | aDistMatrix, |
| Mat & | aMat ) |
| string belfem::petsctools_error_message | ( | const PetscErrorCode | aStatus | ) |
| PetscErrorCode belfem::petsctools_get_local_vector | ( | Vec & | aVec, |
| Vector< PetscReal > & | aVector ) |
Extract the local portion of a distributed PETSC vector to a BELFEM vector.
aVector must have been initialized with the correct local size
| aVec | |
| aVector |
| PetscErrorCode belfem::petsctools_get_vector | ( | Vec & | aVec, |
| const Vector< PetscInt > & | aIndices, | ||
| Vector< PetscReal > & | aVector ) |
convert a PETSC vector to a BELFEM vector
aVector must have been initialized
| aVec | |
| aIndices | |
| aVector |
| PetscErrorCode belfem::petsctools_link_matrix | ( | COMM_TYPE | aComm, |
| SpMatrix & | aMatrix, | ||
| Mat & | aMat ) |
| PetscErrorCode belfem::petsctools_notify_matrix_update | ( | Mat & | aMat | ) |
| PetscErrorCode belfem::petsctools_set_local_vector | ( | const Vector< PetscReal > & | aVector, |
| Vec & | aVec ) |
Set the local portion of a distributed PETSC vector from a BELFEM vector.
aVector must contain the local values to set
| aVector | |
| aVec |
| PetscErrorCode belfem::petsctools_set_vector | ( | const Vector< PetscReal > & | aVector, |
| const Vector< PetscInt > & | aIndices, | ||
| Vec & | aVec ) |
convert a BELFEM vector to a PETSC vector aVac must have been initialized.
| aVector | |
| aIndices | |
| aVec |
| PetscErrorCode belfem::petsctools_update_matrix | ( | sparse::PETScAIJ * | aDistMatrix, |
| Mat & | aMat ) |
| void belfem::polyfit | ( | const Vector< T > & | aX, |
| const Vector< T > & | aY, | ||
| const uint & | aN, | ||
| Vector< T > & | aCoeffs ) |
| void belfem::polyval | ( | const Vector< T > & | aCoeffs, |
| const Vector< T > & | aX, | ||
| Vector< T > & | aY ) |
| int_t belfem::posv | ( | Matrix< T > & | A, |
| Matrix< T > & | B, | ||
| const bool | AbortOnError = true ) |
solve A * X = B for multiple right hand sides of a symmetric ( real ) or Hermitian ( complex ) positive definite matrix, see the vector version above
| [in,out] | A | positive definite matrix; overwritten with the Cholesky factor |
| [in,out] | B | right hand sides in columns on input, solutions on output |
| [in] | AbortOnError | abort on info != 0, or return info |
| int_t belfem::posv | ( | Matrix< T > & | A, |
| Vector< T > & | B, | ||
| const bool | AbortOnError = true ) |
solve A * x = b for a symmetric ( real ) or Hermitian ( complex ) positive definite matrix via LAPACK ?posv ( Cholesky factorization, no pivoting )
| [in,out] | A | positive definite matrix; overwritten with the Cholesky factor |
| [in,out] | B | right hand side on input, solution on output |
| [in] | AbortOnError | abort on info != 0, or return info |
| Preconditioner belfem::preconditioner | ( | const string & | aString | ) |
|
inline |
| void belfem::print_banner | ( | const std::string | aExecName | ) |
prints the banner
| T belfem::quadratic_gradient | ( | const Vector< T > & | aF, |
| const Vector< T > & | aX, | ||
| const index_t | aIndex = 1 ) |
compute the derivative of F to X at index
| T |
| aF | |
| aX | |
| aIndex |
| Quaternion< T > belfem::quaternion_from_rotation_matrix | ( | const Matrix< T > & | aMatrix | ) |
Extract a unit quaternion from a 3x3 rotation matrix.
Uses the trace-first variant of Shepperd's method: when the trace is positive, w is recovered from the trace (bounded away from zero); otherwise the largest diagonal entry selects which vector component is extracted first.
| aMatrix | A proper rotation matrix (det = +1, orthogonal) |
| void belfem::quaternion_rotate_vector | ( | const Quaternion< T > & | aQ, |
| const Vector< T > & | aVector, | ||
| Vector< T > & | aResult ) |
Rotate a 3D vector by a unit quaternion (optimized, in-place).
Uses the formula: v' = v + 2w (u x v) + 2 (u x (u x v))
where q = (w, u) with u = (x, y, z). This avoids constructing intermediate quaternions and is equivalent to q * v * q*.
| aQ | Unit quaternion defining the rotation |
| aVector | Input vector (length 3) |
| aResult | Output vector (length 3, pre-allocated) |
| void belfem::quaternion_to_rotation_matrix | ( | const Quaternion< T > & | aQ, |
| Matrix< T > & | aMatrix ) |
Convert a unit quaternion to a 3x3 rotation matrix.
Given q = (w, x, y, z), the rotation matrix is:
| 1 - 2(y^2+z^2) 2(xy - wz) 2(xz + wy) |
R = | 2(xy + wz) 1 - 2(x^2+z^2) 2(yz - wx) | | 2(xz - wy) 2(yz + wx) 1 - 2(x^2+y^2) |
| aQ | Unit quaternion |
| aMatrix | Pre-allocated 3x3 output matrix |
calculates the R2 coefficient of determination from values of an evaluated function with respect to given samples.
See also
https://en.wikipedia.org/wiki/Coefficient_of_determination
| [in] | aApproximated | values of evaluated function |
| [in] | aExact | data samples or exact solution |
|
inline |
a random number between 0 and 1 must call seed first
|
inline |
seed the random generator.
MPI builds seed the communicator's engine, the serial branch seeds std::rand(), which rand() uses in that build.
| void belfem::random_seed | ( | T & | aSeed | ) |
| void belfem::ratio_adx2 | ( | const real & | aRatio, |
| const real & | aLength, | ||
| const index_t & | aNumCells, | ||
| Vector< real > & | aX ) |
| void belfem::ratio_ar2 | ( | const real & | aDeltaX0, |
| const real & | aLength, | ||
| const index_t & | aNumCells, | ||
| Vector< real > & | aX ) |
Receives a cell from a specific source process.
| T | The type of the cell elements. |
| aData | The cell to receive. |
| aSource | The source process rank (default is 0). |
Receives a matrix from a specific source process.
| T | The type of the matrix elements. |
| aData | The matrix to receive. |
| aSource | The source process rank (default is 0). |
| void belfem::receive | ( | T & | aData, |
| const proc_t | aSource = 0, | ||
| typename std::enable_if< is_scalar< T >::value >::type * | = nullptr ) |
Receives a scalar value from a specific source process.
| T | The type of the scalar. |
| aData | The scalar to receive. |
| aSource | The source process rank (default is 0). |
Receives a raw array from a specified source process using MPI.
This function receives a raw array into aData from the process with rank aSource using non-blocking MPI operations. The received length is stored in aLength, and the array is processed in chunks. The array must be pre-allocated with sufficient space.
| T | The type of the array elements. |
| aData | Pointer to the pre-allocated array to receive data into. |
| aLength | Reference to the variable that will be updated with the received length. |
| aSource | The rank of the source process in the MPI communicator. |
aData to be allocated with at least the initial aLength elements. Receives a vector from a specific source process.
| T | The type of the vector elements. |
| aData | The vector to receive. |
| aSource | The source process rank (default is 0). |
| ReorderingMethod belfem::reordering_method | ( | const string & | aString | ) |
| void belfem::reverse | ( | Cell< T > & | aCell | ) |
| auto belfem::reverse | ( | const Vector< T > & | aA | ) | -> decltype(reverse(aA.vector_data())) |
|
inline |
Test whether a cached rho database was written by the current format.
The file name encodes only the material label and the RRR value, so a file left over from an older BELFEM is indistinguishable by name and would be loaded rather than rebuilt. Older files store the ratio as a lowercase "rrr" ( alongside a "lambda" dataset ); the current writer stores "RRR". The presence of that marker is therefore the format test.
Returns true when the file may be loaded, false when it must be rebuilt. An unreadable file counts as "must rebuild" rather than an error — the caller regenerates, which is the recoverable outcome.
| void belfem::rotate | ( | const Tensor< T > & | aB, |
| const Matrix< T > & | aR, | ||
| Tensor< T > & | aA ) |
| void belfem::rotation_matrix | ( | const T & | aYaw, |
| const T & | aPitch, | ||
| const T & | aRoll, | ||
| Matrix< real > & | aMatrix ) |
rotate using euler angles project from body to global according to DIN 9300
| aYaw | |
| aPitch | |
| aRoll | |
| aMatrix |
| void belfem::rotation_matrix | ( | const Vector< T > & | aAxis, |
| const T & | aAngle, | ||
| Matrix< real > & | aMatrix ) |
rotate around an axis with an angle
| T |
| aAxis | |
| aAngle | |
| aMatrix |
| void belfem::rotation_matrix_strip | ( | const Vector< T > & | aAxis, |
| const T & | aAngle, | ||
| Matrix< real > & | aMatrix ) |
| void belfem::rowAdd | ( | Matrix< T > & | aMat, |
| const uint | i, | ||
| const uint | j, | ||
| const int | q ) |
| void belfem::rowAddOperation | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aQ, | ||
| Matrix< T > & | aQ_, | ||
| const uint | i, | ||
| const uint | j, | ||
| const int | q ) |
| std::tuple< Matrix< T >, Matrix< T >, uint > belfem::rowEchelon | ( | Matrix< T > & | aMat | ) |
| void belfem::rowExchangeOperation | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aQ, | ||
| Matrix< T > & | aQ_, | ||
| const uint | i, | ||
| const uint | j ) |
| void belfem::rowMultiplyOperation | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aQ, | ||
| Matrix< T > & | aQ_, | ||
| const uint | i ) |
| void belfem::rowPrepare | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aQ, | ||
| Matrix< T > & | aQ_, | ||
| const uint | k, | ||
| const uint | l ) |
| void belfem::rowReduce | ( | Matrix< T > & | aMat, |
| Matrix< T > & | aQ, | ||
| Matrix< T > & | aQ_, | ||
| const uint | k, | ||
| const uint | l ) |
| std::string belfem::search_and_replace | ( | const std::string & | aString, |
| const std::string & | aSearch, | ||
| const std::string & | aReplace ) |
| std::string belfem::search_data_file | ( | const std::string & | aFile, |
| const std::string & | aSubDirectory ) |
Resolve a data file named in an input file, looking below aSubDirectory of the shared data directory.
The run directory always wins, so a local copy overrides the shared database. Failing that the file is looked up below the data directory, first under the same relative path and then by name alone, so that "MatData/bhdata.hdf5" also resolves for a run that has no MatData directory of its own.
If nothing is found, aFile is returned UNCHANGED. That is load-bearing in two ways: whoever opens the file reports the name the user wrote, and the dlopen search path stays intact for plugin libraries, which resolve through the loader and need not exist as a file at all. Note that dlopen only consults the platform loader path ( $LD_LIBRARY_PATH on Linux, $DYLD_LIBRARY_PATH on macOS ) for a name carrying no slash – for a slashed name the two fallbacks below are the only lookups beyond the run directory.
The root is gBelfemDataPath, NOT $BELFEM_DATA directly. It is filled by Communicator::set_globals() from the environment, and on an installed tree from BELFEM_INSTALL_DATADIR when the environment is silent, so an unset $BELFEM_DATA does not imply an empty root. A code may also set it itself. An empty root skips both fallbacks; an empty aSubDirectory searches the data directory itself.
gastables::data_path() deliberately does NOT use this. It is a directory resolver with marker-file validation and a relative-path ladder, and it intentionally skips validation when the root is set (fn_GT_data_path.cpp:51-55). That is not duplication to be collapsed.
Sends a cell to a specific target process.
| T | The type of the cell elements. |
| aData | The cell to send. |
| aTarget | The target process rank. |
| void belfem::send | ( | const T | aData, |
| const proc_t | aTarget = 0, | ||
| typename std::enable_if< is_scalar< T >::value >::type * | = nullptr ) |
Sends a scalar value to a specific target process.
| T | The type of the scalar. |
| aData | The scalar to send. |
| aTarget | The target process rank. |
Sends a raw array to a specified target process using MPI.
This function sends a pre-allocated raw array aData of length aLength to the process with rank aTarget using non-blocking MPI operations. The array is split into chunks for efficient transmission.
| T | The type of the array elements. |
| aData | Pointer to the pre-allocated array to send. |
| aLength | The number of elements in the array. |
| aTarget | The rank of the target process in the MPI communicator. |
aData to be allocated with at least aLength elements. Sends a vector to a specific target process.
| T | The type of the vector elements. |
| aData | The vector to send. |
| aTarget | The target process rank. |
| MumpsSerialReodrdering belfem::serial_reordering | ( | const string & | aString | ) |
| void belfem::share | ( | Cell< T > & | aData | ) |
| void belfem::share | ( | Vector< T > & | aData | ) |
|
inline |
| Quaternion< T > belfem::slerp | ( | const Quaternion< T > & | aQ1, |
| const Quaternion< T > & | aQ2, | ||
| T | aT ) |
Spherical linear interpolation between two quaternions.
| aQ1 | The starting quaternion (t=0) |
| aQ2 | The ending quaternion (t=1) |
| aT | Interpolation parameter in [0, 1] |
Interpolates along the shortest arc on the 4D unit sphere. Both input quaternions should be unit quaternions for meaningful results.
| std::tuple< Matrix< int >, Matrix< int >, Matrix< int >, Matrix< int >, uint, uint > belfem::smithForm | ( | Matrix< int > & | aMat | ) |
| SolverType belfem::solver_type | ( | const string & | aString | ) |
| void belfem::sort | ( | Cell< T > & | aCell | ) |
| void belfem::sort | ( | Cell< T > & | aCell, |
| C & | aComp, | ||
| const size_t | aNumberOfItems = 0 ) |
| std::string belfem::sprint | ( | const char * | aFormat, |
| const Args ... | aArgs ) |
A format script similar to write( , ) in fortran.
| Args | type of arguments to be passed |
| aFormat | format string |
| aArgs | arguments |
| bool belfem::string_to_bool | ( | const std::string & | aString | ) |
return true if string is either 1, on, true or yes
| IntegrationScheme belfem::string_to_integration_scheme | ( | const string & | aString | ) |
| std::string belfem::string_to_lower | ( | const std::string & | aString | ) |
convert the string to lower case
| std::string belfem::string_to_upper | ( | const std::string & | aString | ) |
convert the string to upper case
create a cell of words from a string
| auto belfem::sum | ( | const Vector< T > & | aA | ) | -> decltype(sum(aA.vector_data())) |
Swap specialization for Cell.
| void belfem::symratiospace | ( | const T & | aXmin, |
| const T & | aXmax, | ||
| const T & | aRatio, | ||
| const index_t | aN, | ||
| Vector< T > & | aX ) |
convert a Vector< T > into a Cell< T >
| void belfem::to_enum | ( | const string & | aString, |
| T & | aEnum ) |
| void belfem::to_pair | ( | const std::string & | aString, |
| Cell< std::pair< std::string, T > > & | aResult ) |
| real belfem::to_real | ( | const std::string & | aString | ) |
convert string to real, return NAN if it is not real
| string belfem::to_string | ( | const CompressionMethod | aCompressionMethod | ) |
| string belfem::to_string | ( | const DistributedMatrixType | aDistributedMatrixType | ) |
| string belfem::to_string | ( | const DomainType | aDomainType | ) |
|
inline |
| string belfem::to_string | ( | const EntityType | aEntityType | ) |
| string belfem::to_string | ( | const EulerMethod | aEulerMethod | ) |
|
inline |
| string belfem::to_string | ( | const IntegrationScheme & | aIntegrationScheme | ) |
| string belfem::to_string | ( | const KrylovMethod | aKrylovMethod | ) |
| string belfem::to_string | ( | const MaterialProperty | aProperty | ) |
Convert material property enum to string.
| string belfem::to_string | ( | const MumpsBlockLowRanking | aBLR | ) |
| string belfem::to_string | ( | const MumpsParallelReodrdering | aParallelReodrdering | ) |
| string belfem::to_string | ( | const MumpsSerialReodrdering | aSerialReodrdering | ) |
| string belfem::to_string | ( | const Preconditioner | aPreconditioner | ) |
| string belfem::to_string | ( | const ReorderingMethod | aReorderingMethod | ) |
| string belfem::to_string | ( | const SolverType | aSolverType | ) |
convert a Cell< T > into a Vector< T >
| auto belfem::trans | ( | const Matrix< T > & | aMatrix | ) | -> decltype(trans(aMatrix.matrix_data())) |
| auto belfem::trans | ( | Matrix< T > & | aMatrix | ) | -> decltype(trans(aMatrix.matrix_data())) |
| std::string belfem::uname | ( | ) |
returns the Unix version ( Linux or Darwin )
| void belfem::unique | ( | Cell< T > & | aCell | ) |
| std::string belfem::version | ( | ) |
returns the BELFEM semantic version as "major.minor.patch" (e.g.
"0.1.0"), assigned via project( belfem VERSION ... ) in the top-level CMakeLists.txt
|
constexpr |
| gstring belfem::gBelfemDataPath |
path to belfem data files, set by environment variable $BELFEM_DATA
| const SolverType belfem::gDefaultSolver = SolverType::UNDEFINED |
|
constexpr |
|
constexpr |
|
constexpr |
| const std::string belfem::gLongName = "BELFEM -- The Berkeley Lab Finite Element Framework" |
|
constexpr |
|
constexpr |
Total number of material properties.
|
constexpr |
Number of non-constant material properties.
Does not include jc and n because they are handled differently
| greal belfem::gRhoMax |
maximim resistrivity in Ohm*m, default: 1e10
| greal belfem::gRhoMin |
minimim resistrivity in Ohm*m, default: 0
|
constexpr |
Upper bound for the thermal expansion split temperature [K].
The split is 0.618 * theta_Debye, capped here. The Debye factor keeps the anchor above the steep part of cp, where dln(C)/dT would be negative; the cap keeps it inside the range where expansion measurements still carry signal, and limits how far a single anchor has to extrapolate. For a high-theta material the cap binds, for a low-theta one the Debye factor does.
The value must not undercut the temperature at which dln(C)/dT changes sign, which sits at roughly 0.43 - 0.51 * theta for the fitted metals - 0.618 * theta clears it by construction, but a flat cap breaks that relationship once theta exceeds about 425 K ( aluminum, chromium ). The ice point clears the sign change for every material in the roster, and the choice of anchor inside the admissible window is uncritical: moving it shifts the cryogenic alpha by less than the scatter of the underlying expansion data ( under 5 % for copper, aluminum, iron and nickel ).
| greal belfem::gTbulk |
temperature in K of the bulk material when no thermal kernel is chosen; NaN until the executable or the deck sets it
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
| const std::string belfem::gURL = "http://belfem.lbl.gov" |
| struct belfem::OpVertexDegree belfem::opVertexDegree |
| struct belfem::OpVertexID belfem::opVertexID |
| struct belfem::OpVertexIndex belfem::opVertexIndex |
| struct belfem::OpVertexLevel belfem::opVertexLevel |
| struct belfem::OpVertexOwner belfem::opVertexOwner |