Flow123d  jenkins-Flow123d-linux-release-multijob-282
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Balance Class Reference

#include <mass_balance.hh>

Collaboration diagram for Balance:
Collaboration graph
[legend]

Classes

class  Quantity
 

Public Types

enum  OutputFormat { legacy, txt, gnuplot }
 

Public Member Functions

 Balance (const std::string &file_prefix, const Mesh *mesh, const Distribution *el_ds, const int *el_4_loc, const Input::Record &in_rec)
 
 ~Balance ()
 
void units (const UnitSI &unit)
 Setter for units of conserved quantities. More...
 
bool cumulative () const
 Getter for cumulative_. More...
 
unsigned int add_quantity (const string &name)
 
std::vector< unsigned int > add_quantities (const std::vector< string > &names)
 
void allocate (unsigned int n_loc_dofs, unsigned int max_dofs_per_boundary)
 
void start_mass_assembly (unsigned int quantity_idx)
 
void start_mass_assembly (std::vector< unsigned int > q_idx_vec)
 Variant of the start_mass_assembly() method for a set of quantities. More...
 
void start_flux_assembly (unsigned int quantity_idx)
 
void start_flux_assembly (std::vector< unsigned int > q_idx_vec)
 Variant of the start_flux_assembly() method for a set of quantities. More...
 
void start_source_assembly (unsigned int quantity_idx)
 
void start_source_assembly (std::vector< unsigned int > q_idx_vec)
 Variant of the start_source_assembly() method for a set of quantities. More...
 
void add_mass_matrix_values (unsigned int quantity_idx, unsigned int region_idx, const std::vector< int > &dof_indices, const std::vector< double > &values)
 
void add_flux_matrix_values (unsigned int quantity_idx, unsigned int elem_idx, const std::vector< int > &dof_indices, const std::vector< double > &values)
 
void add_source_matrix_values (unsigned int quantity_idx, unsigned int region_idx, const std::vector< int > &dof_indices, const std::vector< double > &values)
 
void add_flux_vec_value (unsigned int quantity_idx, unsigned int elem_idx, double value)
 
void add_source_rhs_values (unsigned int quantity_idx, unsigned int region_idx, const std::vector< int > &dof_values, const std::vector< double > &values)
 
void finish_mass_assembly (unsigned int quantity_idx)
 This method must be called after assembling the matrix for computing mass. More...
 
void finish_mass_assembly (std::vector< unsigned int > q_idx_vec)
 Variant of the finish_mass_assembly() method for a set of quantities. More...
 
void finish_flux_assembly (unsigned int quantity_idx)
 This method must be called after assembling the matrix and vector for computing flux. More...
 
void finish_flux_assembly (std::vector< unsigned int > q_idx_vec)
 Variant of the finish_flux_assembly() method for a set of quantities. More...
 
void finish_source_assembly (unsigned int quantity_idx)
 This method must be called after assembling the matrix and vectors for computing source. More...
 
void finish_source_assembly (std::vector< unsigned int > q_idx_vec)
 Variant of the finish_source_assembly() method for a set of quantities. More...
 
void calculate_cumulative_sources (unsigned int quantity_idx, const Vec &solution, double dt)
 
void calculate_cumulative_fluxes (unsigned int quantity_idx, const Vec &solution, double dt)
 
void calculate_mass (unsigned int quantity_idx, const Vec &solution, vector< double > &output_array)
 
void calculate_mass (unsigned int quantity_idx, const Vec &solution)
 
void calculate_flux (unsigned int quantity_idx, const Vec &solution)
 
void calculate_source (unsigned int quantity_idx, const Vec &solution)
 
void add_cumulative_source (unsigned int quantity_idx, double source)
 
void output (double time)
 Perform output to file for given time instant. More...
 

Static Public Attributes

static Input::Type::Record input_type
 Main balance input record type. More...
 
static Input::Type::Selection format_selection_input_type
 Input selection for file format. More...
 

Private Member Functions

void output_legacy (double time)
 Perform output in old format (for compatibility) More...
 
void output_csv (double time, char delimiter, const std::string &comment_string, unsigned int repeat=0)
 Perform output in csv format. More...
 
std::string csv_zero_vals (unsigned int cnt, char delimiter)
 Return part of output represented by zero values. Count of zero values is given by cnt parameter. More...
 
void format_csv_output_header (char delimiter, const std::string &comment_string)
 Print output header. More...
 
