FreeSurfaceSampler Class Reference

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

#include <FreeSurfaceSampler.H>

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

Public Member Functions

 FreeSurfaceSampler (CFDSim &)
 
 ~FreeSurfaceSampler () override
 
void initialize (const std::string &key) override
 
void check_bounds () override
 Check and fix the bounds of the sampler so the probes are in the domain.
 
void sampling_locations (SampleLocType &) const override
 Populate and return a vector of probe locations to be sampled.
 
void sampling_locations (SampleLocType &, const amrex::Box &) const override
 
void output_locations (SampleLocType &sample_locs) const override
 
bool update_sampling_locations () override
 Find heights associated with 2D sample locations.
 
void post_regrid_actions () override
 Redo some of the initialization work when the grid changes.
 
void define_netcdf_metadata (const ncutils::NCGroup &) const override
 
void populate_netcdf_metadata (const ncutils::NCGroup &) const override
 
void output_netcdf_data (const ncutils::NCGroup &, const size_t) const override
 
std::string label () const override
 Name of this sampling object.
 
std::string & label () override
 
std::string sampletype () const override
 Type of this sampling object.
 
int id () const override
 Unique identifier for this set of probe locations.
 
int & id () override
 
int num_gridpoints () const
 
int num_instances () const
 Number of instances.
 
long num_points () const override
 Number of points, total.
 
long num_output_points () const override
 
amrex::Vector< amrex::Array< amrex::Real, 2 > > grid_locations () const
 Locations.
 
amrex::Vector< amrex::Real > heights () const
 Outputs (heights)
 

Static Public Member Functions

static std::string identifier ()
 

Private Attributes

CFDSimm_sim
 
const Fieldm_vof
 reference to VOF
 
amrex::Vector< int > m_npts_dir
 Number or points on 2D grid in each direction.
 
int m_npts {0}
 
int m_ninst {1}
 
int m_coorddir {2}
 
int m_gc0 = 0
 Grid coordinates, determined as a function of m_coorddir.
 
int m_gc1 = 1
 
amrex::Vector< amrex::Real > m_start
 Parameters to set up plane.
 
amrex::Vector< amrex::Real > m_end
 
amrex::Vector< amrex::Array< amrex::Real, 2 > > m_grid_locs
 Locations of points in 2D grid.
 
amrex::Vector< amrex::Real > m_out
 Output coordinate.
 
int m_ncomp {1}
 Max number of sample points found in a single cell.
 
int m_ncmax {8}
 Max number of sample points allowed in a single cell.
 
std::string m_label
 
int m_id {-1}
 

Constructor & Destructor Documentation

◆ FreeSurfaceSampler()

amr_wind::sampling::FreeSurfaceSampler::FreeSurfaceSampler ( CFDSim & sim)

◆ ~FreeSurfaceSampler()

amr_wind::sampling::FreeSurfaceSampler::~FreeSurfaceSampler ( )
overridedefault

Member Function Documentation

◆ check_bounds()

void amr_wind::sampling::FreeSurfaceSampler::check_bounds ( )
override

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

◆ define_netcdf_metadata()

void amr_wind::sampling::FreeSurfaceSampler::define_netcdf_metadata ( const ncutils::NCGroup & grp) const
override

◆ grid_locations()

amrex::Vector< amrex::Array< amrex::Real, 2 > > amr_wind::sampling::FreeSurfaceSampler::grid_locations ( ) const
inline

Locations.

◆ heights()

amrex::Vector< amrex::Real > amr_wind::sampling::FreeSurfaceSampler::heights ( ) const
inline

Outputs (heights)

◆ id() [1/2]

int amr_wind::sampling::FreeSurfaceSampler::id ( ) const
inlineoverride

Unique identifier for this set of probe locations.

◆ id() [2/2]

int & amr_wind::sampling::FreeSurfaceSampler::id ( )
inlineoverride

◆ identifier()

static std::string amr_wind::sampling::FreeSurfaceSampler::identifier ( )
inlinestatic

◆ initialize()

void amr_wind::sampling::FreeSurfaceSampler::initialize ( const std::string & key)
override

Read user inputs and create mesh-based information for locating interface

◆ label() [1/2]

std::string amr_wind::sampling::FreeSurfaceSampler::label ( ) const
inlineoverride

Name of this sampling object.

◆ label() [2/2]

std::string & amr_wind::sampling::FreeSurfaceSampler::label ( )
inlineoverride

◆ num_gridpoints()

int amr_wind::sampling::FreeSurfaceSampler::num_gridpoints ( ) const
inline

Output functions for private variables Number of 2D grid points

◆ num_instances()

int amr_wind::sampling::FreeSurfaceSampler::num_instances ( ) const
inline

Number of instances.

◆ num_output_points()

long amr_wind::sampling::FreeSurfaceSampler::num_output_points ( ) const
inlineoverride

◆ num_points()

long amr_wind::sampling::FreeSurfaceSampler::num_points ( ) const
inlineoverride

Number of points, total.

◆ output_locations()

void amr_wind::sampling::FreeSurfaceSampler::output_locations ( SampleLocType & sample_locs) const
inlineoverride

◆ output_netcdf_data()

void amr_wind::sampling::FreeSurfaceSampler::output_netcdf_data ( const ncutils::NCGroup & grp,
const size_t nt ) const
override

◆ populate_netcdf_metadata()

void amr_wind::sampling::FreeSurfaceSampler::populate_netcdf_metadata ( const ncutils::NCGroup & ) const
override

◆ post_regrid_actions()

void amr_wind::sampling::FreeSurfaceSampler::post_regrid_actions ( )
override

Redo some of the initialization work when the grid changes.

◆ sampletype()

std::string amr_wind::sampling::FreeSurfaceSampler::sampletype ( ) const
inlineoverride

Type of this sampling object.

◆ sampling_locations() [1/2]

void amr_wind::sampling::FreeSurfaceSampler::sampling_locations ( SampleLocType & sample_locs) const
override

Populate and return a vector of probe locations to be sampled.

◆ sampling_locations() [2/2]

void amr_wind::sampling::FreeSurfaceSampler::sampling_locations ( SampleLocType & sample_locs,
const amrex::Box & box ) const
override

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

◆ update_sampling_locations()

bool amr_wind::sampling::FreeSurfaceSampler::update_sampling_locations ( )
override

Find heights associated with 2D sample locations.

Member Data Documentation

◆ m_coorddir

int amr_wind::sampling::FreeSurfaceSampler::m_coorddir {2}
private

Coordinate direction to search along, default is z (this also determines the meaning of start and end points)

◆ m_end

amrex::Vector<amrex::Real> amr_wind::sampling::FreeSurfaceSampler::m_end
private

◆ m_gc0

int amr_wind::sampling::FreeSurfaceSampler::m_gc0 = 0
private

Grid coordinates, determined as a function of m_coorddir.

◆ m_gc1

int amr_wind::sampling::FreeSurfaceSampler::m_gc1 = 1
private

◆ m_grid_locs

amrex::Vector<amrex::Array<amrex::Real, 2> > amr_wind::sampling::FreeSurfaceSampler::m_grid_locs
private

Locations of points in 2D grid.

◆ m_id

int amr_wind::sampling::FreeSurfaceSampler::m_id {-1}
private

◆ m_label

std::string amr_wind::sampling::FreeSurfaceSampler::m_label
private

◆ m_ncmax

int amr_wind::sampling::FreeSurfaceSampler::m_ncmax {8}
private

Max number of sample points allowed in a single cell.

◆ m_ncomp

int amr_wind::sampling::FreeSurfaceSampler::m_ncomp {1}
private

Max number of sample points found in a single cell.

◆ m_ninst

int amr_wind::sampling::FreeSurfaceSampler::m_ninst {1}
private

Number of instances (possible sampling points per location, like in the case of a breaking wave)

◆ m_npts

int amr_wind::sampling::FreeSurfaceSampler::m_npts {0}
private

◆ m_npts_dir

amrex::Vector<int> amr_wind::sampling::FreeSurfaceSampler::m_npts_dir
private

Number or points on 2D grid in each direction.

◆ m_out

amrex::Vector<amrex::Real> amr_wind::sampling::FreeSurfaceSampler::m_out
private

Output coordinate.

◆ m_sim

CFDSim& amr_wind::sampling::FreeSurfaceSampler::m_sim
private

◆ m_start

amrex::Vector<amrex::Real> amr_wind::sampling::FreeSurfaceSampler::m_start
private

Parameters to set up plane.

◆ m_vof

const Field& amr_wind::sampling::FreeSurfaceSampler::m_vof
private

reference to VOF


The documentation for this class was generated from the following files: