Flow123d
jenkins-Flow123d-linux-release-multijob-282
|
#include <transport.h>
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... | |
EqData * | get_data () |
OutputTime * | output_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... | |
SubstanceList & | substances () 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 () |
Mesh & | mesh () |
TimeMark::Type | mark_type () |
FieldSet & | data () |
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< VectorSeqDouble > | out_conc |
Input::Record | output_rec |
Record with output specification. More... | |
OutputTime * | output_stream_ |
int * | row_4_el |
int * | el_4_loc |
Distribution * | el_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 RegionDB * | region_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_DofHandler * | mh_dh |
boost::shared_ptr< Balance > | balance_ |
(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... | |
Mesh * | mesh_ |
TimeGovernor * | time_ |
Input::Record | input_record_ |
FieldSet * | eq_data_ |
TODO:
Definition at line 78 of file transport.h.
ConvectionTransport::ConvectionTransport | ( | Mesh & | init_mesh, |
const Input::Record & | in_rec | ||
) |
Constructor.
Definition at line 97 of file transport.cc.
|
virtual |
TODO: destructor
Definition at line 185 of file transport.cc.
|
private |
|
private |
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.
void ConvectionTransport::calculate_instant_balance | ( | ) |
Calculate instant quantities at output times.
Definition at line 792 of file transport.cc.
|
private |
|
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.
double ** ConvectionTransport::get_concentration_matrix | ( | ) |
|
inline |
|
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 | ||
) |
int * ConvectionTransport::get_row_4_el | ( | ) |
|
inline |
|
private |
|
overridevirtual |
Write computed fields.
Reimplemented from EquationBase.
Definition at line 822 of file transport.cc.
|
inline |
void ConvectionTransport::output_vector_gather | ( | void | ) |
Communicate parallel concentration vectors into sequential output vector.
Definition at line 728 of file transport.cc.
|
private |
|
inline |
Use Balance object from upstream equation (e.g. in various couplings) instead of own instance.
Definition at line 149 of file transport.h.
|
private |
|
private |
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.
|
private |
Finish explicit transport matrix (time step scaling)
|
overridevirtual |
Calculates one time step of explicit transport.
Reimplemented from EquationBase.
Definition at line 495 of file transport.cc.
|
overridevirtual |
Initialize solution at zero time.
Reimplemented from EquationBase.
Definition at line 464 of file transport.cc.
|
friend |
Definition at line 286 of file transport.h.
|
private |
Definition at line 267 of file transport.h.
|
private |
Definition at line 247 of file transport.h.
|
private |
Concentrations for phase, substance, element.
Definition at line 263 of file transport.h.
|
private |
Definition at line 269 of file transport.h.
|
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.
|
private |
Definition at line 280 of file transport.h.
|
private |
Definition at line 281 of file transport.h.
|
private |
Indicates if we finished the matrix and add vector by scaling with timestep factor.
Definition at line 235 of file transport.h.
|
private |
Definition at line 235 of file transport.h.
|
private |
Definition at line 271 of file transport.h.
|
private |
Record with output specification.
Definition at line 274 of file transport.h.
|
private |
Definition at line 276 of file transport.h.
|
private |
Definition at line 279 of file transport.h.
|
private |
Definition at line 242 of file transport.h.
|
private |
Definition at line 237 of file transport.h.
|
private |
temporary arrays to store constant values of fields over time interval
Definition at line 242 of file transport.h.
|
private |
Definition at line 242 of file transport.h.
|
private |
List of indices used to call balance methods for a set of quantities.
Definition at line 284 of file transport.h.
|
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.
|
private |
Definition at line 253 of file transport.h.
|
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.
|
private |
Definition at line 238 of file transport.h.
|
private |
Concentration vectors for mobile phase.
Definition at line 261 of file transport.h.
|
private |
Definition at line 252 of file transport.h.
|
private |
Definition at line 268 of file transport.h.
|
private |
Definition at line 266 of file transport.h.