ScratchField Class Reference

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

#include <ScratchField.H>

Collaboration diagram for amr_wind::ScratchField:
[legend]

Public Member Functions

 ScratchField (const ScratchField &)=delete
 
ScratchFieldoperator= (const ScratchField &)=delete
 
const std::string & name () const
 Name if available for this scratch field.
 
int num_comp () const
 Number of components for this field.
 
const amrex::IntVect & num_grow () const
 Ghost cells.
 
FieldLoc field_location () const
 Cell, node, face where the field is stored.
 
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.
 
ViewField< ScratchFieldsubview (const int scomp=0, const int ncomp=1)
 
void fillpatch (const amrex::Real time) noexcept
 
void fillpatch (const amrex::Real time, const amrex::IntVect &ng) noexcept
 
void fillpatch (const int lev, const amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost) noexcept
 
void fillpatch (const int lev, const amrex::Real time, amrex::MultiFab &mfab, const amrex::IntVect &nghost, amrex::Vector< amrex::BCRec > &bcrec) noexcept
 

Protected Member Functions

 ScratchField (const FieldRepo &repo, std::string name, const int ncomp=1, const int ngrow=1, const FieldLoc floc=FieldLoc::CELL)
 

Protected Attributes

const FieldRepom_repo
 
std::string m_name
 
int m_ncomp
 
amrex::IntVect m_ngrow
 
FieldLoc m_floc
 
amrex::Vector< amrex::MultiFab > m_data
 

Friends

class FieldRepo
 

Detailed Description

A temporary computational field

A ScratchField is similar to a Field in usage, but is temporary in nature. It is used as a scratch buffer to compute intermediate quantities. However, unlike fields these don't have multiple states, and cannot survive across a regrid. By default, FieldRepo returns a unique pointer to this instance and it is not safe to hold this pointer across timesteps.

At present, ScratchField cannot be used for I/O and/or post-processing utilities.

Constructor & Destructor Documentation

◆ ScratchField() [1/2]

amr_wind::ScratchField::ScratchField ( const ScratchField & )
delete

◆ ScratchField() [2/2]

amr_wind::ScratchField::ScratchField ( const FieldRepo & repo,
std::string name,
const int ncomp = 1,
const int ngrow = 1,
const FieldLoc floc = FieldLoc::CELL )
inlineprotected

Member Function Documentation

◆ field_location()

FieldLoc amr_wind::ScratchField::field_location ( ) const
inline

Cell, node, face where the field is stored.

◆ fillpatch() [1/4]

void amr_wind::ScratchField::fillpatch ( const amrex::Real time)
noexcept

◆ fillpatch() [2/4]

void amr_wind::ScratchField::fillpatch ( const amrex::Real time,
const amrex::IntVect & ng )
noexcept

◆ fillpatch() [3/4]

void amr_wind::ScratchField::fillpatch ( const int lev,
const amrex::Real time,
amrex::MultiFab & mfab,
const amrex::IntVect & nghost )
noexcept

◆ fillpatch() [4/4]

void amr_wind::ScratchField::fillpatch ( const int lev,
const amrex::Real time,
amrex::MultiFab & mfab,
const amrex::IntVect & nghost,
amrex::Vector< amrex::BCRec > & bcrec )
noexcept

◆ name()

const std::string & amr_wind::ScratchField::name ( ) const
inline

Name if available for this scratch field.

◆ num_comp()

int amr_wind::ScratchField::num_comp ( ) const
inline

Number of components for this field.

◆ num_grow()

const amrex::IntVect & amr_wind::ScratchField::num_grow ( ) const
inline

Ghost cells.

◆ operator()() [1/2]

amrex::MultiFab & amr_wind::ScratchField::operator() ( int lev)
inline

Return the field data for a given level.

◆ operator()() [2/2]

const amrex::MultiFab & amr_wind::ScratchField::operator() ( int lev) const
inline

◆ operator=()

ScratchField & amr_wind::ScratchField::operator= ( const ScratchField & )
delete

◆ repo()

const FieldRepo & amr_wind::ScratchField::repo ( ) const
inline

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

◆ subview()

ViewField< ScratchField > amr_wind::ScratchField::subview ( const int scomp = 0,
const int ncomp = 1 )
inline

Return a sub-view of the ScratchField instance

◆ vec_const_ptrs()

amrex::Vector< const amrex::MultiFab * > amr_wind::ScratchField::vec_const_ptrs ( ) const
inlinenoexcept

◆ vec_ptrs()

amrex::Vector< amrex::MultiFab * > amr_wind::ScratchField::vec_ptrs ( )
inlinenoexcept

Friends And Related Symbol Documentation

◆ FieldRepo

friend class FieldRepo
friend

Member Data Documentation

◆ m_data

amrex::Vector<amrex::MultiFab> amr_wind::ScratchField::m_data
protected

◆ m_floc

FieldLoc amr_wind::ScratchField::m_floc
protected

◆ m_name

std::string amr_wind::ScratchField::m_name
protected

◆ m_ncomp

int amr_wind::ScratchField::m_ncomp
protected

◆ m_ngrow

amrex::IntVect amr_wind::ScratchField::m_ngrow
protected

◆ m_repo

const FieldRepo& amr_wind::ScratchField::m_repo
protected

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