source: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/field_impl.hpp @ 1957

Last change on this file since 1957 was 1949, checked in by ymipsl, 4 years ago

Coupling branch
Fix compilation error due to deleted .hpp . Problem appear only after a full compilation.

YM

  • 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
File size: 1.6 KB
RevLine 
[352]1
2#ifndef __FIELD_IMPL_HPP__
3#define __FIELD_IMPL_HPP__
4
[591]5#include "xios_spl.hpp"
[352]6#include "field.hpp"
7#include "context.hpp"
8#include "grid.hpp"
9#include "timer.hpp"
[369]10#include "array_new.hpp"
[640]11#include "source_filter.hpp"
[352]12
[369]13
[352]14namespace xios {
15
[459]16  template <int N>
17  void CField::setData(const CArray<double, N>& _data)
[1622]18  TRY
[459]19  {
[1930]20    if (modelToClientSourceFilter_)
[1201]21    {
22      if (check_if_active.isEmpty() || (!check_if_active.isEmpty() && (!check_if_active) || isActive(true)))
[1930]23        modelToClientSourceFilter_->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data);
[1201]24    }
[1021]25    else if (instantDataFilter)
[640]26      ERROR("void CField::setData(const CArray<double, N>& _data)",
27            << "Impossible to receive data from the model for a field [ id = " << getId() << " ] with a reference or an arithmetic operation.");
[459]28  }
[1622]29  CATCH_DUMP_ATTR
[459]30
[593]31  template <int N>
32  void CField::getData(CArray<double, N>& _data) const
[1622]33  TRY
[593]34  {
[1930]35    if (clientToModelStoreFilter_)
[593]36    {
[1930]37      CDataPacket::StatusCode status = clientToModelStoreFilter_->getData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data);
[640]38
39      if (status == CDataPacket::END_OF_STREAM)
40        ERROR("void CField::getData(CArray<double, N>& _data) const",
41              << "Impossible to access field data, all the records of the field [ id = " << getId() << " ] have been already read.");
[593]42    }
43    else
44    {
45      ERROR("void CField::getData(CArray<double, N>& _data) const",
46            << "Impossible to access field data, the field [ id = " << getId() << " ] does not have read access.");
47    }
48  }
[1622]49  CATCH
[352]50} // namespace xios
51
52#endif
Note: See TracBrowser for help on using the repository browser.