Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2004 Sandia Corporation and Argonne National
5 : : Laboratory. Under the terms of Contract DE-AC04-94AL85000
6 : : with Sandia Corporation, the U.S. Government retains certain
7 : : rights in this software.
8 : :
9 : : This library is free software; you can redistribute it and/or
10 : : modify it under the terms of the GNU Lesser General Public
11 : : License as published by the Free Software Foundation; either
12 : : version 2.1 of the License, or (at your option) any later version.
13 : :
14 : : This library is distributed in the hope that it will be useful,
15 : : but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : : Lesser General Public License for more details.
18 : :
19 : : You should have received a copy of the GNU Lesser General Public License
20 : : (lgpl.txt) along with this library; if not, write to the Free Software
21 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 : :
23 : : [email protected], [email protected], [email protected],
24 : : [email protected], [email protected], [email protected],
25 : : [email protected]
26 : :
27 : : ***************************************************************** */
28 : : #include "XYPlanarDomain.hpp"
29 : : #include "MsqError.hpp"
30 : : #include "MsqVertex.hpp"
31 : : #include "DomainUtil.hpp"
32 : :
33 : : #include <algorithm>
34 : :
35 [ - + ]: 64 : MBMesquite::XYPlanarDomain::~XYPlanarDomain() {}
36 : :
37 : 0 : void MBMesquite::XYPlanarDomain::snap_to( MBMesquite::Mesh::VertexHandle /*entity_handle*/, Vector3D& coordinate ) const
38 : : {
39 : 0 : coordinate[2] = 0.0;
40 : 0 : }
41 : :
42 : 0 : void MBMesquite::XYPlanarDomain::vertex_normal_at( MBMesquite::Mesh::VertexHandle /*entity_handle*/,
43 : : MBMesquite::Vector3D& coordinate ) const
44 : : {
45 [ # # ]: 0 : coordinate = Vector3D( 0.0, 0.0, 1.0 );
46 : 0 : }
47 : :
48 : 61731 : void MBMesquite::XYPlanarDomain::element_normal_at( MBMesquite::Mesh::ElementHandle /*entity_handle*/,
49 : : MBMesquite::Vector3D& coordinate ) const
50 : : {
51 [ + - ]: 61731 : coordinate = Vector3D( 0.0, 0.0, 1.0 );
52 : 61731 : }
53 : :
54 : 45 : void MBMesquite::XYPlanarDomain::vertex_normal_at( const MBMesquite::Mesh::VertexHandle*, Vector3D coords[],
55 : : unsigned count, MBMesquite::MsqError& ) const
56 : : {
57 [ + + ]: 3330 : for( unsigned i = 0; i < count; ++i )
58 [ + - ]: 3285 : coords[i] = Vector3D( 0.0, 0.0, 1.0 );
59 : 45 : }
60 : :
61 : 85258 : void MBMesquite::XYPlanarDomain::closest_point( MBMesquite::Mesh::VertexHandle, const MBMesquite::Vector3D& position,
62 : : MBMesquite::Vector3D& closest, MBMesquite::Vector3D& /*normal*/,
63 : : MBMesquite::MsqError& ) const
64 : : {
65 [ + - ]: 85258 : closest = Vector3D( position[0], position[1], 0.0 );
66 : 85258 : }
67 : :
68 : 45 : void MBMesquite::XYPlanarDomain::domain_DoF( const Mesh::VertexHandle*, unsigned short* dof_array, size_t num_vertices,
69 : : MsqError& ) const
70 : : {
71 [ + - ]: 45 : std::fill( dof_array, dof_array + num_vertices, 2 );
72 [ + - ][ + - ]: 85 : }
|