MOAB: Mesh Oriented datABase  (version 5.3.1)
CenterMF2D Class Reference

#include <TMPQualityMetricTest.hpp>

+ Inheritance diagram for CenterMF2D:
+ Collaboration diagram for CenterMF2D:

Public Member Functions

 CenterMF2D (const MappingFunction2D *real_mf)
EntityTopology element_topology () const
 Get MBMesquite::EntityTopology handled by this mapping function.
int num_nodes () const
 Get number of nodes in the element type.
NodeSet sample_points (NodeSet) const
 Get sample points at which to evaluate mapping function.
void coefficients (Sample l, NodeSet s, double *c, size_t *i, size_t &n, MsqError &e) const
 Mapping Function Coefficients.
void derivatives (Sample l, NodeSet s, size_t *i, MsqVector< 2 > *c, size_t &n, MsqError &e) const
 Mapping Function Derivatives.

Private Attributes

const MappingFunction2DmyFunc

Detailed Description

Definition at line 222 of file TMPQualityMetricTest.hpp.


Constructor & Destructor Documentation

CenterMF2D::CenterMF2D ( const MappingFunction2D real_mf) [inline]

Definition at line 225 of file TMPQualityMetricTest.hpp.

: myFunc( real_mf ){};

Member Function Documentation

void CenterMF2D::coefficients ( Sample  location,
NodeSet  nodeset,
double *  coeff_out,
size_t *  indices_out,
size_t &  num_coeff_out,
MsqError err 
) const [inline, virtual]

Mapping Function Coefficients.

This function returns the list of scalar values ( \(N_i\)'s) resulting from the evaluation of the mapping function coefficient terms \(N_1(\vec{\xi}), N_2(\vec{\xi}), \ldots, N_n(\vec{\xi})\) for a given \(\vec{\xi}\).

Parameters:
locationWhere within the element at which to evaluate the coefficients.
nodesetList of which nodes are present in the element.
coefficients_outThe coefficients ( \(N_i(\vec{\xi})\)) for each vertex in the element.
indices_outThe index ($i$ in $N_i$) for each term in 'coeffs_out'. The assumption is that mapping function implementations will not return zero coefficients. This is not required, but for element types with large numbers of nodes it may have a significant impact on performance.

Implements MBMesquite::MappingFunction.

Definition at line 240 of file TMPQualityMetricTest.hpp.

    {
        myFunc->coefficients( l, s, c, i, n, e );
    }
void CenterMF2D::derivatives ( Sample  location,
NodeSet  nodeset,
size_t *  vertex_indices_out,
MsqVector< 2 > *  d_coeff_d_xi_out,
size_t &  num_vtx,
MsqError err 
) const [inline, virtual]

Mapping Function Derivatives.

This function returns the partial derivatives of the mapping function coefficient terms \(\nabla N_1(\vec{\xi}), \nabla N_2(\vec{\xi}), \ldots, \nabla N_n(\vec{\xi})\) evaluated for a given \(\vec{\xi}\), where \(\vec{x_i}\) is a point in \(\mathbf{R}^3\) (i.e. \(x_i,y_i,z_i\)). \(\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \end{array}\right\}\) for surface elements and \(\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \zeta_i\\ \end{array}\right\}\) for volume elements.

The list of returned partial derivatives may be considered list of elements of a matrix \(\mathbf{D}\) in row major order. For surface elements, \(\mathbf{D}\) is a \(n\times 2\) matrix and for volume elements it is a \(n \times 3\) matrix. Each row of \(\mathbf{D}\) corresponds to one of the coefficient functions \(N_i(\vec{\xi})\) and each column corresponds to one of the components of \(\vec{\xi}\) that the corresponding coefficient function is differentiated with respect to.

\( \mathbf{D} = \left[ \begin{array}{ccc} \frac{\delta N_1}{\delta \xi} & \frac{\delta N_1}{\delta \eta} & \ldots \\ \frac{\delta N_2}{\delta \xi} & \frac{\delta N_2}{\delta \eta} & \ldots \\ \vdots & \vdots & \ddots \end{array} \right]\)

The Jacobian matrix ( \(\mathbf{J}\)) of the mapping function can be calculated as follows. Define a matrix \(\mathbf{X}\) such that each column contains the coordinates of the element nodes.

