ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TimeInterpolatedData Struct Reference

#include <ERF_TimeInterpolatedData.H>

Collaboration diagram for TimeInterpolatedData:

Public Member Functions

 TimeInterpolatedData ()=default
 
 TimeInterpolatedData (amrex::Real time)
 
 ~TimeInterpolatedData ()
 
 TimeInterpolatedData (TimeInterpolatedData &&) noexcept=default
 
TimeInterpolatedDataoperator= (TimeInterpolatedData &&other) noexcept=default
 
 TimeInterpolatedData (const TimeInterpolatedData &other)=delete
 
TimeInterpolatedDataoperator= (const TimeInterpolatedData &other)=delete
 
void set_time (amrex::Real time)
 
amrex::Real get_time () const
 
void add_var (amrex::MultiFab *var_data, int own_data)
 
amrex::MultiFab & get_var (int var_idx)
 
int num_vars ()
 
void clear ()
 

Private Attributes

amrex::Vector< amrex::MultiFab * > m_data
 
amrex::Vector< int > m_owns_data
 
amrex::Real m_time
 

Constructor & Destructor Documentation

◆ TimeInterpolatedData() [1/4]

TimeInterpolatedData::TimeInterpolatedData ( )
default

◆ TimeInterpolatedData() [2/4]

TimeInterpolatedData::TimeInterpolatedData ( amrex::Real  time)
inline
11 : m_time(time) {}
amrex::Real m_time
Definition: ERF_TimeInterpolatedData.H:69

◆ ~TimeInterpolatedData()

TimeInterpolatedData::~TimeInterpolatedData ( )
inline
13  {
14  clear();
15  }
void clear()
Definition: ERF_TimeInterpolatedData.H:51
Here is the call graph for this function:

◆ TimeInterpolatedData() [3/4]

TimeInterpolatedData::TimeInterpolatedData ( TimeInterpolatedData &&  )
defaultnoexcept

◆ TimeInterpolatedData() [4/4]

TimeInterpolatedData::TimeInterpolatedData ( const TimeInterpolatedData other)
delete

Member Function Documentation

◆ add_var()

void TimeInterpolatedData::add_var ( amrex::MultiFab *  var_data,
int  own_data 
)
inline
40  {
41  m_data.push_back(var_data);
42  m_owns_data.push_back(own_data);
43  }
amrex::Vector< int > m_owns_data
Definition: ERF_TimeInterpolatedData.H:68
amrex::Vector< amrex::MultiFab * > m_data
Definition: ERF_TimeInterpolatedData.H:67

◆ clear()

void TimeInterpolatedData::clear ( )
inline
51  {
52  // clear all data owned by this object
53  for (int i = 0; i < num_vars(); ++i) {
54  if (m_owns_data[i] == 1) {
55  m_data[i]->clear();
56  delete m_data[i];
57  }
58  }
59 
60  // clear internal memory
61  m_data.clear();
62  m_owns_data.clear();
63  m_time = 0.;
64  }
int num_vars()
Definition: ERF_TimeInterpolatedData.H:49

Referenced by ~TimeInterpolatedData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_time()

amrex::Real TimeInterpolatedData::get_time ( ) const
inline
38 { return m_time; }

◆ get_var()

amrex::MultiFab& TimeInterpolatedData::get_var ( int  var_idx)
inline
45  {
46  return *m_data[var_idx];
47  }

◆ num_vars()

int TimeInterpolatedData::num_vars ( )
inline
49 { return m_data.size(); }

Referenced by clear().

Here is the caller graph for this function:

◆ operator=() [1/2]

TimeInterpolatedData& TimeInterpolatedData::operator= ( const TimeInterpolatedData other)
delete

◆ operator=() [2/2]

TimeInterpolatedData& TimeInterpolatedData::operator= ( TimeInterpolatedData &&  other)
defaultnoexcept

◆ set_time()

void TimeInterpolatedData::set_time ( amrex::Real  time)
inline
34  {
35  m_time = time;
36  }

Member Data Documentation

◆ m_data

amrex::Vector<amrex::MultiFab*> TimeInterpolatedData::m_data
private

Referenced by add_var(), clear(), get_var(), and num_vars().

◆ m_owns_data

amrex::Vector<int> TimeInterpolatedData::m_owns_data
private

Referenced by add_var(), and clear().

◆ m_time

amrex::Real TimeInterpolatedData::m_time
private

Referenced by clear(), get_time(), and set_time().


The documentation for this struct was generated from the following file: