예제 #1
0
   void cxios_write_data_k80(const char* fieldid, int fieldid_size, double* data_k8, int data_Xsize)
   {
      std::string fieldid_str;
      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;

      CTimer::get("XIOS").resume();
      CTimer::get("XIOS send field").resume();
      CContext* context = CContext::getCurrent();
      if (!context->hasServer && !context->client->isAttachedModeEnabled())
        context->checkBuffersAndListen();
      CArray<double, 1> data(data_k8, shape(data_Xsize), neverDeleteData);
      CField::get(fieldid_str)->setData(data);
      CTimer::get("XIOS send field").suspend();
      CTimer::get("XIOS").suspend();
   }
예제 #2
0
   void cxios_read_data_k43(const char* fieldid, int fieldid_size, float* data_k4, int data_Xsize, int data_Ysize, int data_Zsize)
   {
      std::string fieldid_str;
      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;

      CTimer::get("XIOS").resume();
      CTimer::get("XIOS recv field").resume();

      CContext* context = CContext::getCurrent();
      if (!context->hasServer && !context->client->isAttachedModeEnabled())
        context->checkBuffersAndListen();

      CArray<double, 3> data(data_Xsize, data_Ysize, data_Zsize);
      CField::get(fieldid_str)->getData(data);
      CArray<float, 3> data_tmp(data_k4, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
      data_tmp = data;

      CTimer::get("XIOS recv field").suspend();
      CTimer::get("XIOS").suspend();
    }
예제 #3
0
   void cxios_write_data_k47(const char* fieldid, int fieldid_size, float* data_k4,
                             int data_0size, int data_1size, int data_2size,
                             int data_3size, int data_4size, int data_5size,
                             int data_6size)
   {
      std::string fieldid_str;
      if (!cstr2string(fieldid, fieldid_size, fieldid_str)) return;

      CTimer::get("XIOS").resume();
      CTimer::get("XIOS send field").resume();

      CContext* context = CContext::getCurrent();
      if (!context->hasServer && !context->client->isAttachedModeEnabled())
        context->checkBuffersAndListen();

      CArray<float, 7> data_tmp(data_k4, shape(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size), neverDeleteData);
      CArray<double, 7> data(data_0size, data_1size, data_2size, data_3size, data_4size, data_5size, data_6size);
      data = data_tmp;
      CField::get(fieldid_str)->setData(data);

      CTimer::get("XIOS send field").suspend();
      CTimer::get("XIOS").suspend();
    }