SamplerBase Class Reference

AMR-Wind API: amr_wind::sampling::SamplerBase Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <SamplerBase.H>

Inheritance diagram for amr_wind::sampling::SamplerBase:
[legend]
Collaboration diagram for amr_wind::sampling::SamplerBase:
[legend]

Public Member Functions

 ~SamplerBase () override=default
 
virtual std::string label () const =0
 Name used to refer to this sampler (e.g., myline1)
 
virtual std::string & label ()=0
 
virtual std::string sampletype () const =0
 Class name of this sampler (e.g., LineSampler)
 
virtual int id () const =0
 
virtual int & id ()=0
 
virtual long num_points () const =0
 Total number of probes that belong to this sampling instance.
 
virtual long num_output_points () const =0
 
virtual void initialize (const std::string &key)=0
 Read inputs and perform initialization actions.
 
virtual void sampling_locations (SampleLocType &) const =0
 Populate the vector with coordinates of the sampling locations.
 
virtual void sampling_locations (SampleLocType &, const amrex::Box &) const =0
 
virtual void check_bounds ()=0
 Check and fix the bounds of the sampler so the probes are in the domain.
 
virtual void output_locations (SampleLocType &) const =0
 Populate the vector with coordinates of the output locations.
 
virtual bool update_sampling_locations ()
 Update the sampling locations.
 
virtual void post_sample_actions ()
 Run actions after sample (useful in interpolated subsampling)
 
virtual void post_regrid_actions ()
 Run actions after regrid (important when using field-based quantities)
 
virtual bool output_netcdf_field (const std::vector< double > &, ncutils::NCGroup &, const size_t)
 Run specific output for the sampler.
 
virtual bool do_data_modification ()
 Run data modification for specific sampler?
 
virtual bool do_convert_velocity_los ()
 
virtual bool do_subsampling_interp ()
 
virtual std::vector< double > modify_sample_data (const std::vector< double > &sampledata, const std::string &)
 Sample buffer modification instructions.
 
virtual void calc_lineofsight_velocity (const std::vector< std::vector< double > > &, const int)
 
virtual void define_netcdf_metadata (const ncutils::NCGroup &) const
 Populate metadata in the NetCDF file.
 
virtual void populate_netcdf_metadata (const ncutils::NCGroup &) const
 
virtual void output_netcdf_data (const ncutils::NCGroup &, const size_t) const
 
- Public Member Functions inherited from amr_wind::Factory< SamplerBase, CFDSim & >
virtual ~Factory ()=default
 

Static Public Member Functions

static std::string base_identifier ()
 
- Static Public Member Functions inherited from amr_wind::Factory< SamplerBase, CFDSim & >
static std::unique_ptr< SamplerBase > create (const std::string &key, Args... args)
 
static void print (std::ostream &os)
 

Static Public Attributes

static constexpr amrex::Real bounds_tol
 

Additional Inherited Members

- Public Attributes inherited from amr_wind::Factory< SamplerBase, CFDSim & >
friend Base
 

Detailed Description

Abstract representation of data probes to sample flow data

This class defines the interface by which the positions of the data-probes are defined and access from the Sampling class. All data probe definitions must be sub-classes of this base class.

Constructor & Destructor Documentation

◆ ~SamplerBase()

amr_wind::sampling::SamplerBase::~SamplerBase ( )
overridedefault

Member Function Documentation

◆ base_identifier()

static std::string amr_wind::sampling::SamplerBase::base_identifier ( )
inlinestatic

◆ calc_lineofsight_velocity()

virtual void amr_wind::sampling::SamplerBase::calc_lineofsight_velocity ( const std::vector< std::vector< double > > & ,
const int  )
inlinevirtual

◆ check_bounds()

virtual void amr_wind::sampling::SamplerBase::check_bounds ( )
pure virtual

Check and fix the bounds of the sampler so the probes are in the domain.

◆ define_netcdf_metadata()

virtual void amr_wind::sampling::SamplerBase::define_netcdf_metadata ( const ncutils::NCGroup & ) const
inlinevirtual

