MAST3
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
utility.hpp File Reference
#include <vector>
#include <type_traits>
#include <mast/base/mast_data_types.h>
#include <mast/base/exceptions.hpp>
#include <libmesh/numeric_vector.h>
#include <libmesh/sparse_matrix.h>
#include <libmesh/parallel.h>
#include <libmesh/system.h>
Include dependency graph for utility.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 MAST
 
 MAST::Numerics
 
 MAST::Numerics::Utility
 

Functions

template<typename ScalarType >
void MAST::Numerics::Utility::add (std::vector< ScalarType > &v, uint_t i, ScalarType s)
 
void MAST::Numerics::Utility::add (libMesh::NumericVector< real_t > &v, uint_t i, real_t s)
 
template<typename ScalarType >
void MAST::Numerics::Utility::add (Eigen::Matrix< ScalarType, Eigen::Dynamic, 1 > &v, uint_t i, ScalarType s)
 
template<typename ValType >
std::unique_ptr< ValType > MAST::Numerics::Utility::build (const libMesh::System &sys)
 
template<>
std::unique_ptr< libMesh::NumericVector< real_t > > MAST::Numerics::Utility::build (const libMesh::System &sys)
 
real_t MAST::Numerics::Utility::comm_max (const libMesh::Parallel::Communicator &comm, const std::vector< real_t > &v)
 
real_t MAST::Numerics::Utility::comm_max (const libMesh::Parallel::Communicator &comm, real_t v)
 
complex_t MAST::Numerics::Utility::comm_max (const libMesh::Parallel::Communicator &comm, const std::vector< complex_t > &v)
 
complex_t MAST::Numerics::Utility::comm_max (const libMesh::Parallel::Communicator &comm, complex_t v)
 
real_t MAST::Numerics::Utility::comm_min (const libMesh::Parallel::Communicator &comm, const std::vector< real_t > &v)
 
real_t MAST::Numerics::Utility::comm_min (const libMesh::Parallel::Communicator &comm, real_t v)
 
complex_t MAST::Numerics::Utility::comm_min (const libMesh::Parallel::Communicator &comm, const std::vector< complex_t > &v)
 
complex_t MAST::Numerics::Utility::comm_min (const libMesh::Parallel::Communicator &comm, complex_t v)
 
void MAST::Numerics::Utility::comm_sum (const libMesh::Parallel::Communicator &comm, real_t &v)
 
void MAST::Numerics::Utility::comm_sum (const libMesh::Parallel::Communicator &comm, complex_t &v)
 
void MAST::Numerics::Utility::comm_sum (const libMesh::Parallel::Communicator &comm, std::vector< real_t > &v)
 
void MAST::Numerics::Utility::comm_sum (const libMesh::Parallel::Communicator &comm, std::vector< complex_t > &v)
 
template<typename ScalarType , typename VecType >
void MAST::Numerics::Utility::copy (const VecType &v_from, libMesh::DenseVector< ScalarType > &v_to)
 
template<typename ScalarType , typename MatType >
void MAST::Numerics::Utility::copy (const MatType &m_from, libMesh::DenseMatrix< ScalarType > &m_to)
 
template<typename ValType >
void MAST::Numerics::Utility::finalize (ValType &m)
 
void MAST::Numerics::Utility::finalize (libMesh::NumericVector< real_t > &v)
 
void MAST::Numerics::Utility::finalize (libMesh::SparseMatrix< real_t > &m)
 
template<typename P1 , int P2, typename P3 >
void MAST::Numerics::Utility::finalize (Eigen::SparseMatrix< P1, P2, P3 > &m)
 
template<typename ScalarType >
ScalarType MAST::Numerics::Utility::get (const std::vector< ScalarType > &v, uint_t i)
 
real_t MAST::Numerics::Utility::get (const libMesh::NumericVector< real_t > &v, uint_t i)
 
template<typename ScalarType >
ScalarType MAST::Numerics::Utility::get (const Eigen::Matrix< ScalarType, Eigen::Dynamic, 1 > &v, uint_t i)
 
real_t MAST::Numerics::Utility::real_maximum (const std::vector< real_t > &vec)
 computes maximum of vector More...
 
complex_t MAST::Numerics::Utility::real_maximum (const std::vector< complex_t > &vec)
 computes maximum based on real-part of complex numbers More...
 
real_t MAST::Numerics::Utility::real_minimum (const std::vector< real_t > &vec)
 computes minimum of vector More...
 
complex_t MAST::Numerics::Utility::real_minimum (const std::vector< complex_t > &vec)
 computes minimum based on real-part of complex numbers More...
 
template<typename VecType >
std::enable_if< std::is_same< typename Eigen::internal::traits< VecType >::Scalar, real_t >::value, real_t >::type MAST::Numerics::Utility::real_norm (const VecType &v)
 
template<typename VecType >
std::enable_if< std::is_same< typename Eigen::internal::traits< VecType >::Scalar, complex_t >::value, real_t >::type MAST::Numerics::Utility::real_norm (const VecType &v)
 
template<typename ScalarType >
void MAST::Numerics::Utility::resize (std::vector< ScalarType > &v, uint_t n)
 
template<typename ScalarType >
void MAST::Numerics::Utility::resize (Eigen::Matrix< ScalarType, Eigen::Dynamic, 1 > &v, uint_t n)
 
template<typename ScalarType >
void MAST::Numerics::Utility::set (std::vector< ScalarType > &v, uint_t i, ScalarType s)
 
void MAST::Numerics::Utility::set (libMesh::NumericVector< real_t > &v, uint_t i, real_t s)
 
template<typename ScalarType >
void MAST::Numerics::Utility::set (Eigen::Matrix< ScalarType, Eigen::Dynamic, 1 > &v, uint_t i, ScalarType s)
 
template<typename ValType >
void MAST::Numerics::Utility::setZero (ValType &m)
 
void MAST::Numerics::Utility::setZero (libMesh::NumericVector< real_t > &v)
 
void MAST::Numerics::Utility::setZero (libMesh::SparseMatrix< real_t > &m)
 
template<typename ScalarType >
void MAST::Numerics::Utility::setZero (std::vector< ScalarType > &v)