Sampling Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
|
#include <Sampling.H>
Public Member Functions | |
Sampling (CFDSim &, std::string) | |
~Sampling () override | |
void | pre_init_actions () override |
Perform actions before mesh is created. | |
void | initialize () override |
Read user inputs and create the different data probe instances. | |
void | post_advance_work () override |
Interpolate fields at a given timestep and output to disk. | |
void | post_regrid_actions () override |
Actions to perform post regrid e.g. redistribute particles. | |
virtual void | impl_write_native () |
Write sampled data in binary format. | |
void | sampling_workflow () |
void | sampling_post () |
void | fill_buffer () |
void | create_output_buffer () |
void | convert_velocity_lineofsight () |
int | num_total_particles () const |
int | num_netcdf_output_particles () const |
const amrex::Vector< std::string > & | var_names () const |
Static Public Member Functions | |
static std::string | identifier () |
Protected Member Functions | |
void | update_container () |
Update the container by re-initializing the particles. | |
void | update_sampling_locations () |
Conduct work to update the particles. | |
virtual void | process_output () |
Output data based on user-defined format. | |
virtual void | prepare_netcdf_file () |
Prepare NetCDF metadata. | |
void | write_netcdf () |
Write sampled data into a NetCDF file. | |
virtual void | write_ascii () |
void | write_info_file (const std::string &fname) |
Output extra information for certain formats. | |
SamplingContainer & | sampling_container () |
Private Attributes | |
CFDSim & | m_sim |
std::unique_ptr< SamplingContainer > | m_scontainer |
amrex::Vector< std::unique_ptr< SamplerBase > > | m_samplers |
amrex::Vector< std::string > | m_var_names |
List of variable names for output. | |
amrex::Vector< Field * > | m_fields |
List of fields to be sampled for this collection of probes. | |
amrex::Vector< IntField * > | m_int_fields |
List of IntFields to be sampled for this collection of probes. | |
std::unique_ptr< DerivedQtyMgr > | m_derived_mgr |
List of derived fields to be sampled for this collection of probes. | |
const std::string | m_label |
std::string | m_out_fmt {"netcdf"} |
Format of the data output (native, ascii, netcdf, etc.) | |
std::string | m_ncfile_name |
std::vector< double > | m_sample_buf |
std::vector< double > | m_output_buf |
size_t | m_netcdf_output_particles {0} |
Number of output particles in netcdf. | |
bool | m_restart_sample {false} |
int | m_ncomp {0} |
int | m_nicomp {0} |
int | m_ndcomp {0} |
size_t | m_total_particles {0} |
Number of sampling container particles: | |
int | m_out_freq {100} |
Frequency of data sampling and output. | |
int | m_out_delay {0} |
Delay number of timestep before output. | |
Detailed Description
Collection of data sampling objects
A concrete implementation of the post-processing interface that deals with data probes. Multiple instances of sampling entities (e.g., point cloud or probes, line, or plane samplers) can be registered. Internally, the data problems are represented as amr_wind::sampling::SamplingContainer for tracking their position within the CFD mesh and updating the fields of interest.
This class manages the interpolation and the field management. The actual definition of probes are managed by subclasses of SamplerBase.
Constructor & Destructor Documentation
◆ Sampling()
amr_wind::sampling::Sampling::Sampling | ( | CFDSim & | sim, |
std::string | label ) |
◆ ~Sampling()
|
overridedefault |
Member Function Documentation
◆ convert_velocity_lineofsight()
void amr_wind::sampling::Sampling::convert_velocity_lineofsight | ( | ) |
◆ create_output_buffer()
void amr_wind::sampling::Sampling::create_output_buffer | ( | ) |
◆ fill_buffer()
void amr_wind::sampling::Sampling::fill_buffer | ( | ) |
◆ identifier()
|
inlinestatic |
◆ impl_write_native()
|
virtual |
Write sampled data in binary format.
◆ initialize()
|
override |
Read user inputs and create the different data probe instances.
◆ num_netcdf_output_particles()
|
inline |
◆ num_total_particles()
|
inline |
◆ post_advance_work()
|
override |
Interpolate fields at a given timestep and output to disk.
◆ post_regrid_actions()
|
override |
Actions to perform post regrid e.g. redistribute particles.
◆ pre_init_actions()
|
inlineoverride |
Perform actions before mesh is created.
◆ prepare_netcdf_file()
|
protectedvirtual |
Prepare NetCDF metadata.
◆ process_output()
|
protectedvirtual |
Output data based on user-defined format.
◆ sampling_container()
|
inlineprotected |
◆ sampling_post()
void amr_wind::sampling::Sampling::sampling_post | ( | ) |
◆ sampling_workflow()
void amr_wind::sampling::Sampling::sampling_workflow | ( | ) |
◆ update_container()
|
protected |
Update the container by re-initializing the particles.
◆ update_sampling_locations()
|
protected |
Conduct work to update the particles.
◆ var_names()
|
inline |
◆ write_ascii()
|
protectedvirtual |
Output sampled data in ASCII format
Note that this should be used for debugging only and not in production runs as it can have significant impacts on code performance.
◆ write_info_file()
|
protected |
Output extra information for certain formats.
◆ write_netcdf()
|
protected |
Write sampled data into a NetCDF file.
Member Data Documentation
◆ m_derived_mgr
|
private |
List of derived fields to be sampled for this collection of probes.
◆ m_fields
|
private |
List of fields to be sampled for this collection of probes.
◆ m_int_fields
|
private |
List of IntFields to be sampled for this collection of probes.
◆ m_label
|
private |
Name of this sampling object.
The label is used to read user inputs from file and is also used for naming files directories depending on the output format.
◆ m_ncfile_name
|
private |
◆ m_ncomp
|
private |
◆ m_ndcomp
|
private |
◆ m_netcdf_output_particles
|
private |
Number of output particles in netcdf.
◆ m_nicomp
|
private |
◆ m_out_delay
|
private |
Delay number of timestep before output.
◆ m_out_fmt
|
private |
Format of the data output (native, ascii, netcdf, etc.)
◆ m_out_freq
|
private |
Frequency of data sampling and output.
◆ m_output_buf
|
private |
◆ m_restart_sample
|
private |
◆ m_sample_buf
|
private |
◆ m_samplers
|
private |
◆ m_scontainer
|
private |
◆ m_sim
|
private |
◆ m_total_particles
|
private |
Number of sampling container particles:
◆ m_var_names
|
private |
List of variable names for output.
The documentation for this class was generated from the following files:
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/sampling/Sampling.H
- /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/sampling/Sampling.cpp
Generated by 1.12.0