https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementQualityChecker.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include "ElementUserObject.h"
13
14#include "libmesh/enum_elem_quality.h"
15
17{
18public:
20
22
25
26 void initialize() override;
27 void execute() override;
28 void threadJoin(const UserObject & uo) override;
29 void finalize() override;
30
31protected:
32 bool checkMetricApplicability(const libMesh::ElemQuality & elem_metric,
33 const std::vector<libMesh::ElemQuality> & elem_metrics);
34
36 const bool _has_upper_bound;
37 const bool _has_lower_bound;
40
42 Real _m_min;
43 Real _m_max;
44 Real _m_sum;
46 unsigned int _checked_elem_num;
48 std::set<dof_id_type> _elem_ids;
52 std::set<std::string> _bypassed_elem_type;
53
56
57private:
58 enum class FailureType
59 {
60 WARNING,
61 ERROR
62 };
63 // the way how check failure should respond: warning or error
65};
libMesh::ElemQuality _m_type
void threadJoin(const UserObject &uo) override
Must override.
bool checkMetricApplicability(const libMesh::ElemQuality &elem_metric, const std::vector< libMesh::ElemQuality > &elem_metrics)
static MooseEnum QualityMetricType()
void execute() override
Execute method.
void initialize() override
Called before execute() is ever called so that data can be cleared.
const bool _suppress_invalid_metric_warning
Whether to print element applicability warning for bypassed elements.
static MooseEnum FailureMessageType()
void finalize() override
Finalize.
std::set< dof_id_type > _elem_ids
set to save ids for all failed elements
static InputParameters validParams()
bool _bypassed
whether the element quality check is bypassed or not
Real _m_min
minimum, maximum and summation of quality metric values of all checked elements
std::set< std::string > _bypassed_elem_type
set to save bypassed element type
const FailureType _failure_type
unsigned int _checked_elem_num
number of checked elements
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
Base class for user-specific data.
Definition UserObject.h:20