UtilityFunctions Namespace Reference

Developer Documentation: MeltPoolDG::UtilityFunctions Namespace Reference
Developer Documentation
MeltPoolDG::UtilityFunctions Namespace Reference

Functions

template<typename number1 , typename number2 >
void remove_duplicates (std::vector< number1 > &a, std::vector< number2 > &b)
 
template<typename T >
std::string to_string_with_precision (const T a_value, const int n=6)
 
template<typename number >
dealii::VectorizedArray< number > limit_to_bounds (const dealii::VectorizedArray< number > &in, const number lower_limit, const number upper_limit)
 
template<typename number >
number limit_to_bounds (const number in, const number lower_limit, const number upper_limit)
 
template<typename number >
dealii::VectorizedArray< number > is_between (const dealii::VectorizedArray< number > &in, const number lower_limit, const number upper_limit)
 
template<typename number >
int get_exponent_power_ten (const number x)
 
template<int dim, typename number >
number integrate_over_line (const std::vector< number > &vals, const std::vector< dealii::Point< dim > > &points)
 
template<int dim, typename number >
number compute_numerical_zero_of_norm (const dealii::Triangulation< dim > &triangulation, const dealii::Mapping< dim > &mapping)
 
template<int dim, typename ForwardIterator >
dealii::Point< dim > to_point (const ForwardIterator begin, const ForwardIterator end)
 
template<typename TypeWeight , typename TypeTerm >
TypeTerm calculate_arithmetic_phase_weighted_average (const TypeWeight &weight_a, const TypeTerm &term_a, const TypeWeight &weight_b, const TypeTerm &term_b)
 
template<typename number >
dealii::VectorizedArray< number > calculate_complementary_error_function_vec (const dealii::VectorizedArray< number > &x)
 Helper function for the element-wise computation of the complementary error function of a vectorized array.
 

Function Documentation

◆ calculate_arithmetic_phase_weighted_average()

template<typename TypeWeight , typename TypeTerm >
TypeTerm MeltPoolDG::UtilityFunctions::calculate_arithmetic_phase_weighted_average ( const TypeWeight &  weight_a,
const TypeTerm &  term_a,
const TypeWeight &  weight_b,
const TypeTerm &  term_b 
)

Helper function for the computation of a weighted average: weight_a * term_a + weight_b * term_b

◆ calculate_complementary_error_function_vec()

template<typename number >
dealii::VectorizedArray< number > MeltPoolDG::UtilityFunctions::calculate_complementary_error_function_vec ( const dealii::VectorizedArray< number > &  x)

Helper function for the element-wise computation of the complementary error function of a vectorized array.

Parameters
xGiven vectorized array.
Returns
The vectorized result of the complementary error function.

◆ compute_numerical_zero_of_norm()

template<int dim, typename number >
number MeltPoolDG::UtilityFunctions::compute_numerical_zero_of_norm ( const dealii::Triangulation< dim > &  triangulation,
const dealii::Mapping< dim > &  mapping 
)

◆ get_exponent_power_ten()

template<typename number >
int MeltPoolDG::UtilityFunctions::get_exponent_power_ten ( const number  x)
inline

Return the exponent to the power of ten of an expression like 5*10^5 --> return 5

◆ integrate_over_line()

template<int dim, typename number >
number MeltPoolDG::UtilityFunctions::integrate_over_line ( const std::vector< number > &  vals,
const std::vector< dealii::Point< dim > > &  points 
)

◆ is_between()

template<typename number >
dealii::VectorizedArray< number > MeltPoolDG::UtilityFunctions::is_between ( const dealii::VectorizedArray< number > &  in,
const number  lower_limit,
const number  upper_limit 
)

This function returns 1.0 if the in value is between (excluding) the lower_limit and upper_limit. Otherwise, this function returns 0.0.

◆ limit_to_bounds() [1/2]

template<typename number >
dealii::VectorizedArray< number > MeltPoolDG::UtilityFunctions::limit_to_bounds ( const dealii::VectorizedArray< number > &  in,
const number  lower_limit,
const number  upper_limit 
)
inline

◆ limit_to_bounds() [2/2]

template<typename number >
number MeltPoolDG::UtilityFunctions::limit_to_bounds ( const number  in,
const number  lower_limit,
const number  upper_limit 
)
inline

◆ remove_duplicates()

template<typename number1 , typename number2 >
void MeltPoolDG::UtilityFunctions::remove_duplicates ( std::vector< number1 > &  a,
std::vector< number2 > &  b 
)

◆ to_point()

template<int dim, typename ForwardIterator >
dealii::Point< dim > MeltPoolDG::UtilityFunctions::to_point ( const ForwardIterator  begin,
const ForwardIterator  end 
)

◆ to_string_with_precision()

template<typename T >
std::string MeltPoolDG::UtilityFunctions::to_string_with_precision ( const T  a_value,
const int  n = 6 
)