MOAB: Mesh Oriented datABase  (version 5.4.1)
XYPlanarDomain.cpp
Go to the documentation of this file.
00001 /* *****************************************************************
00002     MESQUITE -- The Mesh Quality Improvement Toolkit
00003 
00004     Copyright 2004 Sandia Corporation and Argonne National
00005     Laboratory.  Under the terms of Contract DE-AC04-94AL85000
00006     with Sandia Corporation, the U.S. Government 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     [email protected], [email protected], [email protected],
00024     [email protected], [email protected], [email protected],
00025     [email protected]
00026 
00027   ***************************************************************** */
00028 #include "XYPlanarDomain.hpp"
00029 #include "MsqError.hpp"
00030 #include "MsqVertex.hpp"
00031 #include "DomainUtil.hpp"
00032 
00033 #include <algorithm>
00034 
00035 MBMesquite::XYPlanarDomain::~XYPlanarDomain() {}
00036 
00037 void MBMesquite::XYPlanarDomain::snap_to( MBMesquite::Mesh::VertexHandle /*entity_handle*/, Vector3D& coordinate ) const
00038 {
00039     coordinate[2] = 0.0;
00040 }
00041 
00042 void MBMesquite::XYPlanarDomain::vertex_normal_at( MBMesquite::Mesh::VertexHandle /*entity_handle*/,
00043                                                    MBMesquite::Vector3D& coordinate ) const
00044 {
00045     coordinate = Vector3D( 0.0, 0.0, 1.0 );
00046 }
00047 
00048 void MBMesquite::XYPlanarDomain::element_normal_at( MBMesquite::Mesh::ElementHandle /*entity_handle*/,
00049                                                     MBMesquite::Vector3D& coordinate ) const
00050 {
00051     coordinate = Vector3D( 0.0, 0.0, 1.0 );
00052 }
00053 
00054 void MBMesquite::XYPlanarDomain::vertex_normal_at( const MBMesquite::Mesh::VertexHandle*,
00055                                                    Vector3D coords[],
00056                                                    unsigned count,
00057                                                    MBMesquite::MsqError& ) const
00058 {
00059     for( unsigned i = 0; i < count; ++i )
00060         coords[i] = Vector3D( 0.0, 0.0, 1.0 );
00061 }
00062 
00063 void MBMesquite::XYPlanarDomain::closest_point( MBMesquite::Mesh::VertexHandle,
00064                                                 const MBMesquite::Vector3D& position,
00065                                                 MBMesquite::Vector3D& closest,
00066                                                 MBMesquite::Vector3D& /*normal*/,
00067                                                 MBMesquite::MsqError& ) const
00068 {
00069     closest = Vector3D( position[0], position[1], 0.0 );
00070 }
00071 
00072 void MBMesquite::XYPlanarDomain::domain_DoF( const Mesh::VertexHandle*,
00073                                              unsigned short* dof_array,
00074                                              size_t num_vertices,
00075                                              MsqError& ) const
00076 {
00077     std::fill( dof_array, dof_array + num_vertices, 2 );
00078 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines