26 #include <boost/exception/info.hpp> 57 template <
int spacedim,
class Value>
class FieldFE;
87 template<
unsigned int dim>
95 return fe_values_[dim-1];
164 void initialize()
override;
169 void zero_time_step()
override;
176 bool evaluate_time_constraint(
double &time_constraint)
override;
180 void update_solution()
override;
203 void set_target_time(
double target_time)
override;
208 void set_balance_object(std::shared_ptr<Balance> balance)
override;
211 {
return subst_idx; }
216 virtual void output_data()
override;
219 { velocity_field_ptr_ = flux_field; changed_ =
true; }
222 { output_stream_ = stream; }
229 {
return output_stream_; }
231 double **get_concentration_matrix()
override;
234 {
return vconc[sbi]; }
238 LongIdx *get_row_4_el()
override;
242 {
return substances_.size(); }
246 {
return substances_; }
262 void create_transport_matrix_mpi();
263 void create_mass_matrix();
265 void make_transport_partitioning();
266 void set_initial_condition();
267 void read_concentration_sources();
268 void set_boundary_conditions();
273 void compute_concentration_sources();
278 void transport_matrix_step_mpi(
double time_step);
280 void alloc_transport_vectors();
281 void alloc_transport_structs_mpi();
286 double side_flux(
const DHCellSide &cell_side);
291 template<
unsigned int dim>
292 double calculate_side_flux(
const DHCellSide &cell);
377 std::shared_ptr<DOFHandlerMultiDim>
dh_;
bool is_mass_diag_changed
Flag indicates that porosity or cross_section changed during last time.
const vector< unsigned int > & get_subst_idx() override
Return substance indices used in balance.
double transport_matrix_time
const Vec & get_solution(unsigned int sbi) override
Return PETSc vector with solution for sbi-th substance.
QGauss::array q_
Quadratures used in assembling methods.
unsigned int n_substances() override
Returns number of transported substances.
MultiField< 3, FieldValue< 3 >::Scalar > conc_mobile
Calculated concentrations in the mobile zone.
Class template representing a field with values dependent on: point, element, and region...
std::shared_ptr< OutputTime > output_stream_
TimeMark::Type target_mark_type
TimeMark type for time marks denoting end of every time interval where transport matrix remains const...
Field< 3, FieldValue< 3 >::Scalar > region_id
double transport_bc_time
Time of the last update of the boundary condition terms.
Coupling of a transport model with a reaction model by operator splitting.
EquationOutput output_fields
Fields indended for output, i.e. all input fields plus those representing solution.
BCMultiField< 3, FieldValue< 3 >::Scalar > bc_conc
std::vector< std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > > output_field_ptr
Fields correspond with out_conc.
double ** conc
Concentrations for phase, substance, element.
MultiField< 3, FieldValue< 3 >::Scalar > init_conc
Initial concentrations.
const Input::Record input_rec
Record with input specification.
Base class for quadrature rules on simplices in arbitrary dimensions.
SubstanceList & substances() override
Returns reference to the vector of substance names.
Field< 3, FieldValue< 3 >::Scalar > subdomain
std::shared_ptr< OutputTime > output_stream() override
void calculate_concentration_matrix() override
Calculate the array of concentrations per element (for reactions).
static const int registrar
Registrar of class to factory.
std::vector< VectorMPI > out_conc
SubstanceList substances_
Transported substances.
FEValues< 3 > & fe_values(unsigned int dim)
std::shared_ptr< DOFHandlerMultiDim > dh_
The class for outputting data during time.
vector< unsigned int > subst_idx
List of indices used to call balance methods for a set of quantities.
Vec * vconc
Concentration vectors for mobile phase.
void update_after_reactions(bool) override
Not used in this class.
std::array< QGauss, 4 > array
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
void set_output_stream(std::shared_ptr< OutputTime > stream) override
Setter for output stream.
bool changed_
Indicator of change in velocity field.
VecScatter vconc_out_scatter
FiniteElement< 1 > * fe1_
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed > > velocity_field_ptr_
Pointer to velocity field given from Flow equation.
ConcentrationTransportBase FactoryBaseType
Classes for storing substance data.
Vec vcfl_source_
Parallel vector for source term contribution to CFL condition.
Definitions of particular quadrature rules on simplices.
double ** cumulative_corr
FETransportObjects feo_
Finite element objects.
Class for representation of a vector of fields of the same physical quantity.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
void set_velocity_field(std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed >> flux_field) override
Pass velocity from flow to transport.
FiniteElement< 3 > * fe3_
FiniteElement< 0 > * fe0_
Finite elements for the solution of the advection-diffusion equation.
Side accessor allows to iterate over sides of DOF handler cell.
double cfl_max_step
Time step constraint coming from CFL condition.
FiniteElement< 2 > * fe2_