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 
41  // minimum, maximum and summation of quality metric values of all checked elements
45  // number of checked elements
46  unsigned int _checked_elem_num;
47  // set to save ids for all failed elements
48  std::set<dof_id_type> _elem_ids;
49  // whether the element quality check is bypassed or not
50  bool _bypassed;
51  // set to save bypassed element type
52  std::set<std::string> _bypassed_elem_type;
53 
54 private:
55  enum class FailureType
56  {
57  WARNING,
58  ERROR
59  };
60  // the way how check failure should respond: warning or error
62 };
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
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()
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.
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
libMesh::ElemQuality _m_type
Base class for user-specific data.
Definition: UserObject.h:40