Skip to content
Snippets Groups Projects
Commit 8a3c33e0 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[local.fe] add check and not to FlatTop

parent 57411068
No related branches found
No related tags found
No related merge requests found
......@@ -180,7 +180,7 @@ public:
// TODO: Double checked locking pattern is not thread-safe without memory barriers.
if (fes_.count(key) == 0) {
// the FE needs to be created, we need to lock
std::lock_guard<std::mutex> DXTC_UNUSED(guard)(mutex_);
std::lock_guard<std::mutex> DXTC_UNUSED(guard){mutex_};
// and to check again if someone else created the FE while we were waiting to acquire the lock
if (fes_.count(key) == 0)
fes_[key] = factory_(geometry_type, order);
......
......@@ -24,6 +24,9 @@ namespace GDT {
/**
* Inspired by [Brenner, Davis, Sung, 2014, A partition of unity method for the displacement obstacle problem of clamped
* Kirchhoff plates], section 2
*
* \sa LocalFlatTop2dCubeFiniteElement
* \sa LocalFlatTopFiniteElementFactory
*/
......@@ -41,6 +44,9 @@ public:
LocalFlatTop2dCubeFiniteElementBasis(const double& overlap = 0.5)
: geometry_type_(Dune::GeometryTypes::cube(2))
{
DUNE_THROW_IF(
!(overlap > 0.), Exceptions::finite_element_error, "Overlap has to be in (0, 1], is " << overlap << "!");
DUNE_THROW_IF(overlap > 1., Exceptions::finite_element_error, "Overlap has to be in (0, 1], is " << overlap << "!");
// we cannot let L_ and R_ be members and define phi_L_ and phi_R_ in the ctor initializer list, as they will
// copy/reference broken/empty/default L_ and R_
const auto L_ = (1. - overlap) / 2.;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment