https://mooseframework.inl.gov
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 {
18 public:
20 
22 
25 
26  void initialize() override;
27  void execute() override;
28  void threadJoin(const UserObject & uo) override;
29  void finalize() override;
30 
31 protected:
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 
46  unsigned int _checked_elem_num;
48  std::set<dof_id_type> _elem_ids;
50  bool _bypassed;
52  std::set<std::string> _bypassed_elem_type;
53 
56 
57 private:
58  enum class FailureType
59  {
60  WARNING,
61  ERROR
62  };
63  // the way how check failure should respond: warning or error
65 };
void initialize() override
Called before execute() is ever called so that data can be cleared.
const FailureType _failure_type
void execute() override
Execute method.
std::set< dof_id_type > _elem_ids
set to save ids for all failed elements
unsigned int _checked_elem_num
number of checked elements
bool checkMetricApplicability(const libMesh::ElemQuality &elem_metric, const std::vector< libMesh::ElemQuality > &elem_metrics)
void finalize() override
Finalize.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
static InputParameters validParams()
bool _bypassed
whether the element quality check is bypassed or not
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
static MooseEnum FailureMessageType()
void threadJoin(const UserObject &uo) override
Must override.
Real _m_min
minimum, maximum and summation of quality metric values of all checked elements
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ElementQualityChecker(const InputParameters &parameters)
static MooseEnum QualityMetricType()
const InputParameters & parameters() const
Get the parameters of the object.
std::set< std::string > _bypassed_elem_type
set to save bypassed element type
libMesh::ElemQuality _m_type
const bool _suppress_invalid_metric_warning
Whether to print element applicability warning for bypassed elements.
Base class for user-specific data.
Definition: UserObject.h:40