AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
inout.hpp File Reference

Defines a C-style interface for evaluating the inout query. More...

#include "axom/config.hpp"
#include "axom/quest/interface/internal/mpicomm_wrapper.hpp"
#include <string>

Namespaces

 axom
 
 axom::mint
 
 axom::quest
 

Functions

InOut query – initialization and finalization functions
int axom::quest::inout_init (const std::string &file, MPI_Comm comm=MPI_COMM_SELF)
 Initializes the quest inout query from a mesh file. More...
 
int axom::quest::inout_init (mint::Mesh *&mesh, MPI_Comm comm=MPI_COMM_SELF)
 Initialize the inout query using a pre-loaded mesh. More...
 
int axom::quest::inout_finalize ()
 Finalizes the inout query. More...
 
bool axom::quest::inout_initialized ()
 Predicate to test whether the inout query has been initialized. More...
 
InOut query – properties and querying functions
Note
These must be called after inout_init()
bool axom::quest::inout_evaluate (double x, double y, double z=0.)
 Tests if the point (x, y, z) is inside the contained volume. More...
 
int axom::quest::inout_evaluate (const double *x, const double *y, const double *z, int npoints, int *res)
 Tests an array of points for containment. More...
 
int axom::quest::inout_mesh_min_bounds (double *coords)
 Returns the lower coordinates of the mesh's bounding box. More...
 
int axom::quest::inout_mesh_max_bounds (double *coords)
 Returns the upper coordinates of the mesh's bounding box. More...
 
int axom::quest::inout_mesh_center_of_mass (double *coords)
 Returns the center of mass of the mesh. More...
 
int axom::quest::inout_get_dimension ()
 Gets the spatial dimension of the query. More...
 
InOut query – setup options and parameters
Note
These must be called before inout_init()
int axom::quest::inout_set_dimension (int dim)
 Sets the spatial dimension of the query. More...
 
int axom::quest::inout_set_verbose (bool verbosity)
 Enables/disables verbose logging output. More...
 
int axom::quest::inout_set_vertex_weld_threshold (double thresh)
 Sets the cutoff distance for welding vertices during initialization. More...
 
int axom::quest::inout_set_segments_per_knot_span (int segmentsPerKnotSpan)
 Sets the number of samples for each knot span (2D only) More...
 

Variables

constexpr int axom::quest::QUEST_INOUT_SUCCESS = 0
 
constexpr int axom::quest::QUEST_INOUT_FAILED = -1
 

Detailed Description

Defines a C-style interface for evaluating the inout query.

Given a watertight surface mesh and an arbitrary point in space, the inout query determines if the point is contained within the volume enclosed by the surface mesh.

The mesh can either be provided via a path to a mesh file, or as a pointer to a mint::Mesh object. The interface currently supports reading triangle meshes in the STL format.

The interface has several parameters that may be set before initializing the query (via inout_init() ), and several functions that are available once the query has been initialized.