Contains the base classes for implementing Finite Elements. More...
Namespaces | |
namespace | cmdline |
namespace | logging |
namespace | path |
Classes | |
class | AlaNonlinearSolver |
class | Allocator |
class | AttributeList |
class | auto_ptr_array |
struct | b2Mutex |
A dummy mutex for serial exeuction. More... | |
struct | b2spin_rw_mutex |
A dummy rw mutex for serial exeuction. More... | |
class | BushingMaterial |
class | Case |
class | CaseList |
class | cli |
Class to describe the command line interface for b2000. More... | |
class | ComputeOverlayingSurfaceMeshes |
class | ContactMechanics |
class | DataBase |
The object associated with the B2000++ database. More... | |
class | DBSlice |
class | DegreesOfFreedom |
class | Dictionary |
class | Domain |
class | Element |
Defines the complete interface for Element instances (C++ representations of Finite Elements). More... | |
class | ElementCFD3DField |
class | ElementCFDHeat2DFieldL2Constant |
class | ElementProperty |
struct | EquilibriumSolution |
class | EssentialBoundaryCondition |
class | Exception |
class | Field |
class | FortranElementProperty |
class | GenericException |
class | GradientContainer |
class | HeatMaterial |
class | HeatMaterial2D |
class | HeatMaterial3D |
class | InitialCondition |
class | LooseCoupling |
struct | MemcomTypeName |
class | Model |
class | ModelReductionBoundaryCondition |
class | MultiRegionCoupling |
Implements multi-region fluid-structure coupling. More... | |
class | NaturalBoundaryCondition |
class | NBC_FSI |
class | Node |
class | Object |
class | ObjectType |
class | ObjectTypeComplete |
class | ObjectTypeIncomplete |
struct | Point |
class | RData |
class | ReissnerBeamElasticCProperty |
class | ReissnerBeamElasticIProperty |
class | RightStretchTensor_3_3 |
class | RTable |
class | SetName |
MemCom dataset names according to the B2000++ conventions. More... | |
class | Sha1NonlinearSolver |
class | Sha2NonlinearSolver |
class | SolidMechanics |
The base class of the material API for use by stress elements. More... | |
class | SolidMechanics25D |
class | SolidMechanics2D |
class | SolidMechanics3D |
class | SolidMechanicsRod |
The base class of the material API for rod elements. More... | |
class | Solution |
class | Solver |
A Solver instance executes an FE analysis. It is created and initialized by the Model instance and, using the Model, it obtains the Domain, IntialCondition, BoundaryCondition, etc. objects appropriate for the specified load case. More... | |
class | SolverHints |
class | StringList |
class | SuperElement |
class | SuperElementProperty |
class | Timing |
class | Transformation3D |
class | TypedElement |
class | TypedEssentialBoundaryCondition |
class | TypedInitialCondition |
class | TypedModelReductionBoundaryCondition |
class | TypedNaturalBoundaryCondition |
class | VolumeSplineCoupling |
Typedefs | |
typedef GenericException< UnimplementedError_name > | UnimplementedError |
typedef GenericException< KeyError_name > | KeyError |
typedef GenericException< TypeError_name > | TypeError |
typedef GenericException< ValueError_name > | ValueError |
typedef GenericException< IOError_name > | IOError |
typedef GenericException< DBError_name > | DBError |
typedef GenericException< SizeError_name > | SizeError |
typedef GenericException< SystemError_name > | LoggingError |
typedef GenericException< PythonError_name > | PythonError |
using | timer_map_t = std::map< std::string, Timing > |
A global map of timers to hold all the timings in the application. | |
typedef double | coor_type |
Functions | |
void | make_reduction (b2linalg::Matrix< double, b2linalg::Mcompressed_col > &trans_linear_master_slave, b2linalg::Index &inv_index, b2linalg::Matrix< double, b2linalg::Mcompressed_col > &constant_linear_master_slave) |
template<typename T = uint64_t> | |
void | find_coinciding_points (const double delta, const bool delta_relative, const size_t n, const double *coor, std::vector< size_t > &coincide) |
template<typename T = uint64_t> | |
void | find_coinciding_points (const double delta, const bool delta_relative, const size_t n, const double *coor, std::vector< std::pair< size_t, size_t > > &coincide) |
template<typename TP > | |
void | euler_angles_to_rotation_matrix (const TP e[3], TP rotator[3][3]) |
template<typename TP > | |
void | rotator_to_euler_angle (const TP rotator[3][3], TP e[3]) |
void | get_central_coefficient (int l, int z, int p, std::vector< double > &a) |
void | get_forward_coefficient (int l, int z, int p, std::vector< double > &a) |
template<typename FUNCTION , typename T , typename T1 > | |
void | central_numerical_differentiation (FUNCTION &f, const double x, std::vector< T > &res, int derivative_order=1, int approximation_order=2, int first_nonzero_derivative_order=0, double h=0) |
template<typename FUNCTION , typename T , typename T1 > | |
void | forward_numerical_differentiation (FUNCTION &f, const double x, std::vector< T > &res, int derivative_order=1, int approximation_order=2, int first_nonzero_derivative_order=0, double h=0) |
void | polar_decomposition (const double F[3][3], double R[3][3], double U[3][3]) |
void | svd_3_3 (const double A[3][3], double U[3][3], double S[3], double V[3][3]) |
template<typename T > | |
T | determinant_3x3 (const std::array< std::array< T, 3 >, 3 > &mat_a) |
template<typename T > | |
T | determinant_2x2 (const std::array< std::array< T, 2 >, 2 > &mat_a) |
template<typename T > | |
T | invert_3x3 (const std::array< std::array< T, 3 >, 3 > &mat_a, std::array< std::array< T, 3 >, 3 > &mat_b) |
template<typename T > | |
T | invert_2x2 (const std::array< std::array< T, 2 >, 2 > &mat_a, std::array< std::array< T, 2 >, 2 > &mat_b) |
template<typename T > | |
std::array< T, 2 > | eigenvalues_2 (const std::array< std::array< T, 2 >, 2 > &matrix) |
template<typename T > | |
void | eigenvector_2 (const std::array< std::array< T, 2 >, 2 > &matrix, std::array< T, 2 > &eigenvalues, std::array< std::array< T, 2 >, 2 > &eigenvector) |
template<typename T1 > | |
void | set_zero_3 (T1 a[3]) |
template<typename T1 > | |
void | set_zero_2 (T1 a[2]) |
template<typename T1 > | |
void | copy_3 (const T1 a[3], T1 b[3]) |
template<typename T1 , typename T2 > | |
void | copy_3 (const T1 a[3], T2 b[3]) |
template<typename T1 > | |
void | copy_2 (const T1 a[2], T1 b[2]) |
template<typename T1 , typename T2 > | |
void | copy_2 (const T1 a[2], T2 b[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | sub_3 (const T1 v1[3], const T2 v2[3], T3 dest[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | sub_2 (const T1 v1[2], const T2 v2[2], T3 dest[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | add_3 (const T1 v1[3], const T2 v2[3], T3 dest[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | add_2 (const T1 v1[2], const T2 v2[2], T3 dest[2]) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
void | add_scale_3 (const T1 s1, const T2 v1[3], const T3 s2, const T4 v2[3], T5 dest[3]) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
void | add_scale_2 (const T1 s1, const T2 v1[2], const T3 s2, const T4 v2[2], T5 dest[2]) |
template<typename T1 , typename T2 > | |
void | scale_3 (T1 v[3], const T2 s) |
template<typename T1 , typename T2 > | |
void | scale_2 (T1 v[2], const T2 s) |
template<typename T1 , typename T2 > | |
void | add_3 (T1 a[3], const T2 b[3]) |
template<typename T1 , typename T2 > | |
void | add_2 (T1 a[2], const T2 b[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | add_scale_3 (T1 a[3], const T2 s, const T3 b[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | add_scale_2 (T1 a[2], const T2 s, const T3 b[2]) |
template<typename T > | |
T | dot_3 (const T a[3], const T b[3]) |
template<typename T > | |
std::complex< T > | dot_3 (const std::complex< T > a[3], const std::complex< T > b[3]) |
template<typename T > | |
b2000::csda< T > | dot_3 (const b2000::csda< T > a[3], const b2000::csda< T > b[3]) |
template<typename T > | |
T | dot_2 (const T a[2], const T b[2]) |
template<typename T > | |
std::complex< T > | dot_2 (const std::complex< T > a[2], const std::complex< T > b[2]) |
template<typename T > | |
b2000::csda< T > | dot_2 (const b2000::csda< T > a[2], const b2000::csda< T > b[2]) |
template<typename T > | |
T | norm_3 (T a[3]) |
template<typename T > | |
T | norm_3 (std::complex< T > a[3]) |
template<typename T > | |
T | norm_2 (T a[2]) |
template<typename T > | |
T | norm_2 (std::complex< T > a[2]) |
template<typename T1 , typename T2 , typename T3 > | |
void | outer_product_3 (const T1 a[3], const T2 b[3], T3 c[3]) |
template<typename T1 , typename T2 , typename T3 > | |
void | outer_product_add_3 (const T1 a[3], const T2 b[3], T3 c[3]) |
template<typename T > | |
T | norm_outer_product_3 (const T a[3], const T b[3]) |
template<typename T > | |
T | normalise_3 (T a[3]) |
template<typename T > | |
T | normalise_3 (std::complex< T > a[3]) |
template<typename T > | |
b2000::csda< T > | normalise_3 (b2000::csda< T > a[3]) |
template<typename T > | |
T | normalise_2 (T a[2]) |
template<typename T > | |
T | normalise_2 (std::complex< T > a[2]) |
template<typename T > | |
b2000::csda< T > | normalise_2 (b2000::csda< T > a[2]) |
template<typename T1 > | |
void | set_zero_3_3 (T1 a[3][3]) |
template<typename T1 > | |
void | set_zero_2_2 (T1 a[2][2]) |
template<typename T1 > | |
void | set_identity_3_3 (T1 a[3][3]) |
template<typename T1 > | |
void | set_identity_2_2 (T1 a[2][2]) |
template<typename T1 > | |
void | copy_3_3 (const T1 a[3][3], T1 b[3][3]) |
template<typename T1 , typename T2 > | |
void | copy_3_3 (const T1 a[3][3], T2 b[3][3]) |
template<typename T1 > | |
void | copy_2_2 (const T1 a[2][2], T1 b[2][2]) |
template<typename T1 , typename T2 > | |
void | copy_2_2 (const T1 a[2][2], T2 b[2][2]) |
template<typename T > | |
void | scale_3_3 (const T a, const T b[3][3], T c[3][3]) |
template<typename T > | |
void | scale_2_2 (const T a, const T b[2][2], T c[2][2]) |
template<typename T1 , typename T2 > | |
void | add_3_3 (T1 a[3][3], const T2 b[3][3]) |
template<typename T1 , typename T2 > | |
void | add_2_2 (T1 a[2][2], const T2 b[2][2]) |
template<typename T > | |
void | add_scale_3_3 (const T a, const T b[3][3], T c[3][3]) |
template<typename T > | |
void | add_scale_2_2 (const T a, const T b[2][2], T c[2][2]) |
template<typename T1 > | |
void | transpose_3_3 (T1 a[3][3]) |
template<typename T1 > | |
void | transpose_2_2 (T1 a[2][2]) |
template<typename T1 > | |
void | transpose_3_3 (const T1 a[3][3], T1 b[3][3]) |
template<typename T1 > | |
void | transpose_2_2 (const T1 a[2][2], T1 b[2][2]) |
template<typename T1 > | |
T1 | norm_inf_3_3 (const T1 a[3][3]) |
template<typename T1 > | |
T1 | norm_inf_2_2 (const T1 a[3][3]) |
template<typename T > | |
T | determinant_3_3 (const T a[3][3]) |
template<typename T > | |
T | determinant_2_2 (const T a[2][2]) |
template<typename T > | |
T | invert_3_3 (const T a[3][3], T b[3][3]) |
template<typename T > | |
T | invert_2_2 (const T a[2][2], T b[2][2]) |
template<typename T > | |
T | invert_x_x (const T a[2][2], T b[2][2]) |
template<typename T > | |
T | invert_x_x (const T a[3][3], T b[3][3]) |
template<typename T > | |
T | transposed_invert_3_3 (const T a[3][3], T b[3][3]) |
template<typename T > | |
T | transposed_invert_2_2 (const T a[2][2], T b[2][2]) |
template<typename T > | |
void | inner_product_3_3_NN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_3_3_TN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_2_2_NN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_3_3_NT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_2_2_NT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_3_3_TT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_2_2_TT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_2_1_NN (const T a[2][2], const T b[2], T c[2]) |
template<typename T > | |
void | inner_product_2_1_TN (const T a[2][2], const T b[2], T c[2]) |
template<typename T > | |
void | inner_product_add_3_3_NN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_add_2_2_NN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_add_3_3_TN (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_add_2_2_TN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_add_3_3_NT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_add_2_2_NT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_2_2_TN (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_add_3_3_TT (const T a[3][3], const T b[3][3], T c[3][3]) |
template<typename T > | |
void | inner_product_add_2_2_TT (const T a[2][2], const T b[2][2], T c[2][2]) |
template<typename T > | |
void | inner_product_3_1_NN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
void | inner_product_3_1_TN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
void | inner_product_add_3_1_NN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
void | inner_product_add_3_1_TN (const T a[3][3], const T b[3], T c[3]) |
template<typename T > | |
bool | solve_2_2 (const T a[2][2], const T y[2], T x[2]) |
template<typename T > | |
void | eigenvector_2 (const T m[2][2], T value[2], T vector[2][2]=0) |
template<typename T > | |
void | stress_invariants (const T t[6], T &i1, T &i2, T &i3) |
template<typename T > | |
void | stress_principals (const T i1, const T i2, const T i3, T &s1, T &s2, T &s3) |
Calculate the stress principals from the stress invariants. | |
template<typename T > | |
void | get_cartesian_base (const T base[3][3], T cartesian_base[3][3]) |
template<typename Loop , typename... Args> | |
void | b2RunPossiblyParallel (size_t begin, size_t end, Args &&... args) |
Execute given loop, if compiled with TBB this execution is parallel. | |
template<typename Loop , typename Args > | |
void | b2runRecursively (size_t tree_node, size_t sublevel, Args &args, b2Mutex &mutex) |
Recursively run the given tree of recursive tasks, if compiled without TBB it's simply a loop. | |
void | print_timers (std::string filename) |
std::string | timing_fn (std::string logdir, int rank) |
Construct a filename for timer output. | |
timer_map_t::iterator | obtain_timer (std::string name) |
template<typename T > | |
void | solve_cubic_equation (const T a, const T b, const T c, const T d, int &nsol, T &x1, T &x2, T &x3) |
double | get_2d_plane_stress_compressible_mooney_rivlin_stress (const double C1, const double C2, const double k, const double green_lagrange_strain[3], double pk2_stress[3], double d_stress_d_strain[6]) |
double | get_2d_plane_strain_compressible_mooney_rivlin_stress (const double C1, const double C2, const double k, const double green_lagrange_strain[3], double pk2_stress[3], double d_stress_d_strain[6]) |
void | get_3d_compressible_mooney_rivlin_stress (const double C1, const double C2, const double k, const double green_lagrange_strain[6], double pk2_stress[6], double d_stress_d_strain[21]) |
double | get_2d_plane_stress_generalised_blatz_ko_stress (const double mu, const double nu, const double f, const double green_lagrange_strain[3], double pk2_stress[3], double d_stress_d_strain[6], double &lambda3_old) |
double | get_2d_plane_strain_generalised_blatz_ko_stress (const double mu, const double nu, const double f, const double green_lagrange_strain[3], double pk2_stress[3], double d_stress_d_strain[6]) |
void | get_3d_generalised_blatz_ko_stress (const double mu, const double nu, const double f, const double green_lagrange_strain[6], double pk2_stress[6], double d_stress_d_strain[21]) |
Variables | |
timer_map_t | timers {} |
Contains the base classes for implementing Finite Elements.
The B2000++ namespace.
Element implementations should derive one of the following classes:
The functions to override are defined in the base class b2000::Element.
Routines for transformation of second-order tensors and fourth-order tensors in computational solid mechanics. Storage format for tensors: Second-order tensors are strain and stress tensors. Strain tensors are 1d-arrays. For 3D analysis the sequence is [E_11, E_22, E_33, 2E_12, 2E_23, 2E_13], and [E_11, E_22, 2E_12] for 2D analysis. Stress tensors are 1d-arrays as well, the sequence is for 3D analysis [S_11, S_22, S_33, S_12, S_23, S_13] and [S_11, S_22, S_12] for 2D analysis. The difference between the transformation routines for strains and stresses is that in a strain tensor the off-diagonal components are multiplied by two. Fourth-order tensors are constitutive tensors and are stored as lower-packed column-major matrices (exploiting the three symmetries), thus an array of size 21 and 6 for 3D and 2D analysis, respectively. Unsymmmetric constitutive tensors are not supported. Basis: Tensors that shall be transformed from one basis to another must be expressed either in a covariant, contravariant, or cartesian basis. Mixed variance is not supported. Storage format for base vectors: The base vectors are 3x3 and 2x2 matrices that must be row-major format (this is different from the routines in b2tensor_calculus.H where 2x2 and 3x3 matrices are assumed to be in column-major format). Naming convention for the transformation routines: transform_strain_from_base_A_to_base_B means that a strain tensor that is expressed in base A is transformed such that it is expressed in base B. If the base with opposite variance ("ov") is available to the caller (e.g. contravariant instead of covariant), then transform_strain_from_base_A_ov_to_base_B can be called with that base instead. For a cartesian base both routines are equivalent but the "ov" routine is slightly faster and less prone to round-off errors. Often, the origin or the destination base is the global (cartesian) reference frame, in this case one can use "I" (for the identity matrix) instead of "A" or "B".
typedef double b2000::coor_type |
The coordinate type
typedef GenericException<DBError_name> b2000::DBError |
Indicates an error with database I/O.
typedef GenericException<IOError_name> b2000::IOError |
Indicates an error with file I/O.
typedef GenericException<KeyError_name> b2000::KeyError |
Indicates that a key or unique name or identifier was not found.
typedef GenericException<SystemError_name> b2000::LoggingError |
Used by the logging facility.
typedef GenericException<PythonError_name> b2000::PythonError |
Indicates that execution of Python code has raised a Python exception. Used by specialized implementations of Element, ElementProperty, BoundaryCondition, Solver, etc. that execute Python code.
typedef GenericException<SizeError_name> b2000::SizeError |
Indicates that an object (e.g. an array or vector) has the wrong size or length.
typedef GenericException<TypeError_name> b2000::TypeError |
Indicates that an object of the wrong type was given.
typedef GenericException<UnimplementedError_name> b2000::UnimplementedError |
Indicates that functionality has not been implemented to fulfill the desired function.
typedef GenericException<ValueError_name> b2000::ValueError |
Indicates that an invalid value was given.
|
inline |
Compute dest = v1 + v2, with dest, v1, and v2 vectors of length 2.
|
inline |
Compute a += b, with a and b vectors of length 2.
|
inline |
Compute a += b, with a and b 2x2 matrices.
|
inline |
Compute dest = v1 + v2, with dest, v1, and v2 vectors of length 3.
|
inline |
Compute a += b, with a and b vectors of length 3.
|
inline |
Compute a += b, with a and b 3x3 matrices.
|
inline |
Compute dest = s1 * v1 + s2 * v2, with dest, v1, and v2 vectors of length 2.
|
inline |
Compute a += s * b, with a and b vectors of length 3.
|
inline |
Compute c += a * b, with a and b 2x2 matrices.
|
inline |
Compute dest = s1 * v1 + s2 * v2, with dest, v1, and v2 vectors of length 3.
|
inline |
Compute a += s * b, with a and b vectors of length 3.
|
inline |
Compute c += a * b, with a and b 3x3 matrices.
void b2000::b2RunPossiblyParallel | ( | size_t | begin, |
size_t | end, | ||
Args &&... | args | ||
) |
Execute given loop, if compiled with TBB this execution is parallel.
Loop | The functor b2000::ElementTaskLoop implementing the loop. |
...Args | This is a struct containing arguments required for the first loop parameter. Additionally, it might contain a b2Mutex so as to make the assembly process thread-safe. |
begin | Index to first element of the range. |
end | Index to last element of the range. |
...args | The parameters associated with the parameter pack. |
void b2000::b2runRecursively | ( | size_t | tree_node, |
size_t | sublevel, | ||
Args & | args, | ||
b2Mutex & | mutex | ||
) |
Recursively run the given tree of recursive tasks, if compiled without TBB it's simply a loop.
Loop | The functor b2000::ElementTaskLoop implementing the loop. |
Args | This should be struct Args but is implicitly derived by the compiler when b2runRecursively() is called (CTAD). |
tree_node | This is the index representing the root of the tree (e.g. 0 for the root of the tree). |
sublevel | This is generally the height of the tree. |
args | This is a struct containing the arguments for the Loop. |
mutex | A b2Mutex object for thread-safe execution of each task. |
void b2000::central_numerical_differentiation | ( | FUNCTION & | f, |
const double | x, | ||
std::vector< T > & | res, | ||
int | derivative_order = 1 , |
||
int | approximation_order = 2 , |
||
int | first_nonzero_derivative_order = 0 , |
||
double | h = 0 |
||
) |
Compute the approximation of the k-tk to l-tk derivatives of a 1d function using central difference schemas.
f | function object of the function to differentiate |
x | the value at witch the derivative must be computed |
res | the array of derivatives computed |
derivative_order | the k-tk to l-tk derivatives is computed with k=derivative_order and l = k + res.size() |
approximation_order | the required approximation for the k-tk derivative |
first_nonzero_derivative_order | of f |
h | the step size |
|
inline |
Copy vector a into vector b.
|
inline |
Copy vector a into vector b of different type.
|
inline |
Copy the contents of matrix a to matrix b.
|
inline |
Copy the contents of matrix a to matrix b of different type.
|
inline |
Copy vector a into vector b.
|
inline |
Copy vector a into vector b of different type.
|
inline |
Copy the contents of matrix a to matrix b.
|
inline |
Copy the contents of matrix a to matrix b of different type.
|
inline |
Compute the determinant of a 2x2 matrix.
a | The matrix arranged in column-major format (input). |
|
inline |
Compute the determinant of a 2x2 matrix.
[in] | mat_a | The matrix arranged in column-major format. |
|
inline |
Compute the determinant of a 3x3 matrix.
a | The matrix arranged in column-major format (input). |
|
inline |
Compute the determinant of a 3x3 matrix.
[in] | mat_a | The matrix arranged in column-major format. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Compute the eigenvalues of a 2x2 matrix.
[in] | matrix | The 2x2 input matrix arranged in column-major format. |
FE_INVALID | exception if matrix holds double values and the discriminant < -4096 * std::numeric_limits<T>::epsilon(). |
|
inline |
Compute the eigenvalues and eigenvectors of a 2x2 matrix.
[in] | matrix | The 2x2 input matrix arranged in column-major format (input). |
[out] | eigenvalues | The eigenvalues of input matrix. |
[out] | eigenvector | The eigenvectors arranged in column-major format. |
|
inline |
Compute the eigenvalues and eigenvectors of a 2x2 matrix.
m | The 2x2 input matrix arranged in column-major format (input). |
value | The eigenvalues (output). |
vector | The eigenvectors arranged in column-major format. |
|
inline |
Conversion from Euler angles (XYZ) to rotation matrix
e | the Euler angles |
rotator | the rotation matrix |
|
inline |
Detect coinciding or nearly-coinciding points, based on a distance criterion. The computational complexity is O(n * log(n)). On 64bit architectures, (8 + 3 * sizeof(T)) * n bytes are allocated temporarily.
Transitive relations are resolved, i.e. there is no point that is marked as coinciding with another point which in turn as marked as coinciding with yet another point. When m points coincide, the one with the lowest index will not be marked as coinciding, but the remaining m - 1 nodes will be marked as coinciding with that node.
delta | Maximum distance between a pair of points that will be marked as coinciding. Must be > 0. |
delta_relative | Specifies whether the maximum distance is relative to the maximum size of the axis-aligned bounding box. In this case, the axis-aligned bounding box is calculated from the supplied coordinates. |
n | The number of points. |
coor | A 3 * n array containing the point coordinates in x/y/z direction. |
coincide | On exit, contains n elements with point indices in the half-open interval [0..n). If coincide[i] == i, this means that the point i is not marked as coinciding (but other points may be marked to coincide with point i). If coincide[i] < i, the point i is marked to coincide with the point identified by coincide[i]. |
|
inline |
Detect coinciding or nearly-coinciding points, based on a distance criterion. The computational complexity is O(n * log(n)). On 64bit architectures, (8 + 3 * sizeof(T)) * n bytes are allocated temporarily.
Transitive relations are resolved, i.e. there is no point that is marked as coinciding with another point which in turn as marked as coinciding with yet another point. When m points coincide, the one with the lowest index will not be marked as coinciding, but the remaining m - 1 nodes will be marked as coinciding with that node.
delta | Maximum distance between a pair of points that will be marked as coinciding. Must be > 0. |
delta_relative | Specifies whether the maximum distance is relative to the maximum size of the axis-aligned bounding box. In this case, the axis-aligned bounding box is calculated from the supplied coordinates. |
n | The number of points. |
A | 3 * n array containing the point coordinates in x/y/z direction. |
coincide | On exit, contains a sorted vector of size n. Each element is a pair of two indices i and j, both indices in the half-open interval [0..n). If i == j, this means that the point j is not marked as coinciding (but other points may be marked to coincide with point i). If i < j, point j is marked to coincide with point i. |
void b2000::forward_numerical_differentiation | ( | FUNCTION & | f, |
const double | x, | ||
std::vector< T > & | res, | ||
int | derivative_order = 1 , |
||
int | approximation_order = 2 , |
||
int | first_nonzero_derivative_order = 0 , |
||
double | h = 0 |
||
) |
Compute the approximation of the k-tk to l-tk derivatives of a 1d function using forward difference schemas.
f | function object of the function to differentiate |
x | the value at witch the derivative must be computed |
res | the array of derivatives computed |
derivative_order | the k-tk to l-tk derivatives is computed with k=derivative_order and l = k + res.size() |
approximation_order | the required approximation for the k-tk derivative |
first_nonzero_derivative_order | of f |
h | the step size |
double b2000::get_2d_plane_strain_compressible_mooney_rivlin_stress | ( | const double | C1, |
const double | C2, | ||
const double | k, | ||
const double | green_lagrange_strain[3], | ||
double | pk2_stress[3], | ||
double | d_stress_d_strain[6] | ||
) |
Calculate the 2. Piola-Kirchhoff stresses for the compressible Mooney-Rivlin constitutive model for 2D continuum elements assuming the plane-strain hypothesis. The tangent d_stress_d_strain is only required for solving, while the stresses pk2_stress may also be computed for postprocessing. You may pass nullptr for pk2_stress and/or d_stress_d_strain.
[in] | C1 | the first material parameter |
[in] | C2 | the second material parameter |
[in] | k | the third material parameter (bulk modulus) |
[in] | green_lagrange_strain | the components of the Green-Lagrange strain tensor (2D) |
[out] | pk2_stress | the components of the 2. PK stress tensor (2D), or nullptr if input pk2_stress is nullptr |
[out] | d_stress_d_strain | the components of the material tangent (2D), or nullptr if input d_stress_d_strain is nullptr |
double b2000::get_2d_plane_strain_generalised_blatz_ko_stress | ( | const double | mu, |
const double | nu, | ||
const double | f, | ||
const double | green_lagrange_strain[3], | ||
double | pk2_stress[3], | ||
double | d_stress_d_strain[6] | ||
) |
Calculate the 2. Piola-Kirchhoff stresses for the compressible Blatz and Ko constitutive model for 2D continuum elements assuming the plane-strain hypothesis. The tangent d_stress_d_strain is only required for solving, while the stresses pk2_stress may also be computed for postprocessing. You may pass nullptr for pk2_stress and/or d_stress_d_strain.
[in] | mu | the first material parameter (shear modulus) |
[in] | nu | the second material parameter (Poisson's ratio) |
[in] | f | the third material parameter (bulk modulus) |
[in] | green_lagrange_strain | the components of the Green-Lagrange strain tensor (2D) |
[out] | pk2_stress | the components of the 2. PK stress tensor (2D), or nullptr if input pk2_stress is nullptr |
[out] | d_stress_d_strain | the components of the material tangent (2D), or nullptr if input d_stress_d_strain is nullptr |
double b2000::get_2d_plane_stress_compressible_mooney_rivlin_stress | ( | const double | C1, |
const double | C2, | ||
const double | k, | ||
const double | green_lagrange_strain[3], | ||
double | pk2_stress[3], | ||
double | d_stress_d_strain[6] | ||
) |
Calculate the 2. Piola-Kirchhoff stresses for the compressible Mooney-Rivlin constitutive model for 2D continuum elements assuming the plane-stress hypothesis. The tangent d_stress_d_strain is only required for solving, while the stresses pk2_stress may also be computed for postprocessing. You may pass nullptr for pk2_stress and/or d_stress_d_strain.
[in] | C1 | the first material parameter |
[in] | C2 | the second material parameter |
[in] | k | the third material parameter (bulk modulus) |
[in] | green_lagrange_strain | the components of the Green-Lagrange strain tensor (2D) |
[out] | pk2_stress | the components of the 2. PK stress tensor (2D), or nullptr if input pk2_stress is nullptr |
[out] | d_stress_d_strain | the components of the material tangent (2D), or nullptr if input d_stress_d_strain is nullptr |
double b2000::get_2d_plane_stress_generalised_blatz_ko_stress | ( | const double | mu, |
const double | nu, | ||
const double | f, | ||
const double | green_lagrange_strain[3], | ||
double | pk2_stress[3], | ||
double | d_stress_d_strain[6], | ||
double & | lambda3_old | ||
) |
Calculate the 2. Piola-Kirchhoff stresses for the compressible Blatz and Ko constitutive model for 2D continuum elements assuming the plane-stress hypothesis. The tangent d_stress_d_strain is only required for solving, while the stresses pk2_stress may also be computed for postprocessing. You may pass nullptr for pk2_stress and/or d_stress_d_strain.
[in] | mu | the first material parameter (shear modulues) |
[in] | nu | the second material parameter (Poisson's ratio) |
[in] | f | the third material parameter (bulk modulus) |
[in] | green_lagrange_strain | the components of the Green-Lagrange strain tensor (2D) |
[out] | pk2_stress | the components of the 2. PK stress tensor (2D), or nullptr if input pk2_stress is nullptr |
[out] | d_stress_d_strain | the components of the material tangent (2D), or nullptr if input d_stress_d_strain is nullptr |
[in,out] | lambda3_old | transverse deformation stored as history data |
void b2000::get_3d_compressible_mooney_rivlin_stress | ( | const double | C1, |
const double | C2, | ||
const double | k, | ||
const double | green_lagrange_strain[6], | ||
double | pk2_stress[6], | ||
double | d_stress_d_strain[21] | ||
) |
Calculate the 2. Piola-Kirchhoff stresses for the compressible Mooney-Rivlin constitutive model for 3D continuum elements. The tangent d_stress_d_strain is only required for solving, while the stresses pk2_stress may also be computed for postprocessing. You may pass nullptr for pk2_stress and/or d_stress_d_strain.
[in] | C1 | the first material parameter |
[in] | C2 | the second material parameter |
[in] | k | the third material parameter (bulk modulus) |
[in] | green_lagrange_strain | the components of the Green-Lagrange strain tensor (3D) |
[out] | pk2_stress | the components of the 2. PK stress tensor (2D), or nullptr if input pk2_stress is nullptr |
[out] | d_stress_d_strain | the components of the material tangent (2D), or nullptr if input d_stress_d_strain is nullptr |
void b2000::get_3d_generalised_blatz_ko_stress | ( | const double | mu, |
const double | nu, | ||
const double | f, | ||
const double | green_lagrange_strain[6], | ||
double | pk2_stress[6], | ||
double | d_stress_d_strain[21] | ||
) |
Calculate the 2. Piola-Kirchhoff stresses for the compressible Blatz and Ko constitutive model for 3D continuum elements. The tangent d_stress_d_strain is only required for solving, while the stresses pk2_stress may also be computed for postprocessing. You may pass nullptr for pk2_stress and/or d_stress_d_strain.
[in] | mu | the first material parameter (shear modulus) |
[in] | nu | the second material parameter (Poisson's ratio) |
[in] | f | the third material parameter (bulk modulus) |
[in] | green_lagrange_strain | the components of the Green-Lagrange strain tensor (3D) |
[out] | pk2_stress | the components of the 2. PK stress tensor (3D), or nullptr if input pk2_stress is nullptr |
[out] | d_stress_d_strain | the components of the material tangent (3D), or nullptr if input d_stress_d_strain is nullptr |
|
inline |
Calculate a cartesian base whose first vector is aligned with the first covariant base vector.
If r, s and t is the covariant natural base vectors, and x, y and z is the orthogonal aligned base vector, then: z is orthogonal to r and s x is aligned to r y is orthogonal to x and z angle is in degree.
void b2000::get_central_coefficient | ( | int | l, |
int | z, | ||
int | p, | ||
std::vector< double > & | a | ||
) |
Return the coefficients for a central difference schemas
l | derivative order |
z | first nonzero derivative |
p | approximation order |
a | array of coefficient |
void b2000::get_forward_coefficient | ( | int | l, |
int | z, | ||
int | p, | ||
std::vector< double > & | a | ||
) |
Return the coefficients for a forward difference schemas
l | derivative order |
z | first nonzero derivative |
p | approximation order |
a | array of coefficient |
|
inline |
Compute the inner product c = a * b, with a being a 2x2 matrix arranged in column-major format, and b and c vectors of length
|
inline |
Compute the inner product c = a^T * b, with a being a 2x2 matrix arranged in column-major format, and b and c vectors of length
|
inline |
Compute the inner product c = a * b, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a * b^T, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a^T * b, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a^T * b^T, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a * b, with a being a 3x3 matrix arranged in column-major format, and b and c vectors of length
|
inline |
Compute the inner product c = a^T * b, with a being a 3x3 matrix arranged in column-major format, and b and c vectors of length
|
inline |
Compute the inner product c = a * b, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a * b^T, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a^T * b, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a^T * b^T, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Add the inner product c += a * b, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Compute the inner product c = a * b^T, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Add the inner product c += a^T * b, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Add the inner product c += a^T * b^T, with a, b, and c 2x2 matrices arranged in column-major format.
|
inline |
Add the inner product c += a * b, with a being a 3x3 matrix arranged in column-major format, and b and c vectors of length
|
inline |
Add the inner product c += a^T * b, with a being a 3x3 matrix arranged in column-major format, and b and c vector of length 3.
|
inline |
Add the inner product c += a * b, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Add the inner product c += a * b^T, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Add the inner product c += a^T * b, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Add the inner product c += a^T * b^T, with a, b, and c 3x3 matrices arranged in column-major format.
|
inline |
Invert a 2x2 matrix.
a | The input matrix arranged in column-major format (input). |
b | If the determinant of the input matrix is non-zero, contains the inverted matrix arranged in column-major format (output). |
|
inline |
Invert a 2x2 matrix.
[in] | mat_a | The input matrix arranged in column-major format. |
[out] | mat_b | If the determinant of the input matrix is non-zero, contains the inverted matrix arranged in column-major format, otherwise the zero matrix. |
|
inline |
Invert a 3x3 matrix.
a | The input matrix arranged in column-major format (input). |
b | If the determinant of the input matrix is non-zero, contains the inverted matrix arranged in column-major format (output). |
|
inline |
Invert a 3x3 matrix.
[in] | mat_a | The input matrix arranged in column-major format. |
[out] | mat_b | If the determinant of the input matrix is non-zero, contains the inverted matrix arranged in column-major format, otherwise the zero matrix. |
|
inline |
Invert a matrix.
|
inline |
Invert a matrix.
void b2000::make_reduction | ( | b2linalg::Matrix< double, b2linalg::Mcompressed_col > & | trans_linear_master_slave, |
b2linalg::Index & | inv_index, | ||
b2linalg::Matrix< double, b2linalg::Mcompressed_col > & | constant_linear_master_slave | ||
) |
Calculate the reduction matrix and the right-hand side from linear constraints and their right-hand side.
trans_linear_master_slave | On input: A sparse matrix containing on the coefficients of the constraint equations. Each column represents an equation. The number of rows is equal to the total number of dof. On output: The reduction matrix. The number of rows corresponds to the number of non-eliminated dof and the number of columns equals the total number of dof. |
constant_linear_master_slave | On input: A sparse matrix containing the constant values for each constraint equation. The number of rows equals the number of constraint equations. The number of columns can be arbitrary. On output: The reduced constant values. The number of rows equals the total number of dof, the number of columns is unchanged. |
|
inline |
Euclidean norm of a complex or csda 2 vector.
|
inline |
Euclidean norm of a 2 vector.
|
inline |
Euclidean norm of a complex or csda 3 vector.
|
inline |
Euclidean norm of a 3 vector.
|
inline |
Infinite norm of a 2x2 matrix.
|
inline |
Infinite norm of a 3x3 matrix.
|
inline |
|
inline |
Normalise a csda vector of length 2, using the Euclidean norm. The normalisation is carried out if the norm is non-zero.
|
inline |
Normalise a complex vector of length 2, using the Euclidean norm. The normalisation is carried out if the norm is non-zero.
|
inline |
Normalise a vector of length 2, using the Euclidean norm. The normalisation is carried out if the norm is non-zero.
|
inline |
Normalise a csda vector of length 3, using the Euclidean norm. The normalisation is carried out if the norm is non-zero.
|
inline |
Normalise a complex vector of length 3, using the Euclidean norm. The normalisation is carried out if the norm is non-zero.
|
inline |
Normalise a vector of length 3, using the Euclidean norm. The normalisation is carried out if the norm is non-zero.
|
inline |
Obtain a (new) timer in the map of global timers with the given name.
If a timer of the same name exists already in the map, the returned iterator will point to that existing one. Otherwise a new timing object is created and the returned iterator points to it.
|
inline |
Compute the outer product c = a x b, with a, b, c vectors of length 3.
|
inline |
Add the outer product c += a x b, with a, b, c vectors of length 3.
|
inline |
Compute the polar decomposition of the deformation gradient tensor F into the rotation tensor R and the right stretch tensor U, such that F = R * U. All matrices are column-major.
void b2000::print_timers | ( | std::string | filename | ) |
Print the timer information into filename
Opens the file with the given filename and iterates through all Timings in the set of timers to print their respective information line by line.
|
inline |
Conversion from a rotation matrix to Euler angle (XYZ)
rotator | the rotation matrix |
e | the Euler angles |
|
inline |
Compute v = s * v, v a vector of length 2.
|
inline |
Scale a matrix by a factor c = b * a.
|
inline |
Compute v = s * v, v a vector of length 3.
|
inline |
Scale a matrix by a factor c = b * a.
|
inline |
Initialize matrix with the identity matrix.
|
inline |
Initialize matrix with the identity matrix.
|
inline |
Initialize vector to zero.
|
inline |
Initialize matrix to zero.
|
inline |
Initialize vector to zero.
|
inline |
Initialize matrix to zero.
|
inline |
Solve a system of two equations with two unknowns.
a | The 2x2 input matrix arranged in column-major format (input). |
y | The right-hand side (input). |
x | The unknowns (output). If the determinant of a is zero, x is undefined. |
|
inline |
Analytically solve a cubic equation ax^3 + bx^2 + cx + d = 0 with real coefficients.
a | Coefficient of x^3 (input). |
b | Coefficient of x^2 (input). |
c | Coefficient of x (input). |
d | Constant (input). |
nsol | The number of distinct and real roots (output). |
x1 | First real root (output). Only defined if nsol > 0. |
x2 | Second real root (output). Only defined if nsol > 1. |
x3 | Third real root (output). Only defined if nsol > 2. |
void b2000::stress_invariants | ( | const T | t[6], |
T & | i1, | ||
T & | i2, | ||
T & | i3 | ||
) |
Calculate the invariants of a stress tensor in the notation [s11, s22, s33, s12, s23, s13].
|
inline |
Compute dest = v1 - v2, with dest, v1, and v2 vectors of length 2.
|
inline |
Compute dest = v1 - v2, with dest, v1, and v2 vectors of length 3.
|
inline |
Singular value decomposition of a 3 x 3 matrix A such that A = U * diag(S) * V.
A | 3 x 3 input matrix arranged in column-major format (input). |
U | 3 x 3 column-major matrix (output). |
S | Vector of singular values, sorted in descending order (output). |
V | 3 x 3 column-major matrix (output). |
|
inline |
Compute b = a^T with a and b 2x2 matrices.
|
inline |
Transpose a 2x2 matrix.
|
inline |
Compute b = a^T with a and b 3x3 matrices.
|
inline |
Transpose a 3x3 matrix.
|
inline |
Invert and transpose a 2x2 matrix.
a | The input matrix arranged in column-major format (input). |
b | If the determinant of the input matrix is non-zero, contains the inverted and transposed matrix arranged in column-major format (output). |
|
inline |
Invert and transpose a 3x3 matrix.
a | The input matrix arranged in column-major format (input). |
b | If the determinant of the input matrix is non-zero, contains the transposed inverted matrix arranged in column-major format (output). |
timer_map_t b2000::timers {} |
Map of timers to hold a collection of timers
The Timings are uniquely identified by names provided as keys in the map. Add new timers via obtain_timer, which is simply a wrapper around the map.emplace as it is a little awkward.
Example: