Version: 6.3.1

src/ParaMEDMEMComponent/ParaMEDMEMComponent_i.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
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     // Constructor
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     // Destructor
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
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS