ABLBoundaryPlane Class Reference

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

#include <ABLBoundaryPlane.H>

Collaboration diagram for amr_wind::ABLBoundaryPlane:
[legend]

Public Member Functions

 ABLBoundaryPlane (CFDSim &)
 
void post_init_actions ()
 Execute initialization actions after mesh has been fully generated.
 
void pre_advance_work ()
 
void pre_predictor_work ()
 
void post_advance_work ()
 
void initialize_data ()
 
void write_header ()
 
void write_bndry_native_header (const std::string &chkname)
 
void write_file ()
 
void read_header ()
 
amrex::Vector< amrex::BoxArray > read_bndry_native_boxarrays (const std::string &chkname, const Field &field) const
 
void read_file (const bool)
 
void populate_data (const int, const amrex::Real, Field &, amrex::MultiFab &, const int dcomp=0, const int orig_comp=0) const
 
bool is_initialized () const
 
bool box_intersects_boundary (const amrex::Box &, const int, const amrex::Orientation) const
 True if box intersects the boundary.
 
bool is_data_newer_than (const amrex::Real time) const
 
io_mode mode () const
 

Static Public Member Functions

static void impl_buffer_field (const amrex::Box &, const int, const int, const amrex::GpuArray< int, 2 > &, const amrex::IntVect &, const amrex::Array4< const amrex::Real > &, amrex::Gpu::ManagedVector< amrex::Real > &)
 

Private Member Functions

void write_data (const ncutils::NCGroup &grp, const amrex::Orientation, const int, const Field *)
 
int boundary_native_file_levels () const
 

Private Attributes

const amr_wind::SimTimem_time
 
const FieldRepom_repo
 
const amrex::AmrCore & m_mesh
 
std::string m_title {"ABL boundary planes"}
 
int m_write_frequency {1}
 Normal direction for the boundary plane.
 
amrex::Vector< std::string > m_plane_names
 Plane names.
 
amrex::Vector< std::string > m_planes
 IO boundary planes.
 
amrex::Real m_out_start_time {0.0}
 Start outputting after this time.
 
size_t m_out_counter {0}
 NetCDF time output counter.
 
std::string m_filename
 File name for IO.
 
std::string m_time_file
 File name for Native time file.
 
amrex::Vector< std::string > m_var_names
 Variables for IO.
 
amrex::Vector< Field * > m_fields
 List of fields for IO.
 
amrex::Vector< amrex::Real > m_in_times
 NetCDF input level time.
 
amrex::Vector< int > m_in_timesteps
 
InletData m_in_data
 Inlet data.
 
io_mode m_io_mode {io_mode::undefined}
 IO mode.
 
bool m_is_initialized {false}
 Flag indicating if this capability is available.
 
const int m_in_rad = 1
 controls extents on native bndry output
 
const int m_out_rad = 1
 
const int m_extent_rad = 0
 
std::string m_out_fmt {"native"}
 output format for bndry output
 

Detailed Description

Interface for ABL boundary plane I/O

This class performs the necessary file operations to read and write boundary planes.

See also
ABLFillInflow

Constructor & Destructor Documentation

◆ ABLBoundaryPlane()

amr_wind::ABLBoundaryPlane::ABLBoundaryPlane ( CFDSim & sim)
explicit

Member Function Documentation

◆ boundary_native_file_levels()

int amr_wind::ABLBoundaryPlane::boundary_native_file_levels ( ) const
private

◆ box_intersects_boundary()

bool amr_wind::ABLBoundaryPlane::box_intersects_boundary ( const amrex::Box & bx,
const int lev,
const amrex::Orientation ori ) const

True if box intersects the boundary.

◆ impl_buffer_field()

void amr_wind::ABLBoundaryPlane::impl_buffer_field ( const amrex::Box & bx,
const int n1,
const int nc,
const amrex::GpuArray< int, 2 > & perp,
const amrex::IntVect & v_offset,
const amrex::Array4< const amrex::Real > & fld,
amrex::Gpu::ManagedVector< amrex::Real > & buffer )
static

◆ initialize_data()

void amr_wind::ABLBoundaryPlane::initialize_data ( )

◆ is_data_newer_than()

bool amr_wind::ABLBoundaryPlane::is_data_newer_than ( const amrex::Real time) const
inline

◆ is_initialized()

bool amr_wind::ABLBoundaryPlane::is_initialized ( ) const
inline

◆ mode()

io_mode amr_wind::ABLBoundaryPlane::mode ( ) const
inline

◆ populate_data()

