IFEM  90A354
Typedefs | Functions
MeshUtils.C File Reference

Various mesh quality indicators. More...

#include "MeshUtils.h"
#include "ASMbase.h"
#include "SIMbase.h"
#include "Vec3.h"
#include "Vec3Oper.h"
Include dependency graph for MeshUtils.C:

Typedefs

typedef double(* CellFunction) (const ASMbase &patch, int iel)
 A function calculating a quantity for a single element.
 

Functions

static bool compute (std::vector< double > &result, const SIMbase &model, const Vector &displacement, CellFunction func)
 Function running over mesh cells calling the cellfunction for each element.
 
static double aspectRatio (const ASMbase &patch, int iel)
 Compute the aspect ratio of a cell. More...
 
static double skewness (const ASMbase &patch, int iel)
 Compute the skewness of a cell. More...
 
bool MeshUtils::computeAspectRatios (std::vector< double > &elmAspects, const SIMbase &model, const Vector &displacement=Vector())
 Compute element aspect ratios for a mesh. More...
 
bool MeshUtils::computeMeshSkewness (std::vector< double > &elmSkewness, const SIMbase &model, const Vector &displacement=Vector())
 Compute element skewness for a mesh. More...
 

Detailed Description

Various mesh quality indicators.

Date
Feb 16 2015
Author
Arne Morten Kvarving / SINTEF

Function Documentation

◆ aspectRatio()

static double aspectRatio ( const ASMbase patch,
int  iel 
)
static

Compute the aspect ratio of a cell.

The aspect ratio is defined as the longest edge divided by the shortest edge

References ASMbase::getElementCoordinates(), and ASMbase::getNoSpaceDim().

Referenced by MeshUtils::computeAspectRatios().

◆ computeAspectRatios()

bool MeshUtils::computeAspectRatios ( std::vector< double > &  elmAspects,
const SIMbase model,
const Vector displacement = Vector() 
)

Compute element aspect ratios for a mesh.

Parameters
[out]elmAspectsThe element aspect ratios
[in]modelThe model holding the mesh
[in]displacementA displacement to apply to mesh coordinates

References aspectRatio(), compute(), and MeshUtils::computeAspectRatios().

Referenced by MeshUtils::computeAspectRatios().

◆ computeMeshSkewness()

bool MeshUtils::computeMeshSkewness ( std::vector< double > &  elmSkewness,
const SIMbase model,
const Vector displacement = Vector() 
)

Compute element skewness for a mesh.

Parameters
[out]elmSkewnessThe element skewness values
[in]modelThe model holding the mesh
[in]displacementA displacement to apply to mesh coordinates

References compute(), MeshUtils::computeMeshSkewness(), and skewness().

Referenced by MeshUtils::computeMeshSkewness().

◆ skewness()

static double skewness ( const ASMbase patch,
int  iel 
)
static

Compute the skewness of a cell.

The skewness measures the deviance from a regular cell in terms of angles

References ASMbase::getElementCoordinates(), ASMbase::getNoSpaceDim(), and Vec3::length().

Referenced by MeshUtils::computeMeshSkewness().