MOAB: Mesh Oriented datABase
(version 5.3.1)
|
00001 /* ***************************************************************** 00002 MESQUITE -- The Mesh Quality Improvement Toolkit 00003 00004 Copyright 2006 Lawrence Livermore National Laboratory. Under 00005 the terms of Contract B545069 with the University of Wisconsin -- 00006 Madison, Lawrence Livermore National Laboratory retains certain 00007 rights in this software. 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2.1 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License 00020 (lgpl.txt) along with this library; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 00023 (2006) kraftche@cae.wisc.edu 00024 00025 ***************************************************************** */ 00026 00027 #ifndef MSQ_MAPPING_FUNCTION_HPP 00028 #define MSQ_MAPPING_FUNCTION_HPP 00029 00030 /** \file MappingFunction.hpp 00031 * \brief Header containg defintion of MappingFunction 00032 * \author Jason Kraftcheck 00033 */ 00034 00035 #include "Mesquite.hpp" 00036 #include <vector> 00037 #include "MsqMatrix.hpp" 00038 #include "TopologyInfo.hpp" 00039 #include "NodeSet.hpp" 00040 00041 namespace MBMesquite 00042 { 00043 00044 class MsqError; 00045 class PatchData; 00046 00047 /**\brief An interface for a mapping function of the form 00048 * \f$\vec{x}(\vec{\xi})=\sum_{i=1}^n N_i(\vec{\xi})\vec{x_i}\f$, 00049 * where \f$\vec{x_i}\f$ is a point 00050 * in \f$\mathbf{R}^3\f$ (i.e. \f$x_i,y_i,z_i\f$), 00051 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \end{array}\right\}\f$ 00052 * for surface elements and 00053 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \zeta_i\\ \end{array}\right\}\f$ 00054 * for volume elements. 00055 * 00056 * This is an interface for describing a mapping function for a 00057 * single element topology. A mapping function is assumed to be 00058 * of the following form: 00059 * \f$\vec{x}(\vec{\xi})=\sum_{i=1}^n N_i(\vec{\xi})\vec{x_i}\f$ 00060 * where \f$n\f$ is the number of nodes in the element, 00061 * \f$\vec{x_i}\f$ is a point 00062 * in \f$\mathbf{R}^3\f$ (i.e. \f$x_i,y_i,z_i\f$), and 00063 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \end{array}\right\}\f$ 00064 * for surface elements and 00065 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \zeta_i\\ \end{array}\right\}\f$ 00066 * for volume elements. For example, 00067 * for a linear quadrilateral element, the mapping function will be 00068 * of the form: 00069 * \f$\vec{x}(\xi,\eta)=N_1(\xi,\eta)\vec{x_1} 00070 * +N_2(\xi,\eta)\vec{x_2} 00071 * +N_3(\xi,\eta)\vec{x_3} 00072 * +N_4(\xi,\eta)\vec{x_4}\f$ 00073 * 00074 * A single implementation of this interface may support multiple 00075 * types of elements of the same topology. Element types within 00076 * a topology may vary by the presences or lack there of of mid-edge, 00077 * mid-face, and mid-element nodes. 00078 */ 00079 class MESQUITE_EXPORT MappingFunction 00080 { 00081 public: 00082 virtual ~MappingFunction() {} 00083 00084 /**\brief Get MBMesquite::EntityTopology handled by this mapping function */ 00085 virtual EntityTopology element_topology() const = 0; 00086 00087 /**\brief Get number of nodes in the element type 00088 * 00089 * Get the number of nodes in the element type that the mapping 00090 * function implements. It is assumed that the result of this 00091 * function, in combination with the element topology, is sufficient 00092 * to determine the element type. 00093 */ 00094 virtual int num_nodes() const = 0; 00095 00096 /**\brief Get sample points at which to evaluate mapping function 00097 * 00098 * Get the points within the element at which TMP quality metrics 00099 * that are a function of the mapping function Jacobian should 00100 * be evaluated. The default (which may be overridden by individual 00101 * mapping functions) is to evaluate at all nodes. 00102 */ 00103 virtual NodeSet sample_points( NodeSet higher_order_nodes ) const; 00104 00105 /**\brief Mapping Function Coefficients 00106 * 00107 * This function returns the list of scalar values (\f$N_i\f$'s) resulting 00108 * from the evaluation of the mapping function coefficient terms 00109 * \f$N_1(\vec{\xi}), N_2(\vec{\xi}), \ldots, N_n(\vec{\xi})\f$ 00110 * for a given \f$\vec{\xi}\f$. 00111 *\param location Where within the element at which to evaluate the coefficients. 00112 *\param nodeset List of which nodes are present in the element. 00113 *\param coefficients_out The coefficients (\f$N_i(\vec{\xi})\f$) for each 00114 * vertex in the element. 00115 *\param indices_out The index ($i$ in $N_i$) for each term in 'coeffs_out'. 00116 * The assumption is that mapping function implementations 00117 * will not return zero coefficients. This is not required, 00118 * but for element types with large numbers of nodes it may 00119 * have a significant impact on performance. 00120 */ 00121 virtual void coefficients( Sample location, NodeSet nodeset, double* coeff_out, size_t* indices_out, 00122 size_t& num_coeff_out, MsqError& err ) const = 0; 00123 00124 /*\brief Convert connectivity list indices for different element types. 00125 * 00126 * Given two elements of the same topology but different types 00127 * (number of nodes) and a list of indices into the connectivity 00128 * list for one element type, convert the list to be indices 00129 * into a second element type such that the node in the same logical 00130 * position (e.g. middle of edge 1) is indicated. 00131 */ 00132 static inline void convert_connectivity_indices( EntityTopology topology, int num_nodes_in_input_elem_type, 00133 int num_nodes_in_output_elem_type, size_t* index_list, 00134 unsigned num_indices, MsqError& err ); 00135 00136 /*\brief Convert connectivity list indices for different element types. 00137 * 00138 * Given an element type with the same topology as that of this 00139 * mapping function but with a different number of nodes, convert 00140 * indices into the connectivity list of this element type to 00141 * those of the specified element type such that indices indicate 00142 * nodes at the corresponding logical locations (e.g. middle of edge 1). 00143 */ 00144 inline void convert_connectivity_indices( int num_nodes_in_output_element_type, size_t* index_list, 00145 unsigned num_indices, MsqError& err ) const 00146 { 00147 convert_connectivity_indices( element_topology(), num_nodes(), num_nodes_in_output_element_type, index_list, 00148 num_indices, err ); 00149 } 00150 00151 private: 00152 static void convert_connectivity_indices_impl( EntityTopology topology, int num_nodes_in_input_elem_type, 00153 int num_nodes_in_output_elem_type, size_t* index_list, 00154 unsigned num_indices, MsqError& err ); 00155 }; 00156 00157 /**\brief MappingFunction for topologically 2D (surface) elements. */ 00158 class MESQUITE_EXPORT MappingFunction2D : public MappingFunction 00159 { 00160 public: 00161 virtual ~MappingFunction2D() {} 00162 00163 /**\brief Mapping Function Derivatives 00164 * 00165 * This function returns the partial derivatives of the mapping 00166 * function coefficient terms 00167 * \f$\nabla N_1(\vec{\xi}), \nabla N_2(\vec{\xi}), \ldots, \nabla N_n(\vec{\xi})\f$ 00168 * evaluated for a given \f$\vec{\xi}\f$, where \f$\vec{x_i}\f$ is a point 00169 * in \f$\mathbf{R}^3\f$ (i.e. \f$x_i,y_i,z_i\f$). 00170 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \end{array}\right\}\f$ 00171 * for surface elements and 00172 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \zeta_i\\ \end{array}\right\}\f$ 00173 * for volume elements. 00174 * 00175 * The list of returned partial derivatives may be considered list of elements 00176 * of a matrix \f$\mathbf{D}\f$ in row major order. For surface elements, 00177 * \f$\mathbf{D}\f$ is a \f$n\times 2\f$ matrix and for volume elements it 00178 * is a \f$n \times 3\f$ matrix. Each row of 00179 * \f$\mathbf{D}\f$ corresponds to one of the 00180 * coefficient functions \f$N_i(\vec{\xi})\f$ and each column corresponds 00181 * to one of the components of \f$\vec{\xi}\f$ 00182 * that the corresponding coefficient function is differentiated with 00183 * respect to. 00184 * 00185 * \f$ \mathbf{D} = \left[ \begin{array}{ccc} 00186 * \frac{\delta N_1}{\delta \xi} & \frac{\delta N_1}{\delta \eta} & \ldots \\ 00187 * \frac{\delta N_2}{\delta \xi} & \frac{\delta N_2}{\delta \eta} & \ldots \\ 00188 * \vdots & \vdots & \ddots \end{array} \right]\f$ 00189 * 00190 * The Jacobian matrix (\f$\mathbf{J}\f$) of the mapping function can be calculated 00191 * as follows. Define a matrix \f$\mathbf{X}\f$ such that each column contains 00192 * the coordinates of the element nodes. 00193 * 00194 * \f$ \mathbf{X} = \left[ \begin{array}{ccc} 00195 * x_1 & x_2 & \ldots \\ 00196 * y_1 & y_2 & \ldots \\ 00197 * z_1 & z_2 & \ldots 00198 * \end{array}\right]\f$ 00199 * 00200 * The Jacobian matrix is then: 00201 * 00202 * \f$\mathbf{J} = \mathbf{X} \times \mathbf{D}\f$ 00203 * 00204 * \f$\mathbf{X}\f$ is always \f$3\times n\f$, so \f$\mathbf{J}\f$ is 00205 * either \f$3\times 2\f$ (surface elements) or \f$3\times 3\f$ (volume 00206 * elements) depending on the dimensions of \f$\mathbf{D}\f$. 00207 * 00208 * If the Jacobian matrix of the mapping function is considered as a 00209 * function of the element vertex coordinates \f$\mathbf{J}(\vec{x_1},\vec{x_2},\ldots)\f$ 00210 * with \f$\vec{\xi}\f$ constant, then the gradient of that Jacobian matrix 00211 * function (with respect 00212 * to the vertex coordinates) can be obtained from the same output list of 00213 * partial deravitves. 00214 * 00215 * \f$\frac{\delta \mathbf{J}}{\delta x_i} = 00216 * \left[ \begin{array}{ccc} 00217 * \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \\ 00218 * 0 & 0 & \ldots \\ 00219 * 0 & 0 & \ldots 00220 * \end{array} \right]\f$ 00221 * \f$\frac{\delta \mathbf{J}}{\delta y_i} = 00222 * \left[ \begin{array}{ccc} 00223 * 0 & 0 & \ldots \\ 00224 * \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \\ 00225 * 0 & 0 & \ldots 00226 * \end{array} \right]\f$ 00227 * \f$\frac{\delta \mathbf{J}}{\delta z_i} = 00228 * \left[ \begin{array}{ccc} 00229 * 0 & 0 & \ldots \\ 00230 * 0 & 0 & \ldots \\ 00231 * \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots 00232 * \end{array} \right]\f$ 00233 * 00234 * 00235 *\param location Where within the element at which to evaluate the derivatives. 00236 *\param nodeset List of which nodes are present in the element. 00237 *\param vertices_out The list of vertices for which the corresponding 00238 * coefficient in the mapping function is non-zero. The 00239 * vertices are specified by their index in the canonical 00240 * ordering for an element with all mid-nodes present (i.e. 00241 * first all the corner nodes, then the mid-edge nodes, ...). 00242 *\param d_coeff_d_xi_out The mapping function is composed of a series of 00243 * coefficient functions \f$N_i(\vec{\xi})\f$, one correspoding 00244 * to the position \f$\vec{x_i}\f$ of each node in the 00245 * element such that the mapping function is of the form: 00246 * \f$\vec{x}(\vec{\xi})=\sum_{i=1}^n N_i(\vec{\xi})\vec{x_i}\f$. 00247 * For each vertex indicated in vertex_indices_out, 00248 * this list contains the partial derivatives of the cooresponding 00249 * coefficient function \f$N_i\f$ with respect to each 00250 * component of \f$\vec{\xi}\f$ in the same order as the 00251 * corresponding nodes in vertex_indices_out. 00252 *\param num_vtx Output: The number of vertex indices and derivitive 00253 * tuples returned in vertices_out and d_coeff_d_xi_out, 00254 * respectively. 00255 */ 00256 virtual void derivatives( Sample location, NodeSet nodeset, size_t* vertex_indices_out, 00257 MsqVector< 2 >* d_coeff_d_xi_out, size_t& num_vtx, MsqError& err ) const = 0; 00258 00259 /**\brief Mapping function derivatives and Jacobian 00260 * 00261 * This function returns the partial derivatives of the mapping 00262 * function coefficient terms and the Jacobian calculated from 00263 * those terms and the cooresponding vertex coordinates. 00264 * 00265 * This function returns the same logical data as 'derivatives', 00266 * except that it also calculates the Jacobian from the actual 00267 * vertex coordinates. Also, unlike the 'derivatives' function 00268 * which returns the vertex indices as positions in the element 00269 * connectivity list, this function is expected to 00270 * a) return the actual indices of the vertices in the PatchData 00271 * vertex list and 00272 * b) remove from the list of indices and derivatives and values 00273 * corresponding to fixed vertices. 00274 * 00275 * The default implementation of this function will calculate the 00276 * Jacobian and modify the vertex and derivative lists returned 00277 * from "derivatives". The default implementation serves as a 00278 * utility function for other classes using this one. The function 00279 * is virtual to allow mapping function implementations to provide 00280 * an optimized version that avoids extra calculations for zero terms 00281 * in the derivative list. 00282 * 00283 *\param pd The PatchData instance containing the vertex coordinates 00284 * and element connectcivity. 00285 *\param element_number The index of the mesh element in the PatchData. 00286 *\param nodeset List of which nodes are present in the element. 00287 *\param location Where within the element at which to evaluate the Jacobian. 00288 *\param vertex_patch_indices_out For each free vertex in the element 00289 * the influences the mapping function value at 00290 * the specified logical location, the index of 00291 * that vertex in the PatchData. 00292 *\param d_coeff_d_xi_out For each vertex in 'vertex_patch_indices_out', 00293 * the partial derivatives of the corresponding 00294 * coefficient of the mapping function. 00295 *\param num_vtx_out The number of values passed back in 00296 * 'vertex_patch_indices_out' and 'd_coeff_d_xi_out'. 00297 *\param jacobian_out The Jacobian of the mapping function at the 00298 * specified logical location. 00299 */ 00300 virtual void jacobian( const PatchData& pd, size_t element_number, NodeSet nodeset, Sample location, 00301 size_t* vertex_patch_indices_out, MsqVector< 2 >* d_coeff_d_xi_out, size_t& num_vtx_out, 00302 MsqMatrix< 3, 2 >& jacobian_out, MsqError& err ) const; 00303 00304 /**\brief Get ideal Jacobian matrix 00305 * 00306 * Returns the Jacobian matrix of an ideal element. The orientation 00307 * of element or corresponding matrix is arbitrary. The "ideal" element 00308 * should be scaled such the Jacobian (determinant of the Jacobian 00309 * matrix) is 1.0. 00310 * 00311 *\param location Where within the element at which to evaluate the Jacobian. 00312 * Typically doesn't matter except for degenerate elements 00313 * (e.g. pyramid as degenerate hex.) 00314 *\param jacobian_out The Jacobian of the mapping function at the 00315 * specified logical location. 00316 */ 00317 virtual void ideal( Sample location, MsqMatrix< 3, 2 >& jacobian_out, MsqError& err ) const; 00318 }; 00319 00320 /**\brief MappingFunction for topologically 3D (volume) elements. */ 00321 class MESQUITE_EXPORT MappingFunction3D : public MappingFunction 00322 { 00323 public: 00324 virtual ~MappingFunction3D() {} 00325 00326 /**\brief Mapping Function Derivatives 00327 * 00328 * This group of methods return the partial derivatives of the mapping 00329 * function coefficient terms 00330 * \f$\nabla N_1(\vec{\xi}), \nabla N_2(\vec{\xi}), \ldots, \nabla N_n(\vec{\xi})\f$ 00331 * evaluated for a given \f$\vec{\xi}\f$, where \f$\vec{x_i}\f$ is a point 00332 * in \f$\mathbf{R}^3\f$ (i.e. \f$x_i,y_i,z_i\f$). 00333 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \end{array}\right\}\f$ 00334 * for surface elements and 00335 * \f$\vec{\xi_i} = \left\{\begin{array}{c}\xi_i\\ \eta_i\\ \zeta_i\\ \end{array}\right\}\f$ 00336 * for volume elements. 00337 * 00338 * The list of returned partial derivatives may be considered list of elements 00339 * of a matrix \f$\mathbf{D}\f$ in row major order. For surface elements, 00340 * \f$\mathbf{D}\f$ is a \f$n\times 2\f$ matrix and for volume elements it 00341 * is a \f$n \times 3\f$ matrix. Each row of 00342 * \f$\mathbf{D}\f$ corresponds to one of the 00343 * coefficient functions \f$N_i(\vec{\xi})\f$ and each column corresponds 00344 * to one of the components of \f$\vec{\xi}\f$ 00345 * that the corresponding coefficient function is differentiated with 00346 * respect to. 00347 * 00348 * \f$ \mathbf{D} = \left[ \begin{array}{ccc} 00349 * \frac{\delta N_1}{\delta \xi} & \frac{\delta N_1}{\delta \eta} & \ldots \\ 00350 * \frac{\delta N_2}{\delta \xi} & \frac{\delta N_2}{\delta \eta} & \ldots \\ 00351 * \vdots & \vdots & \ddots \end{array} \right]\f$ 00352 * 00353 * The Jacobian matrix (\f$\mathbf{J}\f$) of the mapping function can be calculated 00354 * as follows. Define a matrix \f$\mathbf{X}\f$ such that each column contains 00355 * the coordinates of the element nodes. 00356 * 00357 * \f$ \mathbf{X} = \left[ \begin{array}{ccc} 00358 * x_1 & x_2 & \ldots \\ 00359 * y_1 & y_2 & \ldots \\ 00360 * z_1 & z_2 & \ldots 00361 * \end{array}\right]\f$ 00362 * 00363 * The Jacobian matrix is then: 00364 * 00365 * \f$\mathbf{J} = \mathbf{X} \times \mathbf{D}\f$ 00366 * 00367 * \f$\mathbf{X}\f$ is always \f$3\times n\f$, so \f$\mathbf{J}\f$ is 00368 * either \f$3\times 2\f$ (surface elements) or \f$3\times 3\f$ (volume 00369 * elements) depending on the dimensions of \f$\mathbf{D}\f$. 00370 * 00371 * If the Jacobian matrix of the mapping function is considered as a 00372 * function of the element vertex coordinates \f$\mathbf{J}(\vec{x_1},\vec{x_2},\ldots)\f$ 00373 * with \f$\vec{\xi}\f$ constant, then the gradient of that Jacobian matrix 00374 * function (with respect 00375 * to the vertex coordinates) can be obtained from the same output list of 00376 * partial deravitves. 00377 * 00378 * \f$\frac{\delta \mathbf{J}}{\delta x_i} = 00379 * \left[ \begin{array}{ccc} 00380 * \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \\ 00381 * 0 & 0 & \ldots \\ 00382 * 0 & 0 & \ldots 00383 * \end{array} \right]\f$ 00384 * \f$\frac{\delta \mathbf{J}}{\delta y_i} = 00385 * \left[ \begin{array}{ccc} 00386 * 0 & 0 & \ldots \\ 00387 * \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots \\ 00388 * 0 & 0 & \ldots 00389 * \end{array} \right]\f$ 00390 * \f$\frac{\delta \mathbf{J}}{\delta z_i} = 00391 * \left[ \begin{array}{ccc} 00392 * 0 & 0 & \ldots \\ 00393 * 0 & 0 & \ldots \\ 00394 * \frac{\delta N_i}{\delta \xi} & \frac{\delta N_i}{\delta \eta} & \ldots 00395 * \end{array} \right]\f$ 00396 * 00397 * 00398 *\param location Where within the element at which to evaluate the derivatives. 00399 *\param nodeset List of which nodes are present in the element. 00400 *\param vertices_out The list of vertices for which the corresponding 00401 * coefficient in the mapping function is non-zero. The 00402 * vertices are specified by their index in the canonical 00403 * ordering for an element with all mid-nodes present (i.e. 00404 * first all the corner nodes, then the mid-edge nodes, ...). 00405 *\param d_coeff_d_xi_out The mapping function is composed of a series of 00406 * coefficient functions \f$N_i(\vec{\xi})\f$, one correspoding 00407 * to the position \f$\vec{x_i}\f$ of each node in the 00408 * element such that the mapping function is of the form: 00409 * \f$\vec{x}(\vec{\xi})=\sum_{i=1}^n N_i(\vec{\xi})\vec{x_i}\f$. 00410 * For each vertex indicated in vertex_indices_out, 00411 * this list contains the partial derivatives of the cooresponding 00412 * coefficient function \f$N_i\f$ with respect to each 00413 * component of \f$\vec{\xi}\f$ in the same order as the 00414 * corresponding nodes in vertex_indices_out. 00415 *\param num_vtx Output: The number of vertex indices and derivitive 00416 * tuples returned in vertices_out and d_coeff_d_xi_out, 00417 * respectively. 00418 */ 00419 virtual void derivatives( Sample location, NodeSet nodeset, size_t* vertex_indices_out, 00420 MsqVector< 3 >* d_coeff_d_xi_out, size_t& num_vtx, MsqError& err ) const = 0; 00421 00422 /**\brief Mapping function derivatives and Jacobian 00423 * 00424 * This function returns the partial derivatives of the mapping 00425 * function coefficient terms and the Jacobian calculated from 00426 * those terms and the cooresponding vertex coordinates. 00427 * 00428 * This function returns the same logical data as 'derivatives', 00429 * except that it also calculates the Jacobian from the actual 00430 * vertex coordinates. Also, unlike the 'derivatives' function 00431 * which returns the vertex indices as positions in the element 00432 * connectivity list, this function is expected to 00433 * a) return the actual indices of the vertices in the PatchData 00434 * vertex list and 00435 * b) remove from the list of indices and derivatives and values 00436 * corresponding to fixed vertices. 00437 * 00438 * The default implementation of this function will calculate the 00439 * Jacobian and modify the vertex and derivative lists returned 00440 * from "derivatives". The default implementation serves as a 00441 * utility function for other classes using this one. The function 00442 * is virtual to allow mapping function implementations to provide 00443 * an optimized version that avoids extra calculations for zero terms 00444 * in the derivative list. 00445 *\param pd The PatchData instance containing the vertex coordinates 00446 * and element connectcivity. 00447 *\param element_number The index of the mesh element in the PatchData. 00448 *\param nodeset List of which nodes are present in the element. 00449 *\param location Where within the element at which to evaluate the Jacobian. 00450 *\param vertex_patch_indices_out For each free vertex in the element 00451 * the influences the mapping function value at 00452 * the specified logical location, the index of 00453 * that vertex in the PatchData. 00454 *\param d_coeff_d_xi_out For each vertex in 'vertex_patch_indices_out', 00455 * the partial derivatives of the corresponding 00456 * coefficient of the mapping function. 00457 *\param num_vtx_out The number of values passed back in 00458 * 'vertex_patch_indices_out' and 'd_coeff_d_xi_out'. 00459 *\param jacobian_out The Jacobian of the mapping function at the 00460 * specified logical location. 00461 */ 00462 virtual void jacobian( const PatchData& pd, size_t element_number, NodeSet nodeset, Sample location, 00463 size_t* vertex_patch_indices_out, MsqVector< 3 >* d_coeff_d_xi_out, size_t& num_vtx_out, 00464 MsqMatrix< 3, 3 >& jacobian_out, MsqError& err ) const; 00465 00466 /**\brief Get ideal Jacobian matrix 00467 * 00468 * Returns the Jacobian matrix of an ideal element. The orientation 00469 * of element or corresponding matrix is arbitrary. The "ideal" element 00470 * should be scaled such the Jacobian (determinant of the Jacobian 00471 * matrix) is 1.0. 00472 * 00473 *\param location Where within the element at which to evaluate the Jacobian. 00474 * Typically doesn't matter except for degenerate elements 00475 * (e.g. pyramid as degenerate hex.) 00476 *\param jacobian_out The Jacobian of the mapping function at the 00477 * specified logical location. 00478 */ 00479 virtual void ideal( Sample location, MsqMatrix< 3, 3 >& jacobian_out, MsqError& err ) const; 00480 }; 00481 00482 inline void MappingFunction::convert_connectivity_indices( EntityTopology topo, int input_type, int output_type, 00483 size_t* index_list, unsigned num_indices, MsqError& err ) 00484 { 00485 // If the types are the same or either type has only corner 00486 // vertices, then no conversion is necessary. 00487 const int num_corners = TopologyInfo::corners( topo ); 00488 if( input_type != output_type && input_type != num_corners && output_type != num_corners ) 00489 convert_connectivity_indices_impl( topo, input_type, output_type, index_list, num_indices, err ); 00490 } 00491 00492 } // namespace MBMesquite 00493 00494 #endif