/*! * \brief Return the Cartesian bounding box around an entity. * * \param bounds The bounds of the box * (x_min,y_min,z_min,x_max,y_max,z_max). */ void boundingBox( Teuchos::Tuple<double,6>& bounds ) const override { for ( int d = 0; d < physicalDimension(); ++d ) { bounds[d] = d_ip->d_physical_coordinates[d]; bounds[d+3] = d_ip->d_physical_coordinates[d]; } for ( int d = physicalDimension(); d < 3; ++d ) { bounds[d] = -std::numeric_limits<double>::max(); bounds[d+3] = std::numeric_limits<double>::max(); } }
//---------------------------------------------------------------------------// // Return the Cartesian bounding box around an entity. void POD_PointCloudEntityImpl::boundingBox( Teuchos::Tuple<double,6>& bounds ) const { for ( int d = 0; d < physicalDimension(); ++d ) { bounds[d] = d_cloud_coords[ d_offsets[d] ]; bounds[d+3] = bounds[d]; } for ( int d = physicalDimension(); d < 3; ++d ) { bounds[d] = 0.0; bounds[d+3] = bounds[d]; } }
//---------------------------------------------------------------------------// // Get the entity type. EntityType STKMeshEntityImpl::entityType() const { DTK_REQUIRE( Teuchos::nonnull(d_bulk_data) ); stk::mesh::EntityRank rank = d_bulk_data->entity_rank(d_extra_data->d_stk_entity); return STKMeshHelpers::getTypeFromRank( rank, physicalDimension() ); }
//---------------------------------------------------------------------------// // Provide a verbose description of the object. void POD_PointCloudEntityImpl::describe( Teuchos::FancyOStream& out, const Teuchos::EVerbosityLevel /*verb_level*/ ) const { out << std::endl; out << "---" << std::endl; out << "POD Point Cloud Entity" << std::endl; out << "Id: " << id() << std::endl; out << "Owner rank: " << ownerRank() << std::endl; out << "Point coords: "; for ( int d = 0; d < physicalDimension(); ++d ) { out << d_cloud_coords[d_offsets[d]] << " "; } out << std::endl; }
//---------------------------------------------------------------------------// // Get the coordinates of the point in a given dimension. double POD_PointCloudEntityImpl::coord( const int dim ) const { DTK_REQUIRE( dim < physicalDimension() ); return d_cloud_coords[ d_offsets[dim] ]; }