Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
IntxRllCssphere.hpp
Go to the documentation of this file.
00001 /*
00002  * IntxRllCssphere.hpp
00003  *
00004  */
00005 
00006 #ifndef INTXRLLCSSPHERE_HPP_
00007 #define INTXRLLCSSPHERE_HPP_
00008 
00009 #include "Intx2Mesh.hpp"
00010 
00011 namespace moab
00012 {
00013 
00014 class IntxRllCssphere : public moab::Intx2Mesh
00015 {
00016   public:
00017     IntxRllCssphere( Interface* mbimpl );
00018 
00019     virtual ~IntxRllCssphere();
00020 
00021     void set_radius( double radius )
00022     {
00023         R = radius;
00024     }
00025 
00026     double setup_tgt_cell( EntityHandle tgt, int& nsTgt );
00027 
00028     // src cell will be always lat lon cell, so it will be a rectangle in lat-lon coors
00029     // it will be used for "interior" determinations of other points
00030     // double setup_src_cell(EntityHandle src, int & nsSrc);
00031 
00032     // main method to intersect meshes on a sphere
00033 
00034     ErrorCode computeIntersectionBetweenTgtAndSrc( EntityHandle tgt,
00035                                                    EntityHandle src,
00036                                                    double* P,
00037                                                    int& nP,
00038                                                    double& area,
00039                                                    int markb[MAXEDGES],
00040                                                    int markr[MAXEDGES],
00041                                                    int& nsSrc,
00042                                                    int& nsTgt,
00043                                                    bool check_boxes_first = false );
00044 
00045     ErrorCode findNodes( EntityHandle tgt, int nsTgt, EntityHandle src, int nsSrc, double* iP, int nP );
00046 
00047   private:
00048     double R;            // radius of the sphere
00049     int plane;           // current gnomonic plane, will still be used for projection
00050     int srcEdgeType[4];  // at most 4
00051     // these could be from [-PI/2, +PI/2] and [0 to 2*PI]
00052 };
00053 
00054 } /* namespace moab */
00055 #endif /* INTXRLLCSSPHERE_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines