Flow123d  jenkins-Flow123d-linux-release-multijob-282
advection_diffusion_model.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2007 Technical University of Liberec. All rights reserved.
4  *
5  * Please make a following refer to Flow123d on your project site if you use the program for any purpose,
6  * especially for academic research:
7  * Flow123d, Research Centre: Advanced Remedial Technologies, Technical University of Liberec, Czech Republic
8  *
9  * This program is free software; you can redistribute it and/or modify it under the terms
10  * of the GNU General Public License version 3 as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along with this program; if not,
17  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021110-1307, USA.
18  *
19  *
20  * $Id$
21  * $Revision$
22  * $LastChangedBy$
23  * $LastChangedDate$
24  *
25  * @file
26  * @brief Discontinuous Galerkin method for equation of transport with dispersion.
27  * @author Jan Stebel
28  */
29 
30 #ifndef AD_MODEL_HH_
31 #define AD_MODEL_HH_
32 
33 #include <armadillo>
34 #include <vector>
35 
36 class SubstanceList;
37 
38 namespace IT = Input::Type;
39 
40 /**
41  * AdvectionDiffusionModel is a base class for description of a physical process described
42  * by the advection-diffusion partial differential equation (PDE). The derived classes define input parameters
43  * and implement methods that calculate coefficients of the PDE. These methods are then used by a template
44  * class for numerical solution, whose specialization derives from the model class.
45  */
47 public:
48 
49  /// Read necessary data from input record.
50  virtual void init_from_input(const Input::Record &in_rec, SubstanceList &substances) = 0;
51 
52  /**
53  * Compute coefficients of mass matrix.
54  * @param point_list Points at which to evaluate.
55  * @param ele_acc Element accessor.
56  * @param mm_coef Coefficient vector (output).
57  */
58  virtual void compute_mass_matrix_coefficient(const std::vector<arma::vec3 > &point_list,
59  const ElementAccessor<3> &ele_acc,
60  std::vector<double> &mm_coef) = 0;
61 
62 
63  /**
64  * Compute retardation coefficients due to sorption.
65  * @param point_list Points at which to evaluate.
66  * @param ele_acc Element accessor.
67  * @param ret_coef Coefficient vector (output).
68  */
69  virtual void compute_retardation_coefficient(const std::vector<arma::vec3 > &point_list,
70  const ElementAccessor<3> &ele_acc,
71  std::vector<std::vector<double> > &ret_coef) = 0;
72 
73  /**
74  * Compute coefficients of stiffness matrix.
75  * @param point_list Points at which to evaluate.
76  * @param velocity Velocity field (input). Temporary solution before we can pass data from other
77  * equations.
78  * @param ele_acc Element accessor.
79  * @param ad_coef Coefficients of advection (output).
80  * @param dif_coef Coefficients of diffusion (output).
81  */
83  const std::vector<arma::vec3> &velocity,
84  const ElementAccessor<3> &ele_acc,
86  std::vector<std::vector<arma::mat33> > &dif_coef) = 0;
87 
88  /**
89  * Compute initial conditions.
90  * @param point_list Points at which to evaluate.
91  * @param ele_acc Element accessor.
92  * @param init_values Vector of intial values (output).
93  */
94  virtual void compute_init_cond(const std::vector<arma::vec3> &point_list,
95  const ElementAccessor<3> &ele_acc,
96  std::vector< arma::vec > &init_values) = 0;
97 
98  /**
99  * Computes the Dirichlet boundary condition values.
100  * @param point_list Points at which to evaluate.
101  * @param ele_acc Element accessor.
102  * @param bc_values Vector of b.c. values (output).
103  */
104  virtual void compute_dirichlet_bc(const std::vector<arma::vec3> &point_list,
105  const ElementAccessor<3> &ele_acc,
106  std::vector< arma::vec > &bc_values) = 0;
107 
108  /**
109  * Compute coefficients of volume sources.
110  * @param point_list Points at which to evaluate.
111  * @param ele_acc Element accessor.
112  * @param sources_conc Source concentrations (output).
113  * @param sources_density Source densities (output).
114  * @param sources_sigma Source sigmas (output).
115  */
116  virtual void compute_source_coefficients(const std::vector<arma::vec3> &point_list,
117  const ElementAccessor<3> &ele_acc,
118  std::vector<arma::vec> &sources_conc,
119  std::vector<arma::vec> &sources_density,
120  std::vector<arma::vec> &sources_sigma) = 0;
121 
122  /**
123  * Compute coefficients of volume sources.
124  * @param point_list Points at which to evaluate.
125  * @param ele_acc Element accessor.
126  * @param sources_sigma Source sigmas (output).
127  */
128  virtual void compute_sources_sigma(const std::vector<arma::vec3> &point_list,
129  const ElementAccessor<3> &ele_acc,
130  std::vector<arma::vec> &sources_sigma) = 0;
131 
132  /// Destructor.
134 
135 
136 
137 };
138 
139 
140 
141 
142 
143 
144 #endif /* AD_MODEL_HH_ */
virtual void init_from_input(const Input::Record &in_rec, SubstanceList &substances)=0
Read necessary data from input record.
virtual ~AdvectionDiffusionModel()
Destructor.
virtual void compute_sources_sigma(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_sigma)=0
virtual void compute_mass_matrix_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< double > &mm_coef)=0
Accessor to the data with type Type::Record.
Definition: accessors.hh:327
virtual void compute_init_cond(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &init_values)=0
virtual void compute_advection_diffusion_coefficients(const std::vector< arma::vec3 > &point_list, const std::vector< arma::vec3 > &velocity, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< arma::vec3 > > &ad_coef, std::vector< std::vector< arma::mat33 > > &dif_coef)=0
virtual void compute_source_coefficients(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &sources_conc, std::vector< arma::vec > &sources_density, std::vector< arma::vec > &sources_sigma)=0
virtual void compute_retardation_coefficient(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< std::vector< double > > &ret_coef)=0
virtual void compute_dirichlet_bc(const std::vector< arma::vec3 > &point_list, const ElementAccessor< 3 > &ele_acc, std::vector< arma::vec > &bc_values)=0