![]() |
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... | |
Concepts | |
| concept | EigenMatrix |
| Check if a given type T is an Eigen::Matrix. | |
| concept | EigenArray |
Check if a given type T is a Eigen::Array<...>& | |
| concept | Scalar |
Concept which is fulfilled if a type T is a scalar type, i.e. if it is a "field" in the mathematical sense. | |
Typedefs | |
| using | size_type = unsigned int |
| general type for variables related to size of arrays | |
| using | glb_idx_t = unsigned int |
| type for global index of mesh entities (nodes, edges, cells) | |
| using | sub_idx_t = unsigned int |
| type for local indices of sub-entities | |
| using | dim_t = unsigned int |
| type for dimensions and co-dimensions and numbers derived from them | |
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) |
| template<class TO, class FROM> | |
| auto | narrow (FROM from) noexcept -> TO |
cast from to TO using static_cast. An assert will fail if this would change the value (e.g. because of overflow when an std::int64_t is converted to a std::int32_t) | |
| void | PrintInfo (std::ostream &stream, 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 | |
| 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. | |
| void | PrintInfo (std::ostream &stream, const RefEl &ref_el, int output_ctrl=0) |
| Diagnostic output operator. Prints info about a reference element. | |
Variables | |
| const unsigned int | kIdxNil = static_cast<unsigned int>(-1) |
| Index flagged as invalid. | |
| constexpr double | kPi = 3.14159265358979323846 |
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 12 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.
This will output:
Definition at line 16 of file spdlog_utils.cc.
Referenced by lf::assemble::AssembleMatrixLogger(), lf::fe::DiffusionElementMatrixProviderLogger(), 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::fe::MassEdgeMatrixProviderLogger(), lf::uscalfe::MassEdgeMatrixProviderLogger(), lf::fe::MassElementMatrixProviderLogger(), lf::uscalfe::ReactionDiffusionElementMatrixProviderLogger(), lf::fe::ScalarLoadEdgeVectorProviderLogger(), lf::uscalfe::ScalarLoadEdgeVectorProviderLogger(), lf::fe::ScalarLoadElementVectorProviderLogger(), lf::uscalfe::ScalarLoadElementVectorProviderLogger(), and lf::mesh::test_utils::WatertightLogger().
|
noexcept |
cast from to TO using static_cast. An assert will fail if this would change the value (e.g. because of overflow when an std::int64_t is converted to a std::int32_t)
| TO | Type to which we want to convert |
| FROM | Type from which we convert |
| from | original value |
static_cast<TO>(std::forward<FROM>(from)) Definition at line 31 of file narrow.h.
Referenced by lf::geometry::SegmentO1::ChildGeometry(), lf::geometry::TriaO1::ChildGeometry(), lf::refinement::Hybrid2DRefinementPattern::ChildPolygons(), lf::io::GmshReader::InitGmshFile(), lf::io::GmshReader::InitGmshFile(), lf::fe::MeshFunctionGradFE< SCALAR_FE, SCALAR_COEFF >::operator()(), lf::mesh::Mesh::PrintInfo(), and lf::io::writeTikZ().
|
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 535 of file ref_el.h.
References lf::base::RefEl::ToString().
|
|
constexpr |
Definition at line 39 of file types.h.
Referenced by lf::mesh::utils::TorusMeshBuilder::Build().