https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementQualityAux.C
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#include "ElementQualityAux.h"
11
13
15
18{
20
21 params.addClassDescription("Generates a field containing the quality metric for each element. "
22 "Useful for visualizing mesh quality.");
23
25 "metric", ElementQualityChecker::QualityMetricType(), "The quality metric to use.");
26
27 return params;
28}
29
31 : AuxKernel(parameters),
32 _metric_type(getParam<MooseEnum>("metric").getEnum<libMesh::ElemQuality>())
33{
34 if (isNodal())
35 mooseError("ElementQualityAux only works on elemental fields.");
36}
37
38Real
registerMooseObject("MooseApp", ElementQualityAux)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
bool isNodal() const
Nodal or elemental kernel?
Definition AuxKernel.h:43
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
Definition AuxKernel.h:133
static InputParameters validParams()
Definition AuxKernel.C:27
Calculates element quality for each element.
ElementQualityAux(const InputParameters &parameters)
virtual Real computeValue() override
Compute and return the value of the aux variable.
libMesh::ElemQuality _metric_type
The metric type to use.
static InputParameters validParams()
static MooseEnum QualityMetricType()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...