#include <iostream>
#include <sstream>
#include <ctime>
#include <cstdlib>
#include <string>
#include <cmath>
#include "moab/Core.hpp"
#include "moab/Interface.hpp"
#include "moab/IntxMesh/Intx2MeshOnSphere.hpp"
#include "moab/ParallelComm.hpp"
#include "moab/ProgOptions.hpp"
#include "MBParallelConventions.h"
#include "moab/ReadUtilIface.hpp"
#include "MBTagConventions.hpp"
#include "IntxUtilsCSLAM.hpp"
#include "TestUtil.hpp"
Go to the source code of this file.
Variables | |
double | gtol = 1.e-9 |
double | radius = 1. |
bool | writeFiles = true |
bool | parallelWrite = false |
bool | velocity = false |
int | numSteps = 200 |
double | T = 5 |
Intx2MeshOnSphere * | pworker = NULL |
ErrorCode create_lagr_mesh | ( | moab::Interface * | mb, |
moab::EntityHandle | euler_set, | ||
moab::EntityHandle | lagr_set | ||
) |
Definition at line 957 of file linear_advection.cpp.
References moab::Core::add_entities(), moab::Range::begin(), CORRTAGNAME, moab::Core::create_element(), moab::Core::create_vertex(), moab::dum, moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_dimension(), moab::Core::globalId_tag(), mb, MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, moab::Core::tag_get_data(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), and moab::Core::type_from_handle().
void departure_point_swirl | ( | moab::CartVect & | arrival_point, |
double | t, | ||
double | delta_t, | ||
moab::CartVect & | departure_point | ||
) |
Definition at line 769 of file linear_advection.cpp.
References moab::IntxUtils::cart_to_spherical(), delta_t, moab::IntxUtils::SphereCoords::lat, moab::IntxUtils::SphereCoords::lon, moab::IntxUtils::SphereCoords::R, moab::IntxUtils::spherical_to_cart(), t, and T.
void departure_point_swirl_rot | ( | moab::CartVect & | arrival_point, |
double | t, | ||
double | delta_t, | ||
moab::CartVect & | departure_point | ||
) |
Definition at line 811 of file linear_advection.cpp.
References moab::IntxUtils::cart_to_spherical(), delta_t, moab::IntxUtils::SphereCoords::lat, moab::IntxUtils::SphereCoords::lon, moab::IntxUtils::SphereCoords::R, moab::IntxUtils::spherical_to_cart(), t, and T.
Referenced by get_departure_grid().
moab::ErrorCode get_barycenters | ( | moab::Interface * | mb, |
moab::EntityHandle | set, | ||
moab::Tag & | planeTag, | ||
moab::Tag & | barycenterTag, | ||
moab::Tag & | areaTag | ||
) |
Definition at line 341 of file linear_advection.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_dimension(), moab::IntxUtils::gnomonic_projection(), mb, MB_CHK_ERR, MB_SUCCESS, moab::R, moab::IntxUtils::reverse_gnomonic_projection(), moab::Core::tag_get_data(), and moab::Core::tag_set_data().
Referenced by main().
moab::ErrorCode get_departure_grid | ( | moab::Interface * | mb, |
moab::EntityHandle | euler_set, | ||
moab::EntityHandle | lagr_set, | ||
moab::EntityHandle | covering_set, | ||
int | tStep, | ||
moab::Range & | connecVerts | ||
) |
Definition at line 616 of file linear_advection.cpp.
References moab::Range::begin(), CORRTAGNAME, moab::Intx2Mesh::create_departure_mesh_3rd_alg(), delta_t, departure_point_swirl_rot(), moab::dum, moab::Range::end(), ErrorCode, moab::Core::get_coords(), moab::Core::get_entities_by_dimension(), mb, MB_CHK_ERR, MB_TAG_DENSE, MB_TYPE_HANDLE, numSteps, pworker, radius, moab::Core::set_coords(), t, T, moab::Core::tag_get_data(), and moab::Core::tag_get_handle().
Referenced by main().
void get_gnomonic_plane | ( | moab::Interface * | mb, |
moab::EntityHandle | set, | ||
moab::Tag & | planeTag | ||
) |
Definition at line 296 of file linear_advection.cpp.
References moab::Range::begin(), center(), moab::IntxUtils::decide_gnomonic_plane(), moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_dimension(), mb, MB_CHK_ERR, MB_SUCCESS, and moab::Core::tag_set_data().
Referenced by main().
moab::ErrorCode get_intersection_weights | ( | moab::Interface * | mb, |
moab::EntityHandle | euler_set, | ||
moab::EntityHandle | lagr_set, | ||
moab::EntityHandle | intx_set, | ||
moab::Tag & | planeTag, | ||
moab::Tag & | weightsTag | ||
) |
Definition at line 850 of file linear_advection.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_dimension(), moab::IntxUtils::gnomonic_projection(), mb, MB_CHK_ERR, MB_SUCCESS, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::R, moab::Range::size(), moab::Core::tag_get_data(), moab::Core::tag_get_handle(), and moab::Core::tag_set_data().
Referenced by main().
void get_linear_reconstruction | ( | moab::Interface * | mb, |
moab::EntityHandle | set, | ||
moab::Tag & | rhoTag, | ||
moab::Tag & | planeTag, | ||
moab::Tag & | barycenterTag, | ||
moab::Tag & | linearCoefTag | ||
) |
Definition at line 503 of file linear_advection.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Core::get_adjacencies(), moab::Core::get_connectivity(), moab::Core::get_entities_by_dimension(), moab::IntxUtils::gnomonic_projection(), mb, MB_CHK_ERR, MB_SUCCESS, moab::Range::size(), moab::Core::tag_get_data(), moab::Core::tag_set_data(), and moab::Interface::UNION.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 89 of file linear_advection.cpp.
References moab::Range::begin(), moab::Core::clear_meshset(), CORRTAGNAME, moab::Core::create_meshset(), IntxUtilsCSLAM::deep_copy_set(), moab::Core::delete_entities(), moab::dum, moab::Range::end(), ErrorCode, moab::Intx2Mesh::FindMaxEdges(), get_barycenters(), moab::Core::get_connectivity(), get_departure_grid(), moab::Core::get_entities_by_dimension(), get_gnomonic_plane(), get_intersection_weights(), get_linear_reconstruction(), gtol, moab::Intx2Mesh::intersect_meshes(), moab::Core::load_file(), mb, MB_CHK_ERR, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MESHSET_SET, numSteps, moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), pworker, radius, moab::Intx2Mesh::set_box_error(), set_density(), moab::Intx2Mesh::set_error_tolerance(), moab::Intx2MeshOnSphere::set_radius_destination_mesh(), moab::Intx2MeshOnSphere::set_radius_source_mesh(), moab::Range::size(), moab::subtract(), moab::Core::tag_get_data(), moab::Core::tag_get_handle(), moab::Core::tag_iterate(), update_density(), moab::Core::write_file(), and writeFiles.
moab::ErrorCode set_density | ( | moab::Interface * | mb, |
moab::EntityHandle | euler_set, | ||
moab::Tag & | barycenterTag, | ||
moab::Tag & | rhoTag, | ||
int | field_type | ||
) |
Definition at line 432 of file linear_advection.cpp.
References moab::Range::begin(), moab::IntxUtils::cart_to_spherical(), moab::Range::end(), ErrorCode, field_type, moab::Core::get_entities_by_dimension(), moab::IntxUtils::SphereCoords::lat, moab::IntxUtils::SphereCoords::lon, mb, MB_CHK_ERR, MB_SUCCESS, IntxUtilsCSLAM::quasi_smooth_field(), moab::IntxUtils::SphereCoords::R, moab::Range::size(), IntxUtilsCSLAM::slotted_cylinder_field(), IntxUtilsCSLAM::smooth_field(), moab::IntxUtils::spherical_to_cart(), moab::Core::tag_get_data(), and moab::Core::tag_set_data().
Referenced by main().
moab::ErrorCode update_density | ( | moab::Interface * | mb, |
moab::EntityHandle | euler_set, | ||
moab::EntityHandle | lagr_set, | ||
moab::EntityHandle | out_set, | ||
moab::Tag & | rhoTag, | ||
moab::Tag & | areaTag, | ||
moab::Tag & | rhoCoefsTag, | ||
moab::Tag & | weightsTag, | ||
moab::Tag & | planeTag | ||
) |
Definition at line 661 of file linear_advection.cpp.
References moab::Range::begin(), CORRTAGNAME, moab::dum, moab::Range::end(), ErrorCode, moab::Core::get_entities_by_dimension(), moab::Range::index(), mb, MB_CHK_ERR, MB_SUCCESS, MB_TAG_DENSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, moab::R, moab::Range::size(), moab::Core::tag_get_data(), moab::Core::tag_get_handle(), moab::Core::tag_iterate(), and moab::Core::tag_set_data().
Referenced by main().
double gtol = 1.e-9 |
Definition at line 76 of file linear_advection.cpp.
Referenced by main().
int numSteps = 200 |
Definition at line 84 of file linear_advection.cpp.
Referenced by get_departure_grid(), and main().
bool parallelWrite = false |
Definition at line 81 of file linear_advection.cpp.
Intx2MeshOnSphere* pworker = NULL |
Definition at line 87 of file linear_advection.cpp.
Referenced by get_departure_grid(), and main().
double radius = 1. |
Definition at line 78 of file linear_advection.cpp.
Referenced by get_departure_grid(), and main().
double T = 5 |
Definition at line 85 of file linear_advection.cpp.
Referenced by departure_point_swirl(), departure_point_swirl_rot(), and get_departure_grid().
bool velocity = false |
Definition at line 82 of file linear_advection.cpp.
bool writeFiles = true |
Definition at line 80 of file linear_advection.cpp.
Referenced by main().