void amr_wind::ABLBoundaryPlane::populate_data ( const int lev,
const amrex::Real time,
Field & fld,
amrex::MultiFab & mfab,
const int dcomp = 0,
const int orig_comp = 0 ) const

◆ post_advance_work()

void amr_wind::ABLBoundaryPlane::post_advance_work ( )

◆ post_init_actions()

void amr_wind::ABLBoundaryPlane::post_init_actions ( )

Execute initialization actions after mesh has been fully generated.

◆ pre_advance_work()

void amr_wind::ABLBoundaryPlane::pre_advance_work ( )

◆ pre_predictor_work()

void amr_wind::ABLBoundaryPlane::pre_predictor_work ( )

◆ read_bndry_native_boxarrays()

amrex::Vector< amrex::BoxArray > amr_wind::ABLBoundaryPlane::read_bndry_native_boxarrays ( const std::string & chkname,
const Field & field ) const

◆ read_file()

void amr_wind::ABLBoundaryPlane::read_file ( const bool nph_target_time)

◆ read_header()

void amr_wind::ABLBoundaryPlane::read_header ( )

◆ write_bndry_native_header()

void amr_wind::ABLBoundaryPlane::write_bndry_native_header ( const std::string & chkname)

◆ write_data()

void amr_wind::ABLBoundaryPlane::write_data ( const ncutils::NCGroup & grp,
const amrex::Orientation ori,
const int lev,
const Field * fld )
private

◆ write_file()

void amr_wind::ABLBoundaryPlane::write_file ( )

◆ write_header()

void amr_wind::ABLBoundaryPlane::write_header ( )

Member Data Documentation

◆ m_extent_rad

const int amr_wind::ABLBoundaryPlane::m_extent_rad = 0
private

◆ m_fields

amrex::Vector<Field*> amr_wind::ABLBoundaryPlane::m_fields
private

List of fields for IO.

◆ m_filename

std::string amr_wind::ABLBoundaryPlane::m_filename
private

File name for IO.

◆ m_in_data

InletData amr_wind::ABLBoundaryPlane::m_in_data
private

Inlet data.

◆ m_in_rad

const int amr_wind::ABLBoundaryPlane::m_in_rad = 1
private

controls extents on native bndry output

◆ m_in_times

amrex::Vector<amrex::Real> amr_wind::ABLBoundaryPlane::m_in_times
private

NetCDF input level time.

◆ m_in_timesteps

amrex::Vector<int> amr_wind::ABLBoundaryPlane::m_in_timesteps
private

◆ m_io_mode

io_mode amr_wind::ABLBoundaryPlane::m_io_mode {io_mode::undefined}
private

IO mode.

◆ m_is_initialized

bool amr_wind::ABLBoundaryPlane::m_is_initialized {false}
private

Flag indicating if this capability is available.

◆ m_mesh

const amrex::AmrCore& amr_wind::ABLBoundaryPlane::m_mesh
private

◆ m_out_counter

size_t amr_wind::ABLBoundaryPlane::m_out_counter {0}
private

NetCDF time output counter.

◆ m_out_fmt

std::string amr_wind::ABLBoundaryPlane::m_out_fmt {"native"}
private

output format for bndry output

◆ m_out_rad

const int amr_wind::ABLBoundaryPlane::m_out_rad = 1
private

◆ m_out_start_time

amrex::Real amr_wind::ABLBoundaryPlane::m_out_start_time {0.0}
private

Start outputting after this time.

◆ m_plane_names

amrex::Vector<std::string> amr_wind::ABLBoundaryPlane::m_plane_names
private
Initial value:
{"xlo", "ylo", "zlo",
"xhi", "yhi", "zhi"}

Plane names.

◆ m_planes

amrex::Vector<std::string> amr_wind::ABLBoundaryPlane::m_planes
private

IO boundary planes.

◆ m_repo

const FieldRepo& amr_wind::ABLBoundaryPlane::m_repo
private

◆ m_time

const amr_wind::SimTime& amr_wind::ABLBoundaryPlane::m_time
private

◆ m_time_file

std::string amr_wind::ABLBoundaryPlane::m_time_file
private

File name for Native time file.

◆ m_title

std::string amr_wind::ABLBoundaryPlane::m_title {"ABL boundary planes"}
private

◆ m_var_names

amrex::Vector<std::string> amr_wind::ABLBoundaryPlane::m_var_names
private

Variables for IO.

◆ m_write_frequency

int amr_wind::ABLBoundaryPlane::m_write_frequency {1}
private

Normal direction for the boundary plane.


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