Ignore:
Timestamp:
06/14/16 16:28:07 (8 years ago)
Author:
mhnguyen
Message:

Masked interpolated points will have default_value (if defined)

+) Default value is used to initialize spatial transform filter
+) Add a new case for testing masked points

Test
+) On Curie
+) All interpolation tests work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/spatial_transform_filter.hpp

    r827 r873  
    2121       * \param gc the associated garbage collector 
    2222       * \param engine the engine defining the spatial transformation 
     23       * \param outputValue default value of output pin 
    2324       * \param [in] inputSlotsCount number of input, by default there is only one for field src 
    2425       */ 
    25       CSpatialTransformFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, size_t inputSlotsCount = 1); 
     26      CSpatialTransformFilter(CGarbageCollector& gc, CSpatialTransformFilterEngine* engine, double outputValue, size_t inputSlotsCount = 1); 
    2627 
    2728      /*! 
     
    3435       */ 
    3536      static std::pair<boost::shared_ptr<CSpatialTransformFilter>, boost::shared_ptr<CSpatialTransformFilter> > 
    36       buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid); 
     37      buildFilterGraph(CGarbageCollector& gc, CGrid* srcGrid, CGrid* destGrid, double defaultValue); 
     38 
     39    protected: 
     40      /*! 
     41        Overriding this function to process transformations with auxillary inputs 
     42      */ 
     43      void virtual onInputReady(std::vector<CDataPacketPtr> data); 
     44 
     45    protected: 
     46      //! Default value of output pin 
     47      double outputDefaultValue; 
    3748  }; // class CSpatialTransformFilter 
    3849 
     
    5667       * 
    5768       * \param data a vector of packets corresponding to each slot (one in this case) 
     69       * \param [in] defaultValue default value of output data 
     70       * \return the result of the grid transformation 
     71       */ 
     72      CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0); 
     73 
     74       /*! 
     75       * Applies the grid transformation to the input data and returns the result. 
     76       * 
     77       * \param data a vector of packets corresponding to each slot (one in this case) 
    5878       * \return the result of the grid transformation 
    5979       */ 
    6080      CDataPacketPtr virtual apply(std::vector<CDataPacketPtr> data); 
     81 
     82 
    6183 
    6284    protected: 
Note: See TracChangeset for help on using the changeset viewer.