ViewField< T > Class Template Reference

AMR-Wind API: amr_wind::ViewField< T > Class Template Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <ViewField.H>

Public Member Functions

 ViewField (const ViewField &)=delete
 
ViewFieldoperator= (const ViewField &)=delete
 
 ViewField (ViewField &&)=default
 
ViewFieldoperator= (ViewField &&)=default
 
std::string name () const
 
int num_comp () const
 Number of components in this subview.
 
const amrex::IntVect & num_grow () const
 
FieldLoc field_location () const
 
amrex::MultiFab & operator() (int lev)
 Return the field data for a given level.
 
const amrex::MultiFab & operator() (int lev) const
 
amrex::Vector< amrex::MultiFab * > vec_ptrs () noexcept
 
amrex::Vector< const amrex::MultiFab * > vec_const_ptrs () const noexcept
 
const FieldReporepo () const
 Return a reference to the field repository that created this field.
 
Tsource_field ()
 Return a reference to the source field from which this view is derived.
 
const Tsource_field () const
 

Public Attributes

friend T
 

Private Member Functions

 ViewField (T &src, const int scomp=0, const int ncomp=1)
 

Private Attributes

Tm_src
 The base field.
 
int m_scomp
 Index of the starting component.
 
int m_ncomp
 Number of sub-components in this view.
 
amrex::Vector< amrex::MultiFab > m_data
 MultiFabs holding the alias views.
 

Detailed Description

template<typename T>
class amr_wind::ViewField< T >

Subview of a Field or a ScratchField

A ViewField instance holds MultiFab corresponding to a subview of a Field or a ScratchField. As the data is managed by the source Field or ScratchField, subview instances cannot be created directly but instead must be created using the Field::subview() and ScratchField::subview() methods.

Constructor & Destructor Documentation

◆ ViewField() [1/3]

template<typename T >
amr_wind::ViewField< T >::ViewField ( const ViewField< T > & )
delete

◆ ViewField() [2/3]

template<typename T >
amr_wind::ViewField< T >::ViewField ( ViewField< T > && )
default

◆ ViewField() [3/3]

template<typename T >
amr_wind::ViewField< T >::ViewField ( T & src,
const int scomp = 0,
const int ncomp = 1 )
private

Member Function Documentation

◆ field_location()

template<typename T >
FieldLoc amr_wind::ViewField< T >::field_location ( ) const
inline

◆ name()

template<typename T >
std::string amr_wind::ViewField< T >::name ( ) const
inline

◆ num_comp()

template<typename T >
int amr_wind::ViewField< T >::num_comp ( ) const
inline

Number of components in this subview.

◆ num_grow()

template<typename T >
const amrex::IntVect & amr_wind::ViewField< T >::num_grow ( ) const
inline

◆ operator()() [1/2]

template<typename T >
amrex::MultiFab & amr_wind::ViewField< T >::operator() ( int lev)
inline

Return the field data for a given level.

◆ operator()() [2/2]

template<typename T >
const amrex::MultiFab & amr_wind::ViewField< T >::operator() ( int lev) const
inline

◆ operator=() [1/2]

template<typename T >
ViewField & amr_wind::ViewField< T >::operator= ( const ViewField< T > & )
delete

◆ operator=() [2/2]

template<typename T >
ViewField & amr_wind::ViewField< T >::operator= ( ViewField< T > && )
default

◆ repo()

template<typename T >
const FieldRepo & amr_wind::ViewField< T >::repo ( ) const
inline

Return a reference to the field repository that created this field.

◆ source_field() [1/2]

template<typename T >
T & amr_wind::ViewField< T >::source_field ( )
inline

Return a reference to the source field from which this view is derived.

◆ source_field() [2/2]

template<typename T >
const T & amr_wind::ViewField< T >::source_field ( ) const
inline

◆ vec_const_ptrs()

template<typename T >
amrex::Vector< const amrex::MultiFab * > amr_wind::ViewField< T >::vec_const_ptrs ( ) const
inlinenoexcept

◆ vec_ptrs()

template<typename T >
amrex::Vector< amrex::MultiFab * > amr_wind::ViewField< T >::vec_ptrs ( )
inlinenoexcept

Member Data Documentation

◆ m_data

template<typename T >
amrex::Vector<amrex::MultiFab> amr_wind::ViewField< T >::m_data
private

MultiFabs holding the alias views.

◆ m_ncomp

template<typename T >
int amr_wind::ViewField< T >::m_ncomp
private

Number of sub-components in this view.

◆ m_scomp

template<typename T >
int amr_wind::ViewField< T >::m_scomp
private

Index of the starting component.

◆ m_src

template<typename T >
T& amr_wind::ViewField< T >::m_src
private

The base field.

◆ T

template<typename T >
friend amr_wind::ViewField< T >::T

The documentation for this class was generated from the following files:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/core/ViewField.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/core/ViewField.cpp