Example demonstrating continent boundary detection on spherical meshes. More...
#include "moab/Core.hpp"#include "moab/ReadUtilIface.hpp"#include <cmath>#include "moab/CartVect.hpp"#include <iostream>#include <fstream>
Include dependency graph for ContinentsOnGlobe.cpp:Go to the source code of this file.
Functions | |
| double | getLat (CartVect p) |
| double | getLon (CartVect p) |
| bool | interior_point (vector< double > &coords, int &startLoop, int &endLoop, double lat, double lon) |
| int | main (int argc, char **argv) |
Variables | |
| string | bd_name = string( MESH_DIR ) + string( "/../examples/earth/boundary_points.dat" ) |
| string | loops = string( MESH_DIR ) + string( "/../examples/earth/SaveLoopCounts" ) |
| string | input_file = string( MESH_DIR ) + string( "/../examples/earth/poly2000.h5m" ) |
Example demonstrating continent boundary detection on spherical meshes.
This example shows how to:
This tool is useful for climate and geophysical applications where continent boundaries need to be identified on spherical meshes.
Definition in file ContinentsOnGlobe.cpp.
| double getLat | ( | CartVect | p | ) |
Definition at line 49 of file ContinentsOnGlobe.cpp.
References moab::CartVect::normalize().
Referenced by main().
| double getLon | ( | CartVect | p | ) |
Definition at line 54 of file ContinentsOnGlobe.cpp.
References moab::CartVect::normalize().
Referenced by main().
| bool interior_point | ( | vector< double > & | coords, |
| int & | startLoop, | ||
| int & | endLoop, | ||
| double | lat, | ||
| double | lon | ||
| ) |
Definition at line 74 of file ContinentsOnGlobe.cpp.
References moab::angle(), and moab::cross().
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
get loops for boundaries
Definition at line 96 of file ContinentsOnGlobe.cpp.
References moab::Core::add_entities(), bd_name, moab::Range::begin(), center(), moab::Core::create_meshset(), moab::Range::end(), moab::Core::get_coords(), moab::Core::get_entities_by_dimension(), getLat(), getLon(), input_file, interior_point(), moab::Core::load_file(), loops, mb, MB_CHK_SET_ERR, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, MESHSET_SET, moab::Range::size(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), and moab::Core::write_file().
| string bd_name = string( MESH_DIR ) + string( "/../examples/earth/boundary_points.dat" ) |
Definition at line 45 of file ContinentsOnGlobe.cpp.
Referenced by main().
| string input_file = string( MESH_DIR ) + string( "/../examples/earth/poly2000.h5m" ) |
Definition at line 47 of file ContinentsOnGlobe.cpp.
Referenced by moab::ReadRTT::get_header_data(), moab::ReadOBJ::load_file(), main(), moab::ReadRTT::parse_dims(), moab::ReadRTT::read_all_flags(), moab::ReadRTT::read_cell_defs(), moab::ReadRTT::read_facets(), moab::ReadRTT::read_header(), moab::ReadRTT::read_nodes(), and moab::ReadRTT::read_tets().
| string loops = string( MESH_DIR ) + string( "/../examples/earth/SaveLoopCounts" ) |
Definition at line 46 of file ContinentsOnGlobe.cpp.
Referenced by main().