LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Contains basic functionality that is used by other parts of LehrFEM++. More...
Classes | |
class | AutoTimer |
Measures execution time between construction and destruction. AutoTimer can output either to a std::ostream or to a spdlog::logger More... | |
class | InvalidTypeException |
Thrown to signal that an argument passed to a function had the wrong (polymorphic) type. More... | |
struct | IsScalar |
Base Traits class which can be used to determine if a type T is a scalar value. More... | |
struct | IsScalar< std::complex< T >, std::enable_if_t< std::is_arithmetic_v< T > > > |
Also std::complex is a "scalar" type if the underlying type is a std::is_arithmetic type. More... | |
struct | IsScalar< T, std::enable_if_t< std::is_arithmetic_v< T > > > |
any type that is a std::is_arithmetic is also a scalar type. More... | |
class | LehrFemInfo |
Provides extra information about this version of LehrFEM++, in particular licensing information. More... | |
class | LfException |
A simple, general purpose exception class that is thrown by LehrFEM++ if something is wrong. More... | |
class | LineFeedFormatter |
A spdlog formatter which wraps another formatter and makes sure that if there are new lines (\n ) in the log message, that the log message is still properly indented. More... | |
class | PredicateTrue |
A Function Object that can be invoked with any arguments and that always returns the value true. More... | |
class | RefEl |
Represents a reference element with all its properties. More... | |
class | Timer |
Timer class to measure time. More... | |
Typedefs | |
using | size_type = unsigned int |
general type for variables related to size of arrays More... | |
using | glb_idx_t = unsigned int |
type for global index of mesh entities (nodes, edges, cells) More... | |
using | sub_idx_t = unsigned int |
type for local indices of sub-entities More... | |
using | dim_t = unsigned int |
type for dimensions and co-dimensions and numbers derived from them More... | |
Enumerations | |
enum class | RefElType : unsigned char { kPoint = 1 , kSegment = 2 , kTria = 3 , kQuad = 4 } |
An enum that defines all possible RefEl types. More... | |
Functions | |
void | AssertionFailed (const std::string &expr, const std::string &file, long line, const std::string &msg) |
void | PrintInfo (std::ostream &o, const RefEl &ref_el, int output_ctrl) |
std::ostream & | operator<< (std::ostream &stream, const RefEl &ref_el) |
Operator overload to print a RefEl to a stream, such as std::cout More... | |
std::shared_ptr< spdlog::logger > | InitLogger (const std::string &name) |
Create a spdlog logger, register it in the spdlog registry and initialize it with LehrFEM++ specific settings. More... | |
Variables | |
const unsigned int | kIdxNil = static_cast<unsigned int>(-1) |
Index flagged as invalid. More... | |
constexpr double | kPi = 3.14159265358979323846 |
template<class T > | |
constexpr bool | is_eigen_matrix |
Check if a given type T is an Eigen::Matrix. More... | |
template<class T > | |
constexpr bool | is_eigen_array |
Check if a given type T is an Eigen::Array. More... | |
template<class T > | |
constexpr bool | is_scalar = IsScalar<T>::value |
Variable template that determines if a type T is a scalar type, i.e. if it is a "field" in the mathematical sense. More... | |
Contains basic functionality that is used by other parts of LehrFEM++.
|
strong |
An enum that defines all possible RefEl types.
This enum is only rarely used direcly because there is a one-to-one relation between every enum value and an instance of the lf::base::RefEl class:
Also the enum representation is convertible into a lf::base::RefEl instance and back:
void lf::base::AssertionFailed | ( | const std::string & | expr, |
const std::string & | file, | ||
long | line, | ||
const std::string & | msg | ||
) |
Definition at line 11 of file lf_assert.cc.
std::shared_ptr< spdlog::logger > lf::base::InitLogger | ( | const std::string & | name | ) |
Create a spdlog logger, register it in the spdlog registry and initialize it with LehrFEM++ specific settings.
name | The name of the logger, is usually equal to the fully-scoped variable name, e.g. lf::mesh::hybrid2d::Mesh::Logger or lf::assemble::AssembleMatrixLogger |
LehrFEM++ uses spdlog loggers to provide the user with additional information about long running operations. These loggers are either associated with a class, in which case they are static, public member functions of this class (e.g. lf::mesh::hybrid2d::Mesh::Logger()
) or they are associated with a free function in which case they are retrieved through a global free function lying in the same namespace as the free function (e.g. lf::assemble::AssembleMatrixLogger()
).
You should use InitLogger() to initialize these loggers. In this way, we can set some sensible defaults for all LehrFEM++ loggers at one central location.
Definition at line 16 of file spdlog_utils.cc.
Referenced by lf::assemble::AssembleMatrixLogger(), lf::uscalfe::LinearFeLocalLoadVectorLogger(), lf::mesh::hybrid2d::Mesh::Logger(), lf::mesh::hybrid2d::MeshFactory::Logger(), lf::mesh::utils::TorusMeshBuilder::Logger(), lf::mesh::utils::TPQuadMeshBuilder::Logger(), lf::mesh::utils::TPTriagMeshBuilder::Logger(), lf::refinement::MeshHierarchy::Logger(), lf::uscalfe::LinearFELaplaceElementMatrix::Logger(), lf::uscalfe::MassEdgeMatrixProviderLogger(), lf::uscalfe::ReactionDiffusionElementMatrixProviderLogger(), lf::uscalfe::ScalarLoadEdgeVectorProviderLogger(), lf::uscalfe::ScalarLoadElementVectorProviderLogger(), and lf::mesh::test_utils::WatertightLogger().
|
inline |
Operator overload to print a RefEl
to a stream, such as std::cout
stream | The stream to which this function should output |
ref_el | The reference element to write to stream . |
RefEl::ToString()
.Definition at line 532 of file ref_el.h.
References lf::base::RefEl::ToString().
|
related |
|
inlineconstexpr |
Check if a given type T is an Eigen::Array.
Definition at line 58 of file eigen_tools.h.
|
inlineconstexpr |
Check if a given type T is an Eigen::Matrix.
Definition at line 51 of file eigen_tools.h.
|
inlineconstexpr |
Variable template that determines if a type T
is a scalar type, i.e. if it is a "field" in the mathematical sense.
T | The type that should be tested. |
Definition at line 56 of file scalar_traits.h.