Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __PARAMEDMEMCOMPOCOMPONENT_I__
00021 #define __PARAMEMDEMCOMPOCOMPONENT_I__
00022
00023 #include "SALOMEconfig.h"
00024 #include CORBA_SERVER_HEADER(ParaMEDMEMComponent)
00025 #include "MPIObject_i.hxx"
00026 #include "SALOME_Component_i.hxx"
00027 #include "Topology.hxx"
00028 #include "MEDCouplingFieldDouble.hxx"
00029 #include "InterpKernelDEC.hxx"
00030 #include "InterpolationOptions.hxx"
00031 #include "MPIProcessorGroup.hxx"
00032 #include "CommInterface.hxx"
00033 #include "MEDCouplingFieldDoubleServant.hxx"
00034 #include "Utils_CorbaException.hxx"
00035 #include <map>
00036
00037 void * th_setinterpolationoptions(void *st);
00038 void * th_initializecoupling(void *st);
00039 void * th_terminatecoupling(void *st);
00040 void * th_getdata(void *st);
00041
00042 typedef struct
00043 {
00044 int ip;
00045 long print_level;
00046 const char * intersection_type;
00047 double precision;
00048 double median_plane;
00049 bool do_rotate;
00050 double bounding_box_adjustment;
00051 double bounding_box_adjustment_abs;
00052 double max_distance_for_3Dsurf_intersect;
00053 long orientation;
00054 bool measure_abs;
00055 const char * splitting_policy;
00056 bool P1P0_bary_method;
00057 std::string coupling;
00058 Engines::IORTab* tior;
00059 SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface_ptr fieldptr;
00060 } thread_st;
00061
00062 namespace ParaMEDMEM
00063 {
00064 class ParaMEDMEMComponent_i : public virtual POA_SALOME_MED::ParaMEDMEMComponent, public Engines_Component_i, public MPIObject_i
00065 {
00066
00067 public:
00068
00069 ParaMEDMEMComponent_i();
00070 ParaMEDMEMComponent_i(CORBA::ORB_ptr orb,
00071 PortableServer::POA_ptr poa,
00072 PortableServer::ObjectId * contId,
00073 const char *instanceName,
00074 const char *interfaceName,
00075 bool regist);
00076
00077
00078 virtual ~ParaMEDMEMComponent_i();
00079 void setInterpolationOptions(const char * coupling,
00080 CORBA::Long print_level,
00081 const char * intersection_type,
00082 CORBA::Double precision,
00083 CORBA::Double median_plane,
00084 CORBA::Boolean do_rotate,
00085 CORBA::Double bounding_box_adjustment,
00086 CORBA::Double bounding_box_adjustment_abs,
00087 CORBA::Double max_distance_for_3Dsurf_intersect,
00088 CORBA::Long orientation,
00089 CORBA::Boolean measure_abs,
00090 const char * splitting_policy,
00091 CORBA::Boolean P1P0_bary_method ) throw(SALOME::SALOME_Exception);
00092 void initializeCoupling(const char * coupling) throw(SALOME::SALOME_Exception);
00093 void terminateCoupling(const char * coupling) throw(SALOME::SALOME_Exception);
00094 void _getOutputField(const char * coupling, MEDCouplingFieldDouble* field);
00095
00096 protected:
00097 void _setInputField(const char * coupling, SALOME_MED::MPIMEDCouplingFieldDoubleCorbaInterface_ptr fieldptr, MEDCouplingFieldDouble* field);
00098
00099 private:
00100 CommInterface* _interface;
00101 std::map<std::string,InterpKernelDEC*> _dec;
00102 std::map<std::string,MPIProcessorGroup*> _source, _target;
00103 std::map<std::string,ProcessorGroup*> _commgroup;
00104 std::map<std::string,INTERP_KERNEL::InterpolationOptions*> _dec_options;
00105 };
00106 }
00107 #endif