Populate metadata in the NetCDF file.

◆ do_convert_velocity_los()

virtual bool amr_wind::sampling::SamplerBase::do_convert_velocity_los ( )
inlinevirtual

◆ do_data_modification()

virtual bool amr_wind::sampling::SamplerBase::do_data_modification ( )
inlinevirtual

Run data modification for specific sampler?

◆ do_subsampling_interp()

virtual bool amr_wind::sampling::SamplerBase::do_subsampling_interp ( )
inlinevirtual

◆ id() [1/2]

virtual int amr_wind::sampling::SamplerBase::id ( ) const
pure virtual

Unique numeric identifier used to track particles belonging to this instance

◆ id() [2/2]

virtual int & amr_wind::sampling::SamplerBase::id ( )
pure virtual

◆ initialize()

virtual void amr_wind::sampling::SamplerBase::initialize ( const std::string & key)
pure virtual

Read inputs and perform initialization actions.

◆ label() [1/2]

virtual std::string amr_wind::sampling::SamplerBase::label ( ) const
pure virtual

Name used to refer to this sampler (e.g., myline1)

◆ label() [2/2]

virtual std::string & amr_wind::sampling::SamplerBase::label ( )
pure virtual

◆ modify_sample_data()

virtual std::vector< double > amr_wind::sampling::SamplerBase::modify_sample_data ( const std::vector< double > & sampledata,
const std::string &  )
inlinevirtual

Sample buffer modification instructions.

◆ num_output_points()

virtual long amr_wind::sampling::SamplerBase::num_output_points ( ) const
pure virtual

Total number of probes to be output Note: Same as num_points() for sampling without data reduction

◆ num_points()

virtual long amr_wind::sampling::SamplerBase::num_points ( ) const
pure virtual

Total number of probes that belong to this sampling instance.

◆ output_locations()

virtual void amr_wind::sampling::SamplerBase::output_locations ( SampleLocType & ) const
pure virtual

Populate the vector with coordinates of the output locations.

◆ output_netcdf_data()

virtual void amr_wind::sampling::SamplerBase::output_netcdf_data ( const ncutils::NCGroup & ,
const size_t  ) const
inlinevirtual

◆ output_netcdf_field()

virtual bool amr_wind::sampling::SamplerBase::output_netcdf_field ( const std::vector< double > & ,
ncutils::NCGroup & ,
const size_t  )
inlinevirtual

Run specific output for the sampler.

◆ populate_netcdf_metadata()

virtual void amr_wind::sampling::SamplerBase::populate_netcdf_metadata ( const ncutils::NCGroup & ) const
inlinevirtual

◆ post_regrid_actions()

virtual void amr_wind::sampling::SamplerBase::post_regrid_actions ( )
inlinevirtual

Run actions after regrid (important when using field-based quantities)

◆ post_sample_actions()

virtual void amr_wind::sampling::SamplerBase::post_sample_actions ( )
inlinevirtual

Run actions after sample (useful in interpolated subsampling)

◆ sampletype()

virtual std::string amr_wind::sampling::SamplerBase::sampletype ( ) const
pure virtual

Class name of this sampler (e.g., LineSampler)

◆ sampling_locations() [1/2]

virtual void amr_wind::sampling::SamplerBase::sampling_locations ( SampleLocType & ) const
pure virtual

Populate the vector with coordinates of the sampling locations.

◆ sampling_locations() [2/2]

virtual void amr_wind::sampling::SamplerBase::sampling_locations ( SampleLocType & ,
const amrex::Box &  ) const
pure virtual

Populate the vector with coordinates of the sampling locations inside a box

◆ update_sampling_locations()

virtual bool amr_wind::sampling::SamplerBase::update_sampling_locations ( )
inlinevirtual

Update the sampling locations.

Member Data Documentation

◆ bounds_tol

amrex::Real amr_wind::sampling::SamplerBase::bounds_tol
staticconstexpr
Initial value:
=
std::numeric_limits<amrex::Real>::epsilon()

The documentation for this class was generated from the following file:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/sampling/SamplerBase.H