#include "brttutil.h" BUMoment * bumoment_create(double mxx, double myy, double mzz, double mxy, double mxz, double myz, char *tag, char *handle) long bumoment_free (char *handle) void bumoment_free_bumoment (BUMoment *moment) BUMoment * bumoment_get_moment (char *handle) int bumoment_compute_bb (char *handle, char *vecP1_handle_outline, char *vecP2_handle_outline, char *vecP1_handle_fill, char *vecP2_handle_fill, char *vecDC1_handle_outline, char *vecDC2_handle_outline)
These subroutines create BRTT utility moment tensor objects (aka bumoment objects). A bumoment object represents a single seismic moment tensor characterised by a 3x3 symmetric matrix of seismic moment components.
bumoment_create will create a bumoment object and return a pointer to the object, or NULL if there is an error. The moment tensor components are specified by mxx, myy, mzz, mxy, mxz and myz. The X-Y-Z coordinate system used is X=positive east, Y=positive north and Z=positive up. tag can be used to specify a character string tag associated with the new object. An object handle is returned in handle and this handle is used for most subsequent calls to the new object.
bumoment_free will free the resources associated with the bumoment object referenced by handle.
bumoment_free_bumoment will free the resources associated with the bumoment object pointer moment.
bumoment_get_moment will return the bumoment object pointer referenced by handle.
bumoment_compute_bb will compute vectors needed for plotting moment tensor beachballs corresponding to the object referenced by handle. The vectors are returned as buvector2 objects (see buvector2(3)) in a X-Y cordinate system where X=positive east and Y=positive north scaled to a unit beachball. The pressure node outlines are returned in vecP1_handle_outline and vecP2_handle_outline. The pressure node fill vectors are returned in vecP1_handle_fill and vecP2_handle_fill. The best double couple node outlines are returned in vecDC1_handle_outline and vecDC2_handle_outline. If the input values of the handles are not blank, then the objects are first freed using the buvector2 recycling algorithm.