std::string format_csv_val (std::string val, char delimiter, bool initial=false)
 Format string value of csv output. Wrap string into quotes and if delimiter is space, align text to column. More...
 
std::string format_csv_val (double val, char delimiter, bool initial=false)
 Format double value of csv output. If delimiter is space, align text to column. More...
 

Private Attributes

ofstream output_
 Handle for file for output of balance and total fluxes over individual regions and region sets. More...
 
OutputFormat output_format_
 Format of output file. More...
 
std::vector< Quantityquantities_
 Names of conserved quantities. More...
 
const RegionDBregions_
 Database of bulk and boundary regions. More...
 
UnitSI units_
 Units of conserved quantities. More...
 
Mat * region_mass_matrix_
 Matrices for calculation of mass (n_dofs x n_bulk_regions). More...
 
Mat * be_flux_matrix_
 Matrices for calculation of flux (n_boundary_edges x n_dofs). More...
 
Mat * region_source_matrix_
 Matrices for calculation of source (n_dofs x n_bulk_regions). More...
 
Mat * region_source_rhs_
 Matrices for calculation of signed source (n_dofs x n_bulk_regions). More...
 
Vec * be_flux_vec_
 Vectors for calculation of flux (n_boundary_edges). More...
 
Vec * region_source_vec_
 Vectors for calculation of source (n_bulk_regions). More...
 
Mat region_be_matrix_
 
Vec ones_
 auxiliary vectors for summation of matrix columns More...
 
Vec ones_be_
 
std::vector< unsigned int > be_regions_
 Number of boundary region for each local boundary edge. More...
 
int be_offset_
 Offset for local part of vector of boundary edges. More...
 
std::vector< std::vector
< double > > 
fluxes_
 
std::vector< std::vector
< double > > 
fluxes_in_
 
std::vector< std::vector
< double > > 
fluxes_out_
 
std::vector< std::vector
< double > > 
masses_
 
std::vector< std::vector
< double > > 
sources_
 
std::vector< std::vector
< double > > 
sources_in_
 
std::vector< std::vector
< double > > 
sources_out_
 
std::vector< double > sum_fluxes_
 
std::vector< double > sum_fluxes_in_
 
std::vector< double > sum_fluxes_out_
 
std::vector< double > sum_masses_
 
std::vector< double > sum_sources_
 
std::vector< double > sum_sources_in_
 
std::vector< double > sum_sources_out_
 
std::vector< double > initial_mass_
 
std::vector< double > integrated_sources_
 
std::vector< double > integrated_fluxes_
 
std::vector< double > increment_fluxes_
 
std::vector< double > increment_sources_
 
double initial_time_
 initial time More...
 
double last_time_
 time of last calculated balance More...
 
bool initial_
 true before calculating the mass at initial time, otherwise false More...
 
bool cumulative_
 if true then cumulative balance is computed More...
 
bool allocation_done_
 true before allocating necessary internal structures (Petsc matrices etc.) More...
 
int rank_
 MPI rank. More...
 
unsigned int output_line_counter_
 hold count of line printed into output_ More...
 

Static Private Attributes

static const unsigned int output_column_width = 20
 Size of column in output (used if delimiter is space) More...
 

Detailed Description

Design of balance class - serves as storage and writer. Equations themselves call methods of Balance that add/modify mass, source and flux of various quantities and generate output.

One instance of Balance can handle several conservative quantities of the same type (e.g. mass of several substances or their phases).

The mass, flux and source are calculated as follows:

m(q,c,r) = ( M'(q,c) * solution )[r]
f(q,c,r) = ( R' * ( F(q,c) * solution + fv(q,c) ) )[r]
s(q,c,r) = ( S'(q,c) * solution + sv(q,c) )[r]

where M' stands for matrix transpose,

m(q,c,r)...mass of q-th substance's c-th component in region r
f(q,c,r)...flux of q-th substance's c-th component in region r
s(q,c,r)...source of q-th substance's c-th component in region r

and

M(q,c)...region_mass_matrix_[q*quantities_.size() + c]      n_dofs x n_bulk_regions
F(q,c)...be_flux_matrix_[q*quantities_.size() + c]          n_boundary_edges x n_dofs
S(q,c)...region_source_matrix_[q*quantities_.size() + c]    n_dofs x n_bulk_regions
SV(q,c)..region_source_rhs_[q*quantities_.size() + c]       n_dofs x n_bulk_regions
fv(q,c)..be_flux_vec_[q*quantities_.size() + c]             n_boundary_edges
sv(q,c)..region_source_vec_[q*quantities_.size() + c]       n_bulk_regions
R........region_be_matrix_                                  n_boundary_edges x n_boundary_regions

Note that it holds:

sv(q,c) = column sum of SV(q,c)

Except for that, we also provide information on positive/negative flux and source:

fp(q,c,r) = ( R' * EFP(q,c) )[r],   EFP(q,c)[e] = max{ 0, ( F(q,c) * solution + fv(q,c) )[e] }
fn(q,c,r) = ( R' * EFN(q,c) )[r],   EFN(q,c)[e] = min{ 0, ( F(q,c) * solution + fv(q,c) )[e] }
sp(q,c,r) = sum_{i in DOFS } max{ 0, ( S(q,c)[i,r] * solution[i] + SV(q,c)[i,r] ) }
sn(q,c,r) = sum_{i in DOFS } min{ 0, ( S(q,c)[i,r] * solution[i] + SV(q,c)[i,r] ) }

where

fp(q,c,r)...positive (outward) flux of q-th quantity's c-th component in region r
fn(q,c,r)...negative (inward) flux of q-th quantity's c-th component in region r
sp(q,c,r)...positive source (spring) of q-th quantity's c-th component in region r
sn(q,c,r)...negative source (sink) of q-th quantity's c-th component in region r

Remark: The matrix R is needed only for calculation of signed fluxes. The reason is that to determine sign, we decompose flux to sum of local contributions per each boundary element and check its sign. It is not possible to decompose flux using shape functions, since their normal derivatives may have any sign.

Output values (if not relevant, zero is supplied):

#time bulk_region quantity 0 0 0 mass source source_in source_out 0 0 0 #time boundary_region quantity flux flux_in flux_out 0 0 0 0 0 0 0 #time ALL quantity flux flux_in flux_out mass source source_in source_out integrated_flux integrated_source error

error = current_mass - (initial_mass + integrated_source - integrated_flux)

Definition at line 80 of file mass_balance.hh.

Member Enumeration Documentation

Possible formats of output file.

Enumerator
legacy 

legacy

txt 

csv

gnuplot 

gnuplot

Definition at line 107 of file mass_balance.hh.

Constructor & Destructor Documentation

Balance::Balance ( const std::string &  file_prefix,
const Mesh mesh,
const Distribution el_ds,
const int *  el_4_loc,
const Input::Record in_rec 
)

Constructor.

Parameters
file_prefixPrefix of output file name.
meshMesh.
el_dsDistribution of elements.
el_4_locLocal to global element numbering.
in_recInput record of balance.

Definition at line 67 of file mass_balance.cc.

Balance::~Balance ( )

Definition at line 120 of file mass_balance.cc.

Member Function Documentation

void Balance::add_cumulative_source ( unsigned int  quantity_idx,
double  source 
)

Adds provided values to the cumulative sources.

Parameters
quantity_idxIndex of quantity.
sourcesSources per region.
dtActual time step.

Definition at line 625 of file mass_balance.cc.

void Balance::add_flux_matrix_values ( unsigned int  quantity_idx,
unsigned int  elem_idx,
const std::vector< int > &  dof_indices,
const std::vector< double > &  values 
)

Adds elements into matrix for computing flux.

Parameters
quantity_idxIndex of quantity.
elem_idxLocal index of boundary edge.
n_dofsNumber of dofs to be added.
dof_indicesDof indices to be added.
valuesValues to be added.

Definition at line 387 of file mass_balance.cc.

void Balance::add_flux_vec_value ( unsigned int  quantity_idx,
unsigned int  elem_idx,
double  value 
)

Adds element into vector for computing flux.

Parameters
quantity_idxIndex of quantity.
elem_idxLocal index of boundary edge.
valueValue to be added.

Definition at line 421 of file mass_balance.cc.

void Balance::add_mass_matrix_values ( unsigned int  quantity_idx,
unsigned int  region_idx,
const std::vector< int > &  dof_indices,
const std::vector< double > &  values 
)

Adds elements into matrix for computing mass.

Parameters
quantity_idxIndex of quantity.
region_idxIndex of bulk region.
n_dofsNumber of dofs to be added.
dof_indicesDof indices to be added.
valuesValues to be added.

Definition at line 370 of file mass_balance.cc.

std::vector< unsigned int > Balance::add_quantities ( const std::vector< string > &  names)

Define a set of conservative quantities.

Parameters
namesList of quantities' names.
Returns
List of quantities' indices.

Definition at line 156 of file mass_balance.cc.

unsigned int Balance::add_quantity ( const string &  name)

Define a single conservative quantity.

Parameters
nameName of the quantity.
Returns
Quantity's internal index.

Definition at line 145 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::add_source_matrix_values ( unsigned int  quantity_idx,
unsigned int  region_idx,
const std::vector< int > &  dof_indices,
const std::vector< double > &  values 
)

Adds elements into matrix for computing source.

Parameters
quantity_idxIndex of quantity.
region_idxIndex of bulk region.
n_dofsNumber of dofs to be added.
dof_indicesDof indices to be added.
valuesValues to be added.

Definition at line 404 of file mass_balance.cc.

void Balance::add_source_rhs_values ( unsigned int  quantity_idx,
unsigned int  region_idx,
const std::vector< int > &  dof_values,
const std::vector< double > &  values 
)

Adds elements into vector for computing source.

Parameters
quantity_idxIndex of quantity.
region_idxIndex of bulk region.
n_dofsNumber of dofs to be added.
dof_indicesDof indices to be added.
valuesValues to be added.

Definition at line 432 of file mass_balance.cc.

void Balance::allocate ( unsigned int  n_loc_dofs,
unsigned int  max_dofs_per_boundary 
)

Allocates matrices and vectors for balance.

Parameters
n_loc_dofsNumber of solution dofs on the local process.
max_dofs_per_boundaryNumber of dofs contributing to one boundary edge.

Definition at line 169 of file mass_balance.cc.

void Balance::calculate_cumulative_fluxes ( unsigned int  quantity_idx,
const Vec &  solution,
double  dt 
)

Updates cumulative quantities for balance. This method can be called in substeps even if no output is generated. It calculates the sum of flux and source over time interval.

Parameters
quantity_idxIndex of quantity.
solutionSolution vector.
dtActual time step.

Definition at line 480 of file mass_balance.cc.

void Balance::calculate_cumulative_sources ( unsigned int  quantity_idx,
const Vec &  solution,
double  dt 
)

Updates cumulative quantities for balance. This method can be called in substeps even if no output is generated. It calculates the sum of flux and source over time interval.

Parameters
quantity_idxIndex of quantity.
solutionSolution vector.
dtActual time step.

Definition at line 449 of file mass_balance.cc.

void Balance::calculate_flux ( unsigned int  quantity_idx,
const Vec &  solution 
)

Calculates actual flux.

Parameters
quantity_idxIndex of quantity.
solutionSolution vector.

Definition at line 591 of file mass_balance.cc.

void Balance::calculate_mass ( unsigned int  quantity_idx,
const Vec &  solution,
vector< double > &  output_array 
)

Calculates actual mass and save it to given vector.

Parameters
quantity_idxIndex of quantity.
solutionSolution vector.
output_arrayVector of output masses per region.

Definition at line 515 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::calculate_mass ( unsigned int  quantity_idx,
const Vec &  solution 
)
inline

Calculates actual mass and save it to internal vector.

Parameters
quantity_idxIndex of quantity.
solutionSolution vector.

Definition at line 333 of file mass_balance.hh.

void Balance::calculate_source ( unsigned int  quantity_idx,
const Vec &  solution 
)

Calculates actual source.

Parameters
quantity_idxIndex of quantity.
solutionSolution vector.

Definition at line 536 of file mass_balance.cc.

std::string Balance::csv_zero_vals ( unsigned int  cnt,
char  delimiter 
)
private

Return part of output represented by zero values. Count of zero values is given by cnt parameter.

Definition at line 909 of file mass_balance.cc.

Here is the caller graph for this function:

bool Balance::cumulative ( ) const
inline

Getter for cumulative_.

Definition at line 140 of file mass_balance.hh.

void Balance::finish_flux_assembly ( unsigned int  quantity_idx)

This method must be called after assembling the matrix and vector for computing flux.

Definition at line 348 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::finish_flux_assembly ( std::vector< unsigned int >  q_idx_vec)
inline

Variant of the finish_flux_assembly() method for a set of quantities.

Definition at line 278 of file mass_balance.hh.

void Balance::finish_mass_assembly ( unsigned int  quantity_idx)

This method must be called after assembling the matrix for computing mass.

Definition at line 341 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::finish_mass_assembly ( std::vector< unsigned int >  q_idx_vec)
inline

Variant of the finish_mass_assembly() method for a set of quantities.

Definition at line 268 of file mass_balance.hh.

void Balance::finish_source_assembly ( unsigned int  quantity_idx)

This method must be called after assembling the matrix and vectors for computing source.

Definition at line 357 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::finish_source_assembly ( std::vector< unsigned int >  q_idx_vec)
inline

Variant of the finish_source_assembly() method for a set of quantities.

Definition at line 288 of file mass_balance.hh.

void Balance::format_csv_output_header ( char  delimiter,
const std::string &  comment_string 
)
private

Print output header.

Definition at line 998 of file mass_balance.cc.

Here is the caller graph for this function:

std::string Balance::format_csv_val ( std::string  val,
char  delimiter,
bool  initial = false 
)
private

Format string value of csv output. Wrap string into quotes and if delimiter is space, align text to column.

Definition at line 1025 of file mass_balance.cc.

Here is the caller graph for this function:

std::string Balance::format_csv_val ( double  val,
char  delimiter,
bool  initial = false 
)
private

Format double value of csv output. If delimiter is space, align text to column.

Definition at line 1042 of file mass_balance.cc.

void Balance::output ( double  time)

Perform output to file for given time instant.

Definition at line 635 of file mass_balance.cc.

void Balance::output_csv ( double  time,
char  delimiter,
const std::string &  comment_string,
unsigned int  repeat = 0 
)
private

Perform output in csv format.

Definition at line 917 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::output_legacy ( double  time)
private

Perform output in old format (for compatibility)

Definition at line 764 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::start_flux_assembly ( unsigned int  quantity_idx)

This method must be called before assembling the matrix and vector for fluxes. It actually erases the matrix and vector.

Definition at line 324 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::start_flux_assembly ( std::vector< unsigned int >  q_idx_vec)
inline

Variant of the start_flux_assembly() method for a set of quantities.

Definition at line 183 of file mass_balance.hh.

void Balance::start_mass_assembly ( unsigned int  quantity_idx)

This method must be called before assembling the matrix for computing mass. It actually erases the matrix.

Definition at line 317 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::start_mass_assembly ( std::vector< unsigned int >  q_idx_vec)
inline

Variant of the start_mass_assembly() method for a set of quantities.

Definition at line 170 of file mass_balance.hh.

void Balance::start_source_assembly ( unsigned int  quantity_idx)

This method must be called before assembling the matrix and vectors for sources. It actually erases the matrix and vectors.

Definition at line 332 of file mass_balance.cc.

Here is the caller graph for this function:

void Balance::start_source_assembly ( std::vector< unsigned int >  q_idx_vec)
inline

Variant of the start_source_assembly() method for a set of quantities.

Definition at line 196 of file mass_balance.hh.

void Balance::units ( const UnitSI unit)
inline

Setter for units of conserved quantities.

Definition at line 137 of file mass_balance.hh.

Member Data Documentation

bool Balance::allocation_done_
private

true before allocating necessary internal structures (Petsc matrices etc.)

Definition at line 478 of file mass_balance.hh.

Mat* Balance::be_flux_matrix_
private

Matrices for calculation of flux (n_boundary_edges x n_dofs).

Definition at line 409 of file mass_balance.hh.

Vec* Balance::be_flux_vec_
private

Vectors for calculation of flux (n_boundary_edges).

Definition at line 418 of file mass_balance.hh.

int Balance::be_offset_
private

Offset for local part of vector of boundary edges.

Definition at line 436 of file mass_balance.hh.

std::vector<unsigned int> Balance::be_regions_
private

Number of boundary region for each local boundary edge.

Definition at line 433 of file mass_balance.hh.

bool Balance::cumulative_
private

if true then cumulative balance is computed

Definition at line 475 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::fluxes_
private

Definition at line 441 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::fluxes_in_
private

Definition at line 442 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::fluxes_out_
private

Definition at line 443 of file mass_balance.hh.

Selection Balance::format_selection_input_type
static
Initial value:
= Selection("Balance_output_format", "Format of output file for balance.")
.add_value(Balance::legacy, "legacy", "Legacy format used by previous program versions.")
.add_value(Balance::txt, "txt", "Excel format with tab delimiter.")
.add_value(Balance::gnuplot, "gnuplot", "Format compatible with GnuPlot datafile with fixed column width.")

Input selection for file format.

Definition at line 118 of file mass_balance.hh.

std::vector<double> Balance::increment_fluxes_
private

Definition at line 462 of file mass_balance.hh.

std::vector<double> Balance::increment_sources_
private

Definition at line 463 of file mass_balance.hh.

bool Balance::initial_
private

true before calculating the mass at initial time, otherwise false

Definition at line 472 of file mass_balance.hh.

std::vector<double> Balance::initial_mass_
private

Definition at line 457 of file mass_balance.hh.

double Balance::initial_time_
private

initial time

Definition at line 466 of file mass_balance.hh.

Record Balance::input_type
static
Initial value:
= Record("Balance", "Balance of a conservative quantity, boundary fluxes and sources.")
.declare_key("balance_on", Bool(), Default("true"), "Balance is computed if the value is true.")
.declare_key("format", Balance::format_selection_input_type, Default("txt"), "Format of output file.")
.declare_key("cumulative", Bool(), Default("false"), "Compute cumulative balance over time. "
"If true, then balance is calculated at each computational time step, which can slow down the program.")
.declare_key("file", FileName::output(), Default::read_time("FileName balance.*"), "File name for output of balance.")
.allow_auto_conversion("balance_on")

Main balance input record type.

Definition at line 115 of file mass_balance.hh.

std::vector<double> Balance::integrated_fluxes_
private

Definition at line 461 of file mass_balance.hh.

std::vector<double> Balance::integrated_sources_
private

Definition at line 460 of file mass_balance.hh.

double Balance::last_time_
private

time of last calculated balance

Definition at line 469 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::masses_
private

Definition at line 444 of file mass_balance.hh.

Vec Balance::ones_
private

auxiliary vectors for summation of matrix columns

Definition at line 430 of file mass_balance.hh.

Vec Balance::ones_be_
private

Definition at line 430 of file mass_balance.hh.

ofstream Balance::output_
private

Handle for file for output of balance and total fluxes over individual regions and region sets.

Definition at line 390 of file mass_balance.hh.

const unsigned int Balance::output_column_width = 20
staticprivate

Size of column in output (used if delimiter is space)

Definition at line 368 of file mass_balance.hh.

OutputFormat Balance::output_format_
private

Format of output file.

Definition at line 393 of file mass_balance.hh.

unsigned int Balance::output_line_counter_
private

hold count of line printed into output_

Definition at line 484 of file mass_balance.hh.

std::vector<Quantity> Balance::quantities_
private

Names of conserved quantities.

Definition at line 396 of file mass_balance.hh.

int Balance::rank_
private

MPI rank.

Definition at line 481 of file mass_balance.hh.

Mat Balance::region_be_matrix_
private

Auxiliary matrix for transfer of quantities between boundary edges and regions (n_boundary_edges x n_boundary_regions).

Definition at line 427 of file mass_balance.hh.

Mat* Balance::region_mass_matrix_
private

Matrices for calculation of mass (n_dofs x n_bulk_regions).

Definition at line 406 of file mass_balance.hh.

Mat* Balance::region_source_matrix_
private

Matrices for calculation of source (n_dofs x n_bulk_regions).

Definition at line 412 of file mass_balance.hh.

Mat* Balance::region_source_rhs_
private

Matrices for calculation of signed source (n_dofs x n_bulk_regions).

Definition at line 415 of file mass_balance.hh.

Vec* Balance::region_source_vec_
private

Vectors for calculation of source (n_bulk_regions).

Definition at line 421 of file mass_balance.hh.

const RegionDB& Balance::regions_
private

Database of bulk and boundary regions.

Definition at line 399 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::sources_
private

Definition at line 445 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::sources_in_
private

Definition at line 446 of file mass_balance.hh.

std::vector<std::vector<double> > Balance::sources_out_
private

Definition at line 447 of file mass_balance.hh.

std::vector<double> Balance::sum_fluxes_
private

Definition at line 450 of file mass_balance.hh.

std::vector<double> Balance::sum_fluxes_in_
private

Definition at line 451 of file mass_balance.hh.

std::vector<double> Balance::sum_fluxes_out_
private

Definition at line 452 of file mass_balance.hh.

std::vector<double> Balance::sum_masses_
private

Definition at line 453 of file mass_balance.hh.

std::vector<double> Balance::sum_sources_
private

Definition at line 454 of file mass_balance.hh.

std::vector<double> Balance::sum_sources_in_
private

Definition at line 455 of file mass_balance.hh.

std::vector<double> Balance::sum_sources_out_
private

Definition at line 456 of file mass_balance.hh.

UnitSI Balance::units_
private

Units of conserved quantities.

Definition at line 402 of file mass_balance.hh.


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