MultiLevelVector Class Reference

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

#include <MultiLevelVector.H>

Public Member Functions

 MultiLevelVector (const FieldLoc floc=FieldLoc::CELL)
 
void resize (const int axis, const amrex::Vector< amrex::Geometry > &geom)
 
const amrex::Vector< amrex::Real > & host_data (const int lev) const
 
amrex::Vector< amrex::Real > & host_data (const int lev)
 
const amrex::Gpu::DeviceVector< amrex::Real > & device_data (const int lev) const
 
void copy_host_to_device ()
 
void copy_to_field (Field &fld)
 
int size () const
 
int ncells (const int lev) const
 

Private Attributes

const FieldLoc m_floc
 
int m_axis {2}
 
amrex::Vector< amrex::Gpu::DeviceVector< amrex::Real > > m_data_d
 
amrex::Vector< amrex::Vector< amrex::Real > > m_data_h
 

Detailed Description

Multi-level vector

This class enables multi-level vectors. The primary vector is the size of the number of levels and it contains host and device vectors sized for the number of points in a given direction of the domain.

Constructor & Destructor Documentation

◆ MultiLevelVector()

amr_wind::MultiLevelVector::MultiLevelVector ( const FieldLoc floc = FieldLoc::CELL)
inline

Member Function Documentation

◆ copy_host_to_device()

void amr_wind::MultiLevelVector::copy_host_to_device ( )

◆ copy_to_field()

void amr_wind::MultiLevelVector::copy_to_field ( Field & fld)

◆ device_data()

const amrex::Gpu::DeviceVector< amrex::Real > & amr_wind::MultiLevelVector::device_data ( const int lev) const
inline

◆ host_data() [1/2]

amrex::Vector< amrex::Real > & amr_wind::MultiLevelVector::host_data ( const int lev)
inline

◆ host_data() [2/2]

const amrex::Vector< amrex::Real > & amr_wind::MultiLevelVector::host_data ( const int lev) const
inline

◆ ncells()

int amr_wind::MultiLevelVector::ncells ( const int lev) const
inline

◆ resize()

void amr_wind::MultiLevelVector::resize ( const int axis,
const amrex::Vector< amrex::Geometry > & geom )

◆ size()

int amr_wind::MultiLevelVector::size ( ) const
inline

Member Data Documentation

◆ m_axis

int amr_wind::MultiLevelVector::m_axis {2}
private

◆ m_data_d

amrex::Vector<amrex::Gpu::DeviceVector<amrex::Real> > amr_wind::MultiLevelVector::m_data_d
private

◆ m_data_h

amrex::Vector<amrex::Vector<amrex::Real> > amr_wind::MultiLevelVector::m_data_h
private

◆ m_floc

const FieldLoc amr_wind::MultiLevelVector::m_floc
private

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