cgma
|
00001 00002 #ifndef ChollaMesh_hpp 00003 #define ChollaMesh_hpp 00004 00005 #include "SMDInterface.hpp" 00006 00007 class FacetEntity; 00008 class CubitPoint; 00009 00010 // a SMD interface to Cholla data structures 00011 class ChollaMesh : public SMD::MeshData 00012 { 00013 public: 00014 ChollaMesh(); 00015 ~ChollaMesh(); 00016 00017 FacetEntity* convert_to_facet(SMD::SMDElement elem); 00018 CubitPoint* convert_to_point(SMD::SMDNode node); 00019 SMD::SMDElement convert_from_facet(FacetEntity* f); 00020 SMD::SMDNode convert_from_point(CubitPoint* p); 00021 00022 00023 SMD::ErrorCode get_ids(size_t num, const SMD::SMDNode nodes[], int ids[]); 00024 SMD::ErrorCode get_ids(size_t num, const SMD::SMDElement elems[], int ids[]); 00025 00026 SMD::ErrorCode get_node_handle(int id, SMD::SMDNode &node); 00027 SMD::ErrorCode get_element_handle(SMD::ElementType type, int id, SMD::SMDElement &elem); 00028 SMD::ErrorCode get_element_types(int num_elems, const SMD::SMDElement elem_handle_array[], 00029 SMD::ElementType type_array[], bool* same_type); 00030 SMD::ErrorCode get_element_dimensions(int num_elems, const SMD::SMDElement elem_handle_array[], 00031 int dimensions[]); 00032 00033 SMD::ErrorCode get_element_length(SMD::SMDElement elem_handle, double& length); 00034 SMD::ErrorCode get_element_area(SMD::SMDElement elem_handle, double& area); 00035 00036 SMD::ErrorCode get_element_normal(SMD::SMDElement elem_handle, double normal_vector[3]); 00037 SMD::ErrorCode get_element_centroid(SMD::SMDElement elem_handle, double centroid[3]); 00038 00039 SMD::ErrorCode get_coords(int num_nodes, const SMD::SMDNode node_handle_array[], float coords[][3]); 00040 SMD::ErrorCode get_coords(int num_nodes, const SMD::SMDNode node_handle_array[], double coords[][3]); 00041 SMD::ErrorCode get_coords(int num_nodes, const SMD::SMDNode node_handle_array[], 00042 SMD::Real x_coords[], SMD::Real y_coords[], SMD::Real z_coords[]); 00043 SMD::ErrorCode get_connectivity( 00044 int num_elems, 00045 const SMD::SMDElement elements[], 00046 int& node_array_size, 00047 SMD::SMDNode node_handles[]); 00048 00049 SMD::ErrorCode get_expanded_connectivity( 00050 int num_elems, 00051 const SMD::SMDElement elements[], 00052 unsigned int nodes_per_elem, 00053 int node_array_size, 00054 SMD::SMDNode node_handles[]); 00055 00056 SMD::ErrorCode get_expanded_connectivity( 00057 SMD::SMDElement elements, 00058 unsigned int& nodes_per_elem, 00059 int node_array_size, 00060 SMD::SMDNode node_handles[]); 00061 00062 SMD::ErrorCode create_nodes( 00063 unsigned int num_nodes, 00064 const SMD::Real coords[][3], 00065 SMD::SMeshOwner owner, 00066 SMD::SMDNode node_handles[]); 00067 00068 // KGM 00069 SMD::ErrorCode create_nodes( 00070 unsigned int num_nodes, 00071 const SMD::Real* coords, 00072 SMD::SMeshOwner owner, 00073 SMD::SMDNode node_handles[]){return SMD::ERR_NOT_IMPLEMENTED;} 00074 00075 SMD::ErrorCode create_elements( 00076 SMD::ElementType type, 00077 unsigned int num_nodes, 00078 const SMD::SMDNode node_handle_array[], 00079 unsigned int num_elements, 00080 unsigned int num_nodes_per_element, 00081 const unsigned int connectivity[], 00082 SMD::SMeshOwner new_entities_owner, 00083 SMD::SMDElement *created_element_handles); 00084 00085 SMD::ErrorCode delete_node(SMD::SMDNode node); 00086 00087 SMD::ErrorCode delete_element(SMD::SMDElement element); 00088 00089 SMD::ErrorCode reverse_element_connectivity(SMD::SMDElement element); 00090 00091 SMD::ErrorCode find_element(SMD::ElementType type, unsigned int num_pts, const SMD::SMDNode nodes[], 00092 SMD::SMDElement& found_element); 00093 00094 }; 00095 00096 #endif // ChollaMesh_hpp 00097