MOAB: Mesh Oriented datABase  (version 5.2.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     diachin2@llnl.gov, djmelan@sandia.gov, mbrewer@sandia.gov,
00024     pknupp@sandia.gov, tleurent@mcs.anl.gov, tmunson@mcs.anl.gov,
00025     kraftche@cae.wisc.edu
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*, Vector3D coords[],
00055                                                    unsigned count, MBMesquite::MsqError& ) const
00056 {
00057     for( unsigned i = 0; i < count; ++i )
00058         coords[i] = Vector3D( 0.0, 0.0, 1.0 );
00059 }
00060 
00061 void MBMesquite::XYPlanarDomain::closest_point( MBMesquite::Mesh::VertexHandle, const MBMesquite::Vector3D& position,
00062                                                 MBMesquite::Vector3D& closest, MBMesquite::Vector3D& /*normal*/,
00063                                                 MBMesquite::MsqError& ) const
00064 {
00065     closest = Vector3D( position[0], position[1], 0.0 );
00066 }
00067 
00068 void MBMesquite::XYPlanarDomain::domain_DoF( const Mesh::VertexHandle*, unsigned short* dof_array, size_t num_vertices,
00069                                              MsqError& ) const
00070 {
00071     std::fill( dof_array, dof_array + num_vertices, 2 );
00072 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines