source: XIOS/trunk/src/node/axis.cpp @ 666

Last change on this file since 666 was 666, checked in by mhnguyen, 9 years ago

Change name of several axis attributes and remove some redundant variable of domain

+) Change name of axis attributes to make them consistent with ones of domain
+) Remove zoom_client_* of domain

Test
+) On Curie
+) All tests pass and are correct

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
  • Property svn:executable set to *
File size: 21.1 KB
Line 
1#include "axis.hpp"
2
3#include "attribute_template.hpp"
4#include "object_template.hpp"
5#include "group_template.hpp"
6#include "message.hpp"
7#include "type.hpp"
8#include "context.hpp"
9#include "context_client.hpp"
10#include "xios_spl.hpp"
11#include "inverse_axis.hpp"
12#include "zoom_axis.hpp"
13#include "interpolate_axis.hpp"
14#include "server_distribution_description.hpp"
15#include "client_server_mapping_distributed.hpp"
16
17namespace xios {
18
19   /// ////////////////////// Définitions ////////////////////// ///
20
21   CAxis::CAxis(void)
22      : CObjectTemplate<CAxis>()
23      , CAxisAttributes(), isChecked(false), relFiles(), baseRefObject(), areClientAttributesChecked_(false)
24      , isDistributed_(false), hasBounds_(false)
25      , transformationMap_(), global_zoom_begin(0), global_zoom_size(0)
26   {
27   }
28
29   CAxis::CAxis(const StdString & id)
30      : CObjectTemplate<CAxis>(id)
31      , CAxisAttributes(), isChecked(false), relFiles(), baseRefObject(), areClientAttributesChecked_(false)
32      , isDistributed_(false), hasBounds_(false)
33      , transformationMap_(), global_zoom_begin(0), global_zoom_size(0)
34   {
35   }
36
37   CAxis::~CAxis(void)
38   { /* Ne rien faire de plus */ }
39
40   ///---------------------------------------------------------------
41
42   const std::set<StdString> & CAxis::getRelFiles(void) const
43   {
44      return (this->relFiles);
45   }
46
47   bool CAxis::IsWritten(const StdString & filename) const
48   {
49      return (this->relFiles.find(filename) != this->relFiles.end());
50   }
51
52   bool CAxis::isDistributed(void) const
53   {
54      return isDistributed_;
55   }
56
57   void CAxis::addRelFile(const StdString & filename)
58   {
59      this->relFiles.insert(filename);
60   }
61
62   //----------------------------------------------------------------
63
64   StdString CAxis::GetName(void)   { return (StdString("axis")); }
65   StdString CAxis::GetDefName(void){ return (CAxis::GetName()); }
66   ENodeType CAxis::GetType(void)   { return (eAxis); }
67
68   //----------------------------------------------------------------
69
70   CAxis* CAxis::createAxis()
71   {
72     CAxis* axis = CAxisGroup::get("axis_definition")->createChild();
73     return axis;
74   }
75
76   void CAxis::checkAttributes(void)
77   {
78      if (this->n_glo.isEmpty())
79         ERROR("CAxis::checkAttributes(void)",
80               << "Attribute <n_glo> of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be specified");
81      StdSize size = this->n_glo.getValue();
82
83      isDistributed_ = !this->begin.isEmpty() || !this->n.isEmpty();
84
85      if (!this->begin.isEmpty())
86      {
87        StdSize ibegin = this->begin.getValue();
88        if ((ibegin < 0) || (ibegin > size-1))
89          ERROR("CAxis::checkAttributes(void)",
90                << "Attribute <ibegin> of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be non-negative and smaller than size-1");
91      }
92      else this->begin.setValue(0);
93
94      if (!this->n.isEmpty())
95      {
96        StdSize ni = this->n.getValue();
97        if ((ni < 0) || (ni > size))
98          ERROR("CAxis::checkAttributes(void)",
99                << "Attribute <ni> of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be non-negative and smaller than size");
100      }
101      else this->n.setValue(size);
102
103      StdSize true_size = value.numElements();
104      if (this->n.getValue() != true_size)
105         ERROR("CAxis::checkAttributes(void)",
106               << "The array \'value\' of axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] has a different size that the one defined by the \'size\' attribute");
107
108      this->checkData();
109      this->checkZoom();
110      this->checkMask();
111      this->checkBounds();
112   }
113
114   void CAxis::checkData()
115   {
116      if (data_begin.isEmpty()) data_begin.setValue(0);
117      if (!data_n.isEmpty() && data_n.getValue() <= 0)
118      {
119        ERROR("CAxis::checkData(void)",
120              << "Data dimension is negative (data_n).");
121      }
122      else if (data_n.isEmpty())
123        data_n.setValue(n.getValue());
124
125      if (data_index.isEmpty())
126      {
127        int dn = data_n.getValue();
128        data_index.resize(dn);
129        for (int i = 0; i < dn; ++i) data_index(i) = i;
130      }
131   }
132
133   void CAxis::checkZoom(void)
134   {
135     if (0 == global_zoom_size) global_zoom_size = this->n_glo.getValue();
136   }
137
138   void CAxis::checkMask()
139   {
140      if (!mask.isEmpty())
141      {
142         if (mask.extent(0) != n)
143            ERROR("CAxis::checkMask(void)",
144                  << "the mask has not the same size than the local axis" << endl
145                  << "Local size is " << n << "x" << endl
146                  << "Mask size is " << mask.extent(0) << "x");
147      }
148      else // (!mask.hasValue())
149      { // Si aucun masque n'est défini,
150        // on en crée un nouveau qui valide l'intégralité du domaine.
151         mask.resize(n);
152         for (int i = 0; i < n.getValue(); ++i)
153         {
154           mask(i) = true;
155         }
156      }
157   }
158
159  void CAxis::checkBounds()
160  {
161    if (!bounds.isEmpty())
162    {
163      if (bounds.extent(0) != n || bounds.extent(1) != 2)
164          ERROR("CAxis::checkAttributes(void)",
165                << "The bounds array of the axis [ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] must be of dimension axis size x 2" << endl
166                << "Axis size is " << n << endl
167                << "Bounds size is "<< bounds.extent(0) << " x " << bounds.extent(1));
168      hasBounds_ = true;
169    }
170    else hasBounds_ = false;
171  }
172
173
174  bool CAxis::dispatchEvent(CEventServer& event)
175   {
176      if (SuperClass::dispatchEvent(event)) return true;
177      else
178      {
179        switch(event.type)
180        {
181           case EVENT_ID_SERVER_ATTRIBUT :
182             recvServerAttribut(event);
183             return true;
184             break;
185           case EVENT_ID_INDEX:
186            recvIndex(event);
187            return true;
188            break;
189          case EVENT_ID_DISTRIBUTED_VALUE:
190            recvDistributedValue(event);
191            return true;
192            break;
193          case EVENT_ID_NON_DISTRIBUTED_VALUE:
194            recvNonDistributedValue(event);
195            return true;
196            break;
197           default :
198             ERROR("bool CContext::dispatchEvent(CEventServer& event)",
199                    << "Unknown Event");
200           return false;
201         }
202      }
203   }
204
205   void CAxis::checkAttributesOnClient(const std::vector<int>& globalDim, int orderPositionInGrid,
206                                       CServerDistributionDescription::ServerDistributionType distType)
207   {
208     if (this->areClientAttributesChecked_) return;
209
210     this->checkAttributes();
211
212     this->areClientAttributesChecked_ = true;
213   }
214
215   // Send all checked attributes to server
216   void CAxis::sendCheckedAttributes(const std::vector<int>& globalDim, int orderPositionInGrid,
217                                     CServerDistributionDescription::ServerDistributionType distType)
218   {
219     if (!this->areClientAttributesChecked_) checkAttributesOnClient(globalDim,
220                                                                     orderPositionInGrid,
221                                                                     distType);
222     CContext* context = CContext::getCurrent();
223
224     if (this->isChecked) return;
225     if (context->hasClient)
226     {
227       sendServerAttribut(globalDim, orderPositionInGrid, distType);
228       sendValue();
229     }
230
231     this->isChecked = true;
232   }
233
234  void CAxis::sendValue()
235  {
236     if (n.getValue() == n_glo.getValue())
237     {
238       sendNonDistributedValue();
239     }
240     else
241     {
242       computeConnectedServer();
243       sendDistributedValue();
244     }
245  }
246
247  void CAxis::computeConnectedServer()
248  {
249    CContext* context = CContext::getCurrent();
250    CContextClient* client = context->client;
251    int nbServer = client->serverSize;
252    int range, clientSize = client->clientSize;
253    size_t ni = this->n.getValue();
254    size_t ibegin = this->begin.getValue();
255
256    CArray<size_t,1> globalIndexAxis(ni);
257    int zoom_end = global_zoom_begin+global_zoom_size-1;
258    std::vector<size_t> globalAxisZoom;
259    for (size_t idx = 0; idx < ni; ++idx)
260    {
261      size_t globalIndex = ibegin + idx;
262      globalIndexAxis(idx) = globalIndex;
263      if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) globalAxisZoom.push_back(globalIndex);
264    }
265
266    std::vector<int> nGlobDomain(1);
267    nGlobDomain[0] = n_glo.getValue();
268
269    size_t globalSizeIndex = 1, indexBegin, indexEnd;
270    for (int i = 0; i < nGlobDomain.size(); ++i) globalSizeIndex *= nGlobDomain[i];
271    indexBegin = 0;
272    for (int i = 0; i < clientSize; ++i)
273    {
274      range = globalSizeIndex / clientSize;
275      if (i < (globalSizeIndex%clientSize)) ++range;
276      if (i == client->clientRank) break;
277      indexBegin += range;
278    }
279    indexEnd = indexBegin + range - 1;
280
281    CServerDistributionDescription serverDescription(nGlobDomain);
282    serverDescription.computeServerGlobalIndexInRange(nbServer, std::make_pair<size_t,size_t>(indexBegin, indexEnd), 0);
283    CClientServerMapping* clientServerMap = new CClientServerMappingDistributed(serverDescription.getGlobalIndexRange(), client->intraComm);
284    clientServerMap->computeServerIndexMapping(globalIndexAxis);
285    const std::map<int, std::vector<size_t> >& globalIndexAxisOnServer = clientServerMap->getGlobalIndexOnServer();
286
287    std::map<int, std::vector<size_t> >::const_iterator it = globalIndexAxisOnServer.begin(),
288                                                       ite = globalIndexAxisOnServer.end();
289    std::vector<size_t>::const_iterator itbVec = (globalAxisZoom).begin(),
290                                        iteVec = (globalAxisZoom).end();
291    indSrv_.clear();
292    for (; it != ite; ++it)
293    {
294      int rank = it->first;
295      const std::vector<size_t>& globalIndexTmp = it->second;
296      int nb = globalIndexTmp.size();
297
298      for (int i = 0; i < nb; ++i)
299      {
300        if (std::binary_search(itbVec, iteVec, globalIndexTmp[i]))
301        {
302          indSrv_[rank].push_back(globalIndexTmp[i]);
303        }
304      }
305    }
306
307    connectedServerRank_.clear();
308    for (it = globalIndexAxisOnServer.begin(); it != ite; ++it) {
309      connectedServerRank_.push_back(it->first);
310    }
311
312    if (!indSrv_.empty())
313    {
314      connectedServerRank_.clear();
315      for (it = indSrv_.begin(); it != indSrv_.end(); ++it)
316        connectedServerRank_.push_back(it->first);
317    }
318    nbConnectedClients_ = clientServerMap->computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRank_);
319    delete clientServerMap;
320  }
321
322  void CAxis::sendNonDistributedValue()
323  {
324    CContext* context = CContext::getCurrent();
325    CContextClient* client = context->client;
326    CEventClient event(getType(),EVENT_ID_NON_DISTRIBUTED_VALUE);
327
328    int zoom_end = global_zoom_begin+global_zoom_size-1;
329    int nb =0;
330    for (size_t idx = 0; idx < n; ++idx)
331    {
332      size_t globalIndex = begin + idx;
333      if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nb;
334    }
335
336    CArray<double,1> val(nb);
337    nb = 0;
338    for (size_t idx = 0; idx < n; ++idx)
339    {
340      size_t globalIndex = begin + idx;
341      if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end)
342      {
343        val(nb) = value(idx);
344        ++nb;
345      }
346    }
347
348    if (client->isServerLeader())
349    {
350      std::list<CMessage> msgs;
351
352      const std::list<int>& ranks = client->getRanksServerLeader();
353      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
354      {
355        // Use const int to ensure CMessage holds a copy of the value instead of just a reference
356        msgs.push_back(CMessage());
357        CMessage& msg = msgs.back();
358        msg << this->getId();
359        msg << val;
360        event.push(*itRank,1,msg);
361      }
362      client->sendEvent(event);
363    }
364    else client->sendEvent(event);
365  }
366
367  void CAxis::sendDistributedValue(void)
368  {
369    int ns, n, i, j, ind, nv, idx;
370    CContext* context = CContext::getCurrent();
371    CContextClient* client=context->client;
372
373    // send value for each connected server
374    CEventClient eventIndex(getType(), EVENT_ID_INDEX);
375    CEventClient eventVal(getType(), EVENT_ID_DISTRIBUTED_VALUE);
376
377    list<CMessage> list_msgsIndex, list_msgsVal;
378    list<CArray<int,1> > list_indi;
379    list<CArray<double,1> > list_val;
380    list<CArray<double,2> > list_bounds;
381
382    std::map<int, std::vector<size_t> >::const_iterator it, iteMap;
383    iteMap = indSrv_.end();
384    for (int k = 0; k < connectedServerRank_.size(); ++k)
385    {
386      int nbData = 0;
387      int rank = connectedServerRank_[k];
388      it = indSrv_.find(rank);
389      if (iteMap != it)
390        nbData = it->second.size();
391
392      list_indi.push_back(CArray<int,1>(nbData));
393      list_val.push_back(CArray<double,1>(nbData));
394
395      if (hasBounds_)
396      {
397        list_bounds.push_back(CArray<double,2>(2,nbData));
398      }
399
400      CArray<int,1>& indi = list_indi.back();
401      CArray<double,1>& val = list_val.back();
402
403      for (n = 0; n < nbData; ++n)
404      {
405        idx = static_cast<int>(it->second[n]);
406        ind = idx - begin;
407
408        val(n) = value(ind);
409        indi(n) = idx;
410
411        if (hasBounds_)
412        {
413          CArray<double,2>& boundsVal = list_bounds.back();
414          boundsVal(0, n) = bounds(0,n);
415          boundsVal(1, n) = bounds(1,n);
416        }
417      }
418
419      list_msgsIndex.push_back(CMessage());
420      list_msgsIndex.back() << this->getId() << list_indi.back();
421
422      list_msgsVal.push_back(CMessage());
423      list_msgsVal.back() << this->getId() << list_val.back();
424
425      if (hasBounds_)
426      {
427        list_msgsVal.back() << list_bounds.back();
428      }
429
430      eventIndex.push(rank, nbConnectedClients_[rank], list_msgsIndex.back());
431      eventVal.push(rank, nbConnectedClients_[rank], list_msgsVal.back());
432    }
433
434    client->sendEvent(eventIndex);
435    client->sendEvent(eventVal);
436  }
437
438  void CAxis::recvIndex(CEventServer& event)
439  {
440    list<CEventServer::SSubEvent>::iterator it;
441    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
442    {
443      CBufferIn* buffer = it->buffer;
444      string domainId;
445      *buffer >> domainId;
446      get(domainId)->recvIndex(it->rank, *buffer);
447    }
448  }
449
450  void CAxis::recvIndex(int rank, CBufferIn& buffer)
451  {
452    buffer >> indiSrv_[rank];
453  }
454
455  void CAxis::recvDistributedValue(CEventServer& event)
456  {
457    list<CEventServer::SSubEvent>::iterator it;
458    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
459    {
460      CBufferIn* buffer = it->buffer;
461      string domainId;
462      *buffer >> domainId;
463      get(domainId)->recvDistributedValue(it->rank, *buffer);
464    }
465  }
466
467  void CAxis::recvDistributedValue(int rank, CBufferIn& buffer)
468  {
469    CArray<int,1> &indi = indiSrv_[rank];
470    CArray<double,1> val;
471    CArray<double,2> boundsVal;
472
473    buffer >> val;
474    if (hasBounds_) buffer >> boundsVal;
475
476    int i, j, ind_srv;
477    for (int ind = 0; ind < indi.numElements(); ++ind)
478    {
479      i = indi(ind);
480      ind_srv = i - zoom_begin_srv;
481      value_srv(ind_srv) = val(ind);
482      if (hasBounds_)
483      {
484        bound_srv(0,ind_srv) = boundsVal(0, ind);
485        bound_srv(1,ind_srv) = boundsVal(1, ind);
486      }
487    }
488  }
489
490   void CAxis::recvNonDistributedValue(CEventServer& event)
491  {
492    list<CEventServer::SSubEvent>::iterator it;
493    for (it = event.subEvents.begin(); it != event.subEvents.end(); ++it)
494    {
495      CBufferIn* buffer = it->buffer;
496      string domainId;
497      *buffer >> domainId;
498      get(domainId)->recvNonDistributedValue(it->rank, *buffer);
499    }
500  }
501
502  void CAxis::recvNonDistributedValue(int rank, CBufferIn& buffer)
503  {
504    CArray<double,1> val;
505    buffer >> val;
506
507    for (int ind = 0; ind < val.numElements(); ++ind)
508    {
509      value_srv(ind) = val(ind);
510      if (hasBounds_)
511      {
512        bound_srv(0,ind) = bounds(0,ind);
513        bound_srv(1,ind) = bounds(1,ind);
514      }
515    }
516  }
517
518  void CAxis::sendServerAttribut(const std::vector<int>& globalDim, int orderPositionInGrid,
519                                 CServerDistributionDescription::ServerDistributionType distType)
520  {
521    CContext* context = CContext::getCurrent();
522    CContextClient* client = context->client;
523
524    CServerDistributionDescription serverDescription(globalDim);
525
526    int nbServer = client->serverSize;
527
528    serverDescription.computeServerDistribution(nbServer, false, distType);
529    std::vector<std::vector<int> > serverIndexBegin = serverDescription.getServerIndexBegin();
530    std::vector<std::vector<int> > serverDimensionSizes = serverDescription.getServerDimensionSizes();
531
532    CEventClient event(getType(),EVENT_ID_SERVER_ATTRIBUT);
533    if (client->isServerLeader())
534    {
535      std::list<CMessage> msgs;
536
537      const std::list<int>& ranks = client->getRanksServerLeader();
538      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank)
539      {
540        // Use const int to ensure CMessage holds a copy of the value instead of just a reference
541        const int begin = serverIndexBegin[*itRank][orderPositionInGrid];
542        const int ni    = serverDimensionSizes[*itRank][orderPositionInGrid];
543        const int end   = begin + ni - 1;
544
545        msgs.push_back(CMessage());
546        CMessage& msg = msgs.back();
547        msg << this->getId();
548        msg << ni << begin << end;
549        msg << global_zoom_begin << global_zoom_size;
550
551        event.push(*itRank,1,msg);
552      }
553      client->sendEvent(event);
554    }
555    else client->sendEvent(event);
556  }
557
558  void CAxis::recvServerAttribut(CEventServer& event)
559  {
560    CBufferIn* buffer = event.subEvents.begin()->buffer;
561    string axisId;
562    *buffer >> axisId;
563    get(axisId)->recvServerAttribut(*buffer);
564  }
565
566  void CAxis::recvServerAttribut(CBufferIn& buffer)
567  {
568    int ni_srv, begin_srv, end_srv, global_zoom_begin_tmp, global_zoom_size_tmp;
569
570    buffer>>ni_srv>>begin_srv>>end_srv>>global_zoom_begin_tmp>>global_zoom_size_tmp;
571    global_zoom_begin = global_zoom_begin_tmp;
572    global_zoom_size  = global_zoom_size_tmp;
573    int global_zoom_end = global_zoom_begin + global_zoom_size - 1;
574
575    zoom_begin_srv = global_zoom_begin > begin_srv ? global_zoom_begin : begin_srv ;
576    zoom_end_srv   = global_zoom_end < end_srv ? global_zoom_end : end_srv ;
577    zoom_size_srv  = zoom_end_srv - zoom_begin_srv + 1;
578
579    if (zoom_size_srv<=0)
580    {
581      zoom_begin_srv = 0; zoom_end_srv = 0; zoom_size_srv = 0;
582    }
583
584    if (n_glo == n)
585    {
586      zoom_begin_srv = global_zoom_begin;
587      zoom_end_srv   = global_zoom_end; //zoom_end;
588      zoom_size_srv  = zoom_end_srv - zoom_begin_srv + 1;
589    }
590    value_srv.resize(zoom_size_srv);
591    bound_srv.resize(2,zoom_size_srv);
592  }
593
594  bool CAxis::hasTransformation()
595  {
596    return (!transformationMap_.empty());
597  }
598
599  void CAxis::setTransformations(const TransMapTypes& axisTrans)
600  {
601    transformationMap_ = axisTrans;
602  }
603
604  CAxis::TransMapTypes CAxis::getAllTransformations(void)
605  {
606    return transformationMap_;
607  }
608
609  /*!
610    Check the validity of all transformations applied on axis
611  This functions is called AFTER all inherited attributes are solved
612  */
613  void CAxis::checkTransformations()
614  {
615    TransMapTypes::const_iterator itb = transformationMap_.begin(), it,
616                                  ite = transformationMap_.end();
617    for (it = itb; it != ite; ++it)
618    {
619      (it->second)->checkValid(this);
620    }
621  }
622
623  void CAxis::solveInheritanceTransformation()
624  {
625    if (this->hasTransformation()) return;
626
627    std::vector<CAxis*> refAxis;
628    CAxis* refer_sptr;
629    CAxis* refer_ptr = this;
630    while (refer_ptr->hasDirectAxisReference())
631    {
632      refAxis.push_back(refer_ptr);
633      refer_sptr = refer_ptr->getDirectAxisReference();
634      refer_ptr  = refer_sptr;
635      if (refer_ptr->hasTransformation()) break;
636    }
637
638    if (refer_ptr->hasTransformation())
639      for (int idx = 0; idx < refAxis.size(); ++idx)
640        refAxis[idx]->setTransformations(refer_ptr->getAllTransformations());
641  }
642
643  void CAxis::parse(xml::CXMLNode & node)
644  {
645    SuperClass::parse(node);
646
647    if (node.goToChildElement())
648    {
649      StdString inverseAxisDefRoot("inverse_axis_definition");
650      StdString inverse("inverse_axis");
651      StdString zoomAxisDefRoot("zoom_axis_definition");
652      StdString zoom("zoom_axis");
653      StdString interpAxisDefRoot("interpolate_axis_definition");
654      StdString interp("interpolate_axis");
655      do
656      {
657        if (node.getElementName() == inverse) {
658          CInverseAxis* tmp = (CInverseAxisGroup::get(inverseAxisDefRoot))->createChild();
659          tmp->parse(node);
660          transformationMap_.push_back(std::make_pair(TRANS_INVERSE_AXIS,tmp));
661        } else if (node.getElementName() == zoom) {
662          CZoomAxis* tmp = (CZoomAxisGroup::get(zoomAxisDefRoot))->createChild();
663          tmp->parse(node);
664          transformationMap_.push_back(std::make_pair(TRANS_ZOOM_AXIS,tmp));
665        }
666        else if (node.getElementName() == interp) {
667          CInterpolateAxis* tmp = (CInterpolateAxisGroup::get(interpAxisDefRoot))->createChild();
668          tmp->parse(node);
669          transformationMap_.push_back(std::make_pair(TRANS_INTERPOLATE_AXIS,tmp));
670        }
671      } while (node.goToNextElement()) ;
672      node.goToParentElement();
673    }
674  }
675
676  DEFINE_REF_FUNC(Axis,axis)
677
678   ///---------------------------------------------------------------
679
680} // namespace xios
Note: See TracBrowser for help on using the repository browser.