Flow123d  jenkins-Flow123d-windows32-release-multijob-51
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 output_vector_gather ()
 
virtual void output_data () override
 Write computed fields. More...
 
EqDataget_data ()
 
OutputTimeoutput_stream ()
 
double *** get_concentration_matrix ()
 
void get_par_info (int *&el_4_loc, Distribution *&el_ds)
 
int * get_el_4_loc ()
 
int * get_row_4_el ()
 
TimeIntegrationScheme time_scheme () override
 Returns the time integration scheme of the equation. More...
 
- 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
 
MassBalancemass_balance ()
 
unsigned int n_substances () override
 Returns number of trnasported substances. More...
 
vector< string > & substance_names () 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)
 
- Public Member Functions inherited from EquationForMassBalance
virtual ~EquationForMassBalance ()
 

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 compute_concentration_sources_for_mass_balance (unsigned int sbi)
 
void transport_matrix_step_mpi (double time_step)
 
void alloc_transport_vectors ()
 
void alloc_transport_structs_mpi ()
 
void calc_fluxes (vector< vector< double > > &bcd_balance, vector< vector< double > > &bcd_plus_balance, vector< vector< double > > &bcd_minus_balance)
 
void calc_elem_sources (vector< vector< double > > &mass, vector< vector< double > > &src_balance)
 

Private Attributes

EqData data_
 
bool is_convection_matrix_scaled
 
bool need_time_rescaling
 
int sub_problem
 
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
 
Vec * vconc_out
 
double *** out_conc
 
Input::Record output_rec
 Record with output specification. More...
 
OutputTimeoutput_stream_
 
int * row_4_el
 
int * el_4_loc
 
Distributionel_ds
 

Friends

class TransportOperatorSplitting
 

Additional Inherited Members

- Public Types inherited from EquationForMassBalance
enum  TimeIntegrationScheme { none, explicit_euler, implicit_euler, crank_nicholson }
 
- 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...
 
std::vector< string > subst_names_
 Names of transported substances. More...
 
const MH_DofHandlermh_dh
 
MassBalancemass_balance_
 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 82 of file transport.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 93 of file transport.cc.

ConvectionTransport::~ConvectionTransport ( )
virtual

TODO: destructor

Definition at line 173 of file transport.cc.

Member Function Documentation

void ConvectionTransport::alloc_transport_structs_mpi ( )
private

Definition at line 279 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::alloc_transport_vectors ( )
private

Definition at line 233 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::calc_elem_sources ( vector< vector< double > > &  mass,
vector< vector< double > > &  src_balance 
)
privatevirtual

Implements the virtual method EquationForMassBalance::calc_elem_sources().

Implements EquationForMassBalance.

Definition at line 781 of file transport.cc.

void ConvectionTransport::calc_fluxes ( vector< vector< double > > &  bcd_balance,
vector< vector< double > > &  bcd_plus_balance,
vector< vector< double > > &  bcd_minus_balance 
)
privatevirtual

Implements the virtual method EquationForMassBalance::calc_fluxes().

Implements EquationForMassBalance.

Definition at line 740 of file transport.cc.

void ConvectionTransport::compute_concentration_sources ( unsigned int  sbi)
private

Definition at line 370 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::compute_concentration_sources_for_mass_balance ( unsigned int  sbi)
private

Definition at line 418 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 588 of file transport.cc.

Here is the caller graph for this function:

double *** ConvectionTransport::get_concentration_matrix ( )

Definition at line 720 of file transport.cc.

Here is the caller graph for this function:

EqData* ConvectionTransport::get_data ( )
inline

Getters.

Definition at line 162 of file transport.h.

int * ConvectionTransport::get_el_4_loc ( )

Definition at line 730 of file transport.cc.

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

Definition at line 724 of file transport.cc.

Here is the caller graph for this function:

int * ConvectionTransport::get_row_4_el ( )

Definition at line 734 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::make_transport_partitioning ( )
private

Definition at line 149 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 808 of file transport.cc.

Here is the caller graph for this function:

OutputTime* ConvectionTransport::output_stream ( )
inline

Definition at line 164 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 704 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::read_concentration_sources ( )
private
void ConvectionTransport::set_boundary_conditions ( )
private

Definition at line 327 of file transport.cc.

Here is the caller graph for this function:

void ConvectionTransport::set_initial_condition ( )
private

Definition at line 214 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 567 of file transport.cc.

Here is the caller graph for this function:

TimeIntegrationScheme ConvectionTransport::time_scheme ( )
inlineoverridevirtual

Returns the time integration scheme of the equation.

Implements EquationForMassBalance.

Definition at line 171 of file transport.h.

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 484 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 468 of file transport.cc.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class TransportOperatorSplitting
friend

Definition at line 279 of file transport.h.

Member Data Documentation

Vec* ConvectionTransport::bcvcorr
private

Definition at line 262 of file transport.h.

double ConvectionTransport::cfl_max_step
private

Definition at line 242 of file transport.h.

double*** ConvectionTransport::conc
private

Concentrations for phase, substance, element.

Definition at line 258 of file transport.h.

double** ConvectionTransport::cumulative_corr
private

Definition at line 264 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 219 of file transport.h.

int* ConvectionTransport::el_4_loc
private

Definition at line 276 of file transport.h.

Distribution* ConvectionTransport::el_ds
private

Definition at line 277 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 224 of file transport.h.

bool ConvectionTransport::need_time_rescaling
private

Definition at line 224 of file transport.h.

double*** ConvectionTransport::out_conc
private

Definition at line 267 of file transport.h.

Input::Record ConvectionTransport::output_rec
private

Record with output specification.

Definition at line 270 of file transport.h.

OutputTime* ConvectionTransport::output_stream_
private

Definition at line 272 of file transport.h.

int* ConvectionTransport::row_4_el
private

Definition at line 275 of file transport.h.

double ** ConvectionTransport::sources_conc
private

Definition at line 237 of file transport.h.

double* ConvectionTransport::sources_corr
private

Definition at line 232 of file transport.h.

double** ConvectionTransport::sources_density
private

temporary arrays to store constant values of fields over time interval

Definition at line 237 of file transport.h.

double ** ConvectionTransport::sources_sigma
private

Definition at line 237 of file transport.h.

int ConvectionTransport::sub_problem
private

Definition at line 227 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 241 of file transport.h.

Mat ConvectionTransport::tm
private

Definition at line 248 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 253 of file transport.h.

Vec ConvectionTransport::v_sources_corr
private

Definition at line 233 of file transport.h.

Vec* ConvectionTransport::vconc
private

Concentration vectors for mobile phase.

Definition at line 256 of file transport.h.

Vec* ConvectionTransport::vconc_out
private

Definition at line 266 of file transport.h.

VecScatter ConvectionTransport::vconc_out_scatter
private

Definition at line 247 of file transport.h.

Vec* ConvectionTransport::vcumulative_corr
private

Definition at line 263 of file transport.h.

Vec* ConvectionTransport::vpconc
private

Definition at line 261 of file transport.h.


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