\( \mathbf{X} = \left[ \begin{array}{ccc} x_1 & x_2 & \ldots \\ y_1 & y_2 & \ldots \\ z_1 & z_2 & \ldots \end{array}\right]\)

The Jacobian matrix is then:

\(\mathbf{J} = \mathbf{X} \times \mathbf{D}\)

\(\mathbf{X}\) is always \(3\times n\), so \(\mathbf{J}\) is either \(3\times 2\) (surface elements) or \(3\times 3\) (volume elements) depending on the dimensions of \(\mathbf{D}\).

If the Jacobian matrix of the mapping function is considered as a function of the element vertex coordinates \(\mathbf{J}(\vec{x_1},\vec{x_2},\ldots)\) with \(\vec{\xi}\) constant, then the gradient of that Jacobian matrix function (with respect to the vertex coordinates) can be obtained from the same output list of partial deravitves.

\(\frac{\delta \mathbf{J}}{\delta x_i} = \left[ \begin{array}{ccc} \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \\ 0 & 0 & \ldots \\ 0 & 0 & \ldots \end{array} \right]\) \(\frac{\delta \mathbf{J}}{\delta y_i} = \left[ \begin{array}{ccc} 0 & 0 & \ldots \\ \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \\ 0 & 0 & \ldots \end{array} \right]\) \(\frac{\delta \mathbf{J}}{\delta z_i} = \left[ \begin{array}{ccc} 0 & 0 & \ldots \\ 0 & 0 & \ldots \\ \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \end{array} \right]\)

Parameters:
locationWhere within the element at which to evaluate the derivatives.
nodesetList of which nodes are present in the element.
vertices_outThe list of vertices for which the corresponding coefficient in the mapping function is non-zero. The vertices are specified by their index in the canonical ordering for an element with all mid-nodes present (i.e. first all the corner nodes, then the mid-edge nodes, ...).
d_coeff_d_xi_outThe mapping function is composed of a series of coefficient functions \(N_i(\vec{\xi})\), one correspoding to the position \(\vec{x_i}\) of each node in the element such that the mapping function is of the form: \(\vec{x}(\vec{\xi})=\sum_{i=1}^n N_i(\vec{\xi})\vec{x_i}\). For each vertex indicated in vertex_indices_out, this list contains the partial derivatives of the cooresponding coefficient function \(N_i\) with respect to each component of \(\vec{\xi}\) in the same order as the corresponding nodes in vertex_indices_out.
num_vtxOutput: The number of vertex indices and derivitive tuples returned in vertices_out and d_coeff_d_xi_out, respectively.

Implements MBMesquite::MappingFunction2D.

Definition at line 244 of file TMPQualityMetricTest.hpp.

    {
        myFunc->derivatives( l, s, i, c, n, e );
    }
EntityTopology CenterMF2D::element_topology ( ) const [inline, virtual]

Get MBMesquite::EntityTopology handled by this mapping function.

Implements MBMesquite::MappingFunction.

Definition at line 226 of file TMPQualityMetricTest.hpp.

    {
        return myFunc->element_topology();
    }
int CenterMF2D::num_nodes ( ) const [inline, virtual]

Get number of nodes in the element type.

Get the number of nodes in the element type that the mapping function implements. It is assumed that the result of this function, in combination with the element topology, is sufficient to determine the element type.

Implements MBMesquite::MappingFunction.

Definition at line 230 of file TMPQualityMetricTest.hpp.

    {
        return myFunc->num_nodes();
    }
NodeSet CenterMF2D::sample_points ( NodeSet  higher_order_nodes) const [inline, virtual]

Get sample points at which to evaluate mapping function.

Get the points within the element at which TMP quality metrics that are a function of the mapping function Jacobian should be evaluated. The default (which may be overridden by individual mapping functions) is to evaluate at all nodes.

Reimplemented from MBMesquite::MappingFunction.

Definition at line 234 of file TMPQualityMetricTest.hpp.

References MBMesquite::NodeSet::set_mid_face_node().

    {
        NodeSet s;
        s.set_mid_face_node( 0 );
        return s;
    }

Member Data Documentation

Definition at line 250 of file TMPQualityMetricTest.hpp.

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines