Flow123d  jenkins-Flow123d-linux-release-multijob-198
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ConvectionTransport Class Reference

#include <transport.h>

Inheritance diagram for ConvectionTransport:
Inheritance graph
[legend]
Collaboration diagram for ConvectionTransport:
Collaboration graph
[legend]

Classes

class  EqData
 

Public Member Functions

 ConvectionTransport (Mesh &init_mesh, const Input::Record &in_rec)
 
virtual ~ConvectionTransport ()
 
void zero_time_step () override
 
void update_solution () override
 
void set_target_time (double target_time)
 
void set_balance_object (boost::shared_ptr< Balance > balance)
 
const vector< unsigned int > & get_subst_idx ()
 
void calculate_cumulative_balance ()
 
void calculate_instant_balance ()
 
void output_vector_gather ()
 
virtual void output_data () override
 Write computed fields. More...
 
EqDataget_data ()
 
OutputTimeoutput_stream ()
 
double ** get_concentration_matrix ()
 
Vec * get_concentration_vector ()
 
void get_par_info (int *&el_4_loc, Distribution *&el_ds)
 
int * get_el_4_loc ()
 
int * get_row_4_el ()
 
- Public Member Functions inherited from TransportBase
 TransportBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~TransportBase ()
 
virtual void set_velocity_field (const MH_DofHandler &dh) override
 
unsigned int n_substances () override
 Returns number of trnasported substances. More...
 
SubstanceListsubstances () override
 Returns reference to the vector of substnace names. More...
 
virtual void set_concentration_vector (Vec &vec)
 
- Public Member Functions inherited from AdvectionProcessBase
 AdvectionProcessBase (Mesh &mesh, const Input::Record in_rec)
 
- Public Member Functions inherited from EquationBase
 EquationBase ()
 
 EquationBase (Mesh &mesh, const Input::Record in_rec)
 
virtual ~EquationBase ()
 
virtual void initialize ()
 Initialize fields. More...
 
virtual void choose_next_time ()
 
virtual void set_time_upper_constraint (double dt)
 
virtual void set_time_lower_constraint (double dt)
 
TimeGovernor const & time ()
 
virtual void set_time_governor (TimeGovernor &time)
 
double planned_time ()
 
double solved_time ()
 
Meshmesh ()
 
TimeMark::Type mark_type ()
 
FieldSetdata ()
 
virtual void get_solution_vector (double *&vector, unsigned int &size)
 
virtual void get_parallel_solution_vector (Vec &vector)
 

Private Member Functions

void create_transport_matrix_mpi ()
 
void make_transport_partitioning ()
 
void set_initial_condition ()
 
void read_concentration_sources ()
 
void set_boundary_conditions ()
 
void compute_concentration_sources (unsigned int sbi)
 
void transport_matrix_step_mpi (double time_step)
 
void alloc_transport_vectors ()
 
void alloc_transport_structs_mpi ()
 

Private Attributes

EqData data_
 
bool is_convection_matrix_scaled
 
bool need_time_rescaling
 
double * sources_corr
 
Vec v_sources_corr
 
double ** sources_density
 temporary arrays to store constant values of fields over time interval More...
 
double ** sources_conc
 
double ** sources_sigma
 
TimeMark::Type target_mark_type
 TimeMark type for time marks denoting end of every time interval where transport matrix remains constant. More...
 
double cfl_max_step
 
VecScatter vconc_out_scatter
 
Mat tm
 
double transport_matrix_time
 
Vec * vconc
 Concentration vectors for mobile phase. More...
 
double ** conc
 Concentrations for phase, substance, element. More...
 
Vec * vpconc
 
Vec * bcvcorr
 
Vec * vcumulative_corr
 
double ** cumulative_corr
 
std::vector< VectorSeqDoubleout_conc
 
Input::Record output_rec
 Record with output specification. More...
 
OutputTimeoutput_stream_
 
int * row_4_el
 
int * el_4_loc
 
Distributionel_ds
 
vector< unsigned int > subst_idx
 List of indices used to call balance methods for a set of quantities. More...
 

Friends

class TransportOperatorSplitting
 

Additional Inherited Members

- Static Public Attributes inherited from TransportBase
static Input::Type::Record input_type_output_record
 
- Static Public Attributes inherited from AdvectionProcessBase
static Input::Type::AbstractRecord input_type
 Common specification of the input record for secondary equations. More...
 
- Protected Member Functions inherited from TransportBase
const RegionDBregion_db ()
 Returns the region database. More...
 
- Protected Attributes inherited from TransportBase
unsigned int n_subst_
 Number of transported substances. More...
 
SubstanceList substances_
 Transported substances. More...
 
const MH_DofHandlermh_dh
 
boost::shared_ptr< Balancebalance_
 (new) object for calculation and writing the mass balance to file. More...
 
- Protected Attributes inherited from EquationBase
bool equation_empty_
 flag is true if only default constructor was called More...
 
Meshmesh_
 
TimeGovernortime_
 
Input::Record input_record_
 
FieldSeteq_data_
 

Detailed Description

TODO:

Definition at line 78 of file transport.h.

Constructor & Destructor Documentation

ConvectionTransport::ConvectionTransport ( Mesh init_mesh,
const Input::Record in_rec 
)

Constructor.

Definition at line 97 of file transport.cc.

ConvectionTransport::~ConvectionTransport ( )
virtual

TODO: destructor

Definition at line 185 of file transport.cc.

Member Function Documentation

void ConvectionTransport::alloc_transport_structs_mpi ( )
private

Definition at line 276 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::alloc_transport_vectors ( )
private

Definition at line 241 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::calculate_cumulative_balance ( )

Calculate quantities necessary for cumulative balance (over time). This method is called at each (sub)iteration of the time loop.

Definition at line 764 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::calculate_instant_balance ( )

Calculate instant quantities at output times.

Definition at line 792 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::compute_concentration_sources ( unsigned int  sbi)
private

Definition at line 387 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::create_transport_matrix_mpi ( )
private

Assembly convection term part of the matrix and boundary matrix for application of boundary conditions.

Discretization of the convection term use explicit time scheme and finite volumes with full upwinding. We count on with exchange between dimensions and mixing on edges where more then two elements connect (can happen for 2D and 1D elements in 3D embedding space)

In order to get multiplication matrix for explicit transport one have to scale the convection part by the acctual time step and add time term, i. e. unit matrix (see. transport_matrix_step_mpi)

Updates CFL time step constrain.

Definition at line 600 of file transport.cc.

Here is the caller graph for this function:

double ** ConvectionTransport::get_concentration_matrix ( )

Definition at line 744 of file transport.cc.

Here is the caller graph for this function:

Vec* ConvectionTransport::get_concentration_vector ( )
inline

Definition at line 188 of file transport.h.

Here is the caller graph for this function:

EqData* ConvectionTransport::get_data ( )
inline

Getters.

Definition at line 183 of file transport.h.

int * ConvectionTransport::get_el_4_loc ( )

Definition at line 754 of file transport.cc.

void ConvectionTransport::get_par_info ( int *&  el_4_loc,
Distribution *&  el_ds 
)

Definition at line 748 of file transport.cc.

Here is the caller graph for this function:

int * ConvectionTransport::get_row_4_el ( )

Definition at line 758 of file transport.cc.

Here is the caller graph for this function:

const vector<unsigned int>& ConvectionTransport::get_subst_idx ( )
inline

Definition at line 155 of file transport.h.

Here is the caller graph for this function:

void ConvectionTransport::make_transport_partitioning ( )
private

Definition at line 161 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::output_data ( void  )
overridevirtual

Write computed fields.

Reimplemented from EquationBase.

Definition at line 822 of file transport.cc.

Here is the caller graph for this function:

OutputTime* ConvectionTransport::output_stream ( )
inline

Definition at line 185 of file transport.h.

Here is the caller graph for this function:

void ConvectionTransport::output_vector_gather ( void  )

Communicate parallel concentration vectors into sequential output vector.

Definition at line 728 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::read_concentration_sources ( )
private
void ConvectionTransport::set_balance_object ( boost::shared_ptr< Balance balance)
inline

Use Balance object from upstream equation (e.g. in various couplings) instead of own instance.

Definition at line 149 of file transport.h.

Here is the caller graph for this function:

void ConvectionTransport::set_boundary_conditions ( )
private

Definition at line 319 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::set_initial_condition ( )
private

Definition at line 222 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::set_target_time ( double  target_time)

Set time interval which is considered as one time step by TransportOperatorSplitting. In particular the velocity field dosn't change over this interval.

Dependencies:

velocity, porosity -> matrix, source_vector matrix -> time_step

data_read_times -> time_step (not necessary if we won't stick to jump times) data -> source_vector time_step -> scaling

Definition at line 579 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::transport_matrix_step_mpi ( double  time_step)
private

Finish explicit transport matrix (time step scaling)

void ConvectionTransport::update_solution ( void  )
overridevirtual

Calculates one time step of explicit transport.

Reimplemented from EquationBase.

Definition at line 495 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::zero_time_step ( )
overridevirtual

Initialize solution at zero time.

Reimplemented from EquationBase.

Definition at line 464 of file transport.cc.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TransportOperatorSplitting
friend

Definition at line 286 of file transport.h.

Member Data Documentation

Vec* ConvectionTransport::bcvcorr
private

Definition at line 267 of file transport.h.

double ConvectionTransport::cfl_max_step
private

Definition at line 247 of file transport.h.

double** ConvectionTransport::conc
private

Concentrations for phase, substance, element.

Definition at line 263 of file transport.h.

double** ConvectionTransport::cumulative_corr
private

Definition at line 269 of file transport.h.

EqData ConvectionTransport::data_
private

Parameters of the equation, some are shared with other implementations since EqData is derived from TransportBase::TransportEqData

Definition at line 230 of file transport.h.

int* ConvectionTransport::el_4_loc
private

Definition at line 280 of file transport.h.

Distribution* ConvectionTransport::el_ds
private

Definition at line 281 of file transport.h.

bool ConvectionTransport::is_convection_matrix_scaled
private

Indicates if we finished the matrix and add vector by scaling with timestep factor.

Definition at line 235 of file transport.h.

bool ConvectionTransport::need_time_rescaling
private

Definition at line 235 of file transport.h.

std::vector<VectorSeqDouble> ConvectionTransport::out_conc
private

Definition at line 271 of file transport.h.

Input::Record ConvectionTransport::output_rec
private

Record with output specification.

Definition at line 274 of file transport.h.

OutputTime* ConvectionTransport::output_stream_
private

Definition at line 276 of file transport.h.

int* ConvectionTransport::row_4_el
private

Definition at line 279 of file transport.h.

double ** ConvectionTransport::sources_conc
private

Definition at line 242 of file transport.h.

double* ConvectionTransport::sources_corr
private

Definition at line 237 of file transport.h.

double** ConvectionTransport::sources_density
private

temporary arrays to store constant values of fields over time interval

Definition at line 242 of file transport.h.

double ** ConvectionTransport::sources_sigma
private

Definition at line 242 of file transport.h.

vector<unsigned int> ConvectionTransport::subst_idx
private

List of indices used to call balance methods for a set of quantities.

Definition at line 284 of file transport.h.

TimeMark::Type ConvectionTransport::target_mark_type
private

TimeMark type for time marks denoting end of every time interval where transport matrix remains constant.

Definition at line 246 of file transport.h.

Mat ConvectionTransport::tm
private

Definition at line 253 of file transport.h.

double ConvectionTransport::transport_matrix_time
private

Time when the transport matrix was created. TODO: when we have our own classes for LA objects, we can use lazy dependence to check necessity for matrix update

Definition at line 258 of file transport.h.

Vec ConvectionTransport::v_sources_corr
private

Definition at line 238 of file transport.h.

Vec* ConvectionTransport::vconc
private

Concentration vectors for mobile phase.

Definition at line 261 of file transport.h.

VecScatter ConvectionTransport::vconc_out_scatter
private

Definition at line 252 of file transport.h.

Vec* ConvectionTransport::vcumulative_corr
private

Definition at line 268 of file transport.h.

Vec* ConvectionTransport::vpconc
private

Definition at line 266 of file transport.h.


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