FieldNorms Class Reference

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

#include <FieldNorms.H>

Inheritance diagram for amr_wind::field_norms::FieldNorms:
[legend]
Collaboration diagram for amr_wind::field_norms::FieldNorms:
[legend]

Public Member Functions

 FieldNorms (CFDSim &, std::string)
 ~FieldNorms () override
void pre_init_actions () override
 Perform actions before mesh is created.
void initialize () override
 Read user inputs and create the different data probe instances.
void post_advance_work () override
void output_actions () override
void post_regrid_actions () override
const amrex::Vector< std::string > & var_names () const
const amrex::Vector< amrex::Real > & field_norms () const

Static Public Member Functions

static std::string identifier ()
static amrex::Real get_norm (const amr_wind::Field &field, const int comp, const int ncomp, const int norm_type, const bool use_mask)

Private Member Functions

virtual void prepare_ascii_file ()
 prepare ASCII file and directory
virtual void write_ascii ()
 Output sampled data in ASCII format.
void process_field_norms ()
 process all fields and calculate norms

Private Attributes

CFDSimm_sim
 Reference to the CFD sim.
amrex::Vector< std::string > m_var_names
 List of variable names for output.
amrex::Vector< amrex::Real > m_fnorms
 List holding norms for all fields and their components.
const std::string m_label
std::string m_out_fname
 filename for ASCII output
int m_width {18}
 width in ASCII output
int m_precision {10}
 precision in ASCII output
int m_norm_type {2}
 Type of norm.
bool m_use_mask {true}
 Mask redundant grids (finest available grid only)
bool m_use_vector_magnitude {false}
 Consider vector magnitude, not separate vector components.

Detailed Description

field norm object

A concrete implementation of the post-processing interface that deals with norms of fields. FIXME: need to update this

Constructor & Destructor Documentation

◆ FieldNorms()

amr_wind::field_norms::FieldNorms::FieldNorms ( CFDSim & sim,
std::string label )

◆ ~FieldNorms()

amr_wind::field_norms::FieldNorms::~FieldNorms ( )
overridedefault

Member Function Documentation

◆ field_norms()

const amrex::Vector< amrex::Real > & amr_wind::field_norms::FieldNorms::field_norms ( ) const
inline

◆ get_norm()

amrex::Real amr_wind::field_norms::FieldNorms::get_norm ( const amr_wind::Field & field,
const int comp,
const int ncomp,
const int norm_type,
const bool use_mask )
static

◆ identifier()

std::string amr_wind::field_norms::FieldNorms::identifier ( )
inlinestatic

◆ initialize()

void amr_wind::field_norms::FieldNorms::initialize ( )
override

Read user inputs and create the different data probe instances.

◆ output_actions()

void amr_wind::field_norms::FieldNorms::output_actions ( )
override

◆ post_advance_work()

void amr_wind::field_norms::FieldNorms::post_advance_work ( )
inlineoverride

◆ post_regrid_actions()

void amr_wind::field_norms::FieldNorms::post_regrid_actions ( )
inlineoverride

◆ pre_init_actions()

void amr_wind::field_norms::FieldNorms::pre_init_actions ( )
inlineoverride

Perform actions before mesh is created.

◆ prepare_ascii_file()

void amr_wind::field_norms::FieldNorms::prepare_ascii_file ( )
privatevirtual

prepare ASCII file and directory

◆ process_field_norms()

void amr_wind::field_norms::FieldNorms::process_field_norms ( )
private

process all fields and calculate norms

◆ var_names()

const amrex::Vector< std::string > & amr_wind::field_norms::FieldNorms::var_names ( ) const
inline

◆ write_ascii()

void amr_wind::field_norms::FieldNorms::write_ascii ( )
privatevirtual

Output sampled data in ASCII format.

Member Data Documentation

◆ m_fnorms

amrex::Vector<amrex::Real> amr_wind::field_norms::FieldNorms::m_fnorms
private

List holding norms for all fields and their components.

◆ m_label

const std::string amr_wind::field_norms::FieldNorms::m_label
private

Name of this sampling object.

The label is used to read user inputs from file and is also used for naming files directories depending on the output format.

◆ m_norm_type

int amr_wind::field_norms::FieldNorms::m_norm_type {2}
private

Type of norm.

◆ m_out_fname

std::string amr_wind::field_norms::FieldNorms::m_out_fname
private

filename for ASCII output

◆ m_precision

int amr_wind::field_norms::FieldNorms::m_precision {10}
private

precision in ASCII output

◆ m_sim

CFDSim& amr_wind::field_norms::FieldNorms::m_sim
private

Reference to the CFD sim.

◆ m_use_mask

bool amr_wind::field_norms::FieldNorms::m_use_mask {true}
private

Mask redundant grids (finest available grid only)

◆ m_use_vector_magnitude

bool amr_wind::field_norms::FieldNorms::m_use_vector_magnitude {false}
private

Consider vector magnitude, not separate vector components.

◆ m_var_names

amrex::Vector<std::string> amr_wind::field_norms::FieldNorms::m_var_names
private

List of variable names for output.

◆ m_width

int amr_wind::field_norms::FieldNorms::m_width {18}
private

width in ASCII output


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