Flow123d  JS_before_hm-2196-g9bdbf60c0
assembly_richards_old.hh
Go to the documentation of this file.
1 /*!
2  *
3  * Copyright (C) 2015 Technical University of Liberec. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License version 3 as published by the
7  * Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  *
14  * @file assembly_richards.hh
15  * @brief
16  */
17 
18 #ifndef ASSEMBLY_RICHARDS_HH_
19 #define ASSEMBLY_RICHARDS_HH_
20 
23 #include "flow/assembly_lmh_old.hh"
24 #include "flow/soil_models.hh"
26 
27 
28 template <unsigned int dim>
30 {
31 public:
32  typedef typename RichardsLMH::EqFields EqFields;
33  typedef typename RichardsLMH::EqData EqData;
34 
35  static constexpr const char * name() { return "InitCondPostprocessAssembly"; }
36 
37  /// Constructor.
39  : AssemblyBase<dim>(0), eq_fields_(eq_fields), eq_data_(eq_data) {
41  this->used_fields_ += this->eq_fields_->storativity;
47  this->used_fields_ += this->eq_fields_->conductivity;
48  }
49 
50  /// Destructor.
52 
53  /// Initialize auxiliary vectors and other data members
54  void initialize(ElementCacheMap *element_cache_map) {
55  //this->balance_ = eq_data_->balance_;
56  this->element_cache_map_ = element_cache_map;
57  genuchten_on = false;
58  }
59 
60  inline void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx) {
61  if (cell.dim() != dim) return;
62 
65 
66  auto p = *( this->bulk_points(element_patch_idx).begin() );
67  reset_soil_model(cell, p);
69  + this->eq_fields_->extra_storativity(p);
70  VectorMPI water_content_vec = this->eq_fields_->water_content_ptr->vec();
71 
72  for (unsigned int i=0; i<cell.elm()->n_sides(); i++) {
73  capacity = 0;
74  water_content = 0;
76 
77  if (genuchten_on) {
78  fadbad::B<double> x_phead(phead);
79  fadbad::B<double> evaluated( this->eq_data_->soil_model_->water_content_diff(x_phead) );
80  evaluated.diff(0,1);
81  water_content = evaluated.val();
82  capacity = x_phead.d(0);
83  }
85  water_content_vec.set( cr_disc_dofs_[i], water_content + storativity_ * phead);
86  }
87  }
88 
89 
90 private:
91  void reset_soil_model(const DHCellAccessor& cell, BulkPoint &p) {
93  if (genuchten_on) {
94  SoilData soil_data;
95  soil_data.n = this->eq_fields_->genuchten_n_exponent(p);
96  soil_data.alpha = this->eq_fields_->genuchten_p_head_scale(p);
97  soil_data.Qr = this->eq_fields_->water_content_residual(p);
98  soil_data.Qs = this->eq_fields_->water_content_saturated(p);
99  soil_data.Ks = this->eq_fields_->conductivity(p);
100  //soil_data.cut_fraction = 0.99; // set by model
101 
102  this->eq_data_->soil_model_->reset(soil_data);
103  }
104  }
105 
106 
107  /// Sub field set contains fields used in calculation.
109 
110  /// Data objects shared with ConvectionTransport
113 
114  LocDofVec cr_disc_dofs_; ///< Vector of local DOF indices pre-computed on different DOF handlers
115  LocDofVec edge_indices_; ///< Dofs of discontinuous fields on element edges.
117  double storativity_;
119 
120  template < template<IntDim...> class DimAssembly>
121  friend class GenericAssembly;
122 };
123 
124 
125 template <unsigned int dim>
127 {
128 public:
129  typedef typename RichardsLMH::EqFields EqFields;
130  typedef typename RichardsLMH::EqData EqData;
131 
132  static constexpr const char * name() { return "MHMatrixAssemblyRichards"; }
133 
135  : MHMatrixAssemblyLMH<dim>(eq_fields, eq_data), eq_fields_(eq_fields), eq_data_(eq_data) {
140  this->used_fields_ += eq_fields_->sigma;
149  this->used_fields_ += eq_fields_->bc_type;
151  this->used_fields_ += eq_fields_->bc_flux;
155  }
156 
157  /// Destructor.
159 
160  /// Initialize auxiliary vectors and other data members
161  void initialize(ElementCacheMap *element_cache_map) {
162  //this->balance_ = eq_data_->balance_;
163  MHMatrixAssemblyLMH<dim>::initialize(element_cache_map);
164  genuchten_on = false;
165  }
166 
167 
168 protected:
169  void assemble_source_term(const DHCellAccessor& cell, BulkPoint &p) override
170  {
171  update_water_content(cell, p);
172  const ElementAccessor<3> ele = cell.elm();
173 
174  // set lumped source
175  diagonal_coef_ = ele.measure() * eq_fields_->cross_section(p) / ele->n_sides();
177 
178  VectorMPI water_content_vec = eq_fields_->water_content_ptr->vec();
179 
180  for (unsigned int i=0; i<ele->n_sides(); i++)
181  {
182 
183  const int local_side = cr_disc_dofs_[i];
184  /*if (this->dirichlet_edge[i] == 0)*/ { //TODO Fix condition evaluating dirichlet_edge
185 
186  water_content_diff_ = -water_content_vec.get(local_side) + eq_data_->water_content_previous_time.get(local_side);
188 
189  /*
190  DebugOut().fmt("w diff: {:g} mass: {:g} w prev: {:g} w time: {:g} c: {:g} p: {:g} z: {:g}",
191  water_content_diff,
192  mass_diagonal * eq_data_->p_edge_solution[local_edge],
193  -eq_data_->water_content_previous_it[local_side],
194  eq_data_->water_content_previous_time[local_side],
195  capacity,
196  eq_data_->p_edge_solution[local_edge],
197  ele.centre()[0] );
198  */
199 
200 
203 
204  /*
205  DBGCOUT(<< "source [" << loc_system_.row_dofs[this->loc_edge_dofs[i]] << ", " << loc_system_.row_dofs[this->loc_edge_dofs[i]]
206  << "] mat: " << -mass_diagonal/this->eq_data_->time_step_
207  << " rhs: " << -source_diagonal_ - mass_rhs
208  << "\n");
209  */
210  eq_data_->loc_system_[cell.local_idx()].add_value(eq_data_->loc_edge_dofs[dim-1][i], eq_data_->loc_edge_dofs[dim-1][i],
213  }
214 
215  eq_data_->balance->add_mass_values(eq_data_->water_balance_idx, cell, {local_side},
216  {0.0}, diagonal_coef_*water_content_vec.get(local_side));
217  eq_data_->balance->add_source_values(eq_data_->water_balance_idx, ele.region().bulk_idx(),
218  {this->eq_data_->loc_system_[cell.local_idx()].row_dofs[eq_data_->loc_edge_dofs[dim-1][i]]},
219  {0},{source_diagonal_});
220  }
221  }
222 
223  void reset_soil_model(const DHCellAccessor& cell, BulkPoint &p) {
224  genuchten_on = (this->eq_fields_->genuchten_p_head_scale.field_result({cell.elm().region()}) != result_zeros);
225  if (genuchten_on) {
226  SoilData soil_data;
227  soil_data.n = this->eq_fields_->genuchten_n_exponent(p);
228  soil_data.alpha = this->eq_fields_->genuchten_p_head_scale(p);
229  soil_data.Qr = this->eq_fields_->water_content_residual(p);
230  soil_data.Qs = this->eq_fields_->water_content_saturated(p);
231  soil_data.Ks = this->eq_fields_->conductivity(p);
232  //soil_data.cut_fraction = 0.99; // set by model
233 
234  this->eq_data_->soil_model_->reset(soil_data);
235  }
236  }
237 
238 
240  edge_indices_ = cell.cell_with_other_dh(this->eq_data_->dh_cr_.get()).get_loc_dof_indices();
241  cr_disc_dofs_ = cell.cell_with_other_dh(this->eq_data_->dh_cr_disc_.get()).get_loc_dof_indices();
242 
243  reset_soil_model(cell, p);
244  storativity_ = this->eq_fields_->storativity(p)
245  + this->eq_fields_->extra_storativity(p);
246  VectorMPI water_content_vec = this->eq_fields_->water_content_ptr->vec();
247 
248  for (unsigned int i=0; i<cell.elm()->n_sides(); i++) {
249  capacity = 0;
250  water_content = 0;
251  phead = this->eq_data_->p_edge_solution.get( edge_indices_[i] );
252 
253  if (genuchten_on) {
254  fadbad::B<double> x_phead(phead);
255  fadbad::B<double> evaluated( this->eq_data_->soil_model_->water_content_diff(x_phead) );
256  evaluated.diff(0,1);
257  water_content = evaluated.val();
258  capacity = x_phead.d(0);
259  }
260  this->eq_data_->capacity.set( cr_disc_dofs_[i], capacity + storativity_ );
261  water_content_vec.set( cr_disc_dofs_[i], water_content + storativity_ * phead);
262  }
263  }
264 
266  double edge_scale, double edge_source_term) override
267  {
268  update_water_content(dh_cell, p);
269 
270  VectorMPI water_content_vec = eq_fields_->water_content_ptr->vec();
271 
272  for (unsigned int i=0; i<dh_cell.elm()->n_sides(); i++) {
273  water_content = water_content_vec.get( cr_disc_dofs_[i] );
274  water_content_previous_time = eq_data_->water_content_previous_time.get( cr_disc_dofs_[i] );
275 
276  solution[eq_data_->loc_side_dofs[dim-1][i]]
277  += edge_source_term - edge_scale * (water_content - water_content_previous_time) / eq_data_->time_step_;
278  }
279 
280  IntIdx p_dof = dh_cell.cell_with_other_dh(eq_data_->dh_p_.get()).get_loc_dof_indices()(0);
281  eq_fields_->conductivity_ptr->vec().set( p_dof, compute_conductivity(dh_cell, p) );
282  }
283 
284 
285  double compute_conductivity(const DHCellAccessor& cell, BulkPoint &p) override
286  {
287  reset_soil_model(cell, p);
288 
289  double conductivity = 0;
290  if (genuchten_on) {
291  for (unsigned int i=0; i<cell.elm()->n_sides(); i++)
292  {
293  double phead = eq_data_->p_edge_solution.get( eq_data_->loc_schur_[cell.local_idx()].row_dofs[i] );
294  conductivity += eq_data_->soil_model_->conductivity(phead);
295  }
296  conductivity /= cell.elm()->n_sides();
297  }
298  else {
299  conductivity = eq_fields_->conductivity(p);
300  }
301  return conductivity;
302  }
303 
304  /// Data objects shared with ConvectionTransport
307 
308  LocDofVec cr_disc_dofs_; ///< Vector of local DOF indices pre-computed on different DOF handlers
309  LocDofVec edge_indices_; ///< Dofs of discontinuous fields on element edges.
311  double storativity_;
312  double capacity, phead;
313  double water_content, water_content_previous_time;
314  double diagonal_coef_, source_diagonal_;
315  double water_content_diff_, mass_diagonal_, mass_rhs_;
316 
317  template < template<IntDim...> class DimAssembly>
318  friend class GenericAssembly;
319 };
320 
321 
322 template <unsigned int dim>
324 {
325 public:
326  typedef typename RichardsLMH::EqFields EqFields;
327  typedef typename RichardsLMH::EqData EqData;
328 
329  static constexpr const char * name() { return "ReconstructSchurAssemblyRichards"; }
330 
332  : MHMatrixAssemblyLMH<dim>(eq_fields, eq_data), ReconstructSchurAssemblyLMH<dim>(eq_fields, eq_data), MHMatrixAssemblyRichards<dim>(eq_fields, eq_data) {
333  }
334 
335  /// Implements @p AssemblyBase::begin.
336  void begin() override
337  {
339  }
340 
341 
342  /// Implements @p AssemblyBase::end.
343  void end() override
344  {
346  }
347 protected:
348 
349  void assemble_source_term(const DHCellAccessor& cell, BulkPoint &p) override
350  {
352  }
353 
355  double edge_scale, double edge_source_term) override
356  {
357  MHMatrixAssemblyRichards<dim>::postprocess_velocity_specific(dh_cell, p, solution, edge_scale, edge_source_term);
358  }
359 
360  double compute_conductivity(const DHCellAccessor& cell, BulkPoint &p) override
361  {
363  }
364 
365  void postprocess_bulk_integral(const DHCellAccessor& cell, unsigned int element_patch_idx) override {
367  }
368 
369  void dirichlet_switch(FMT_UNUSED char & switch_dirichlet, FMT_UNUSED DHCellSide cell_side) override
370  {}
371 
372  template < template<IntDim...> class DimAssembly>
373  friend class GenericAssembly;
374 };
375 
376 
377 
378 #endif /* ASSEMBLY_RICHARDS_HH_ */
379 
DarcyMH::EqFields::bc_pressure
BCField< 3, FieldValue< 3 >::Scalar > bc_pressure
Definition: darcy_flow_mh.hh:176
LocDofVec
arma::Col< IntIdx > LocDofVec
Definition: index_types.hh:28
MHMatrixAssemblyRichards::eq_fields_
EqFields * eq_fields_
Data objects shared with ConvectionTransport.
Definition: assembly_richards_old.hh:305
InitCondPostprocessAssembly::water_content
double water_content
Definition: assembly_richards_old.hh:118
result_zeros
@ result_zeros
Definition: field_algo_base.hh:74
ReconstructSchurAssemblyLMH::begin
void begin() override
Implements AssemblyBase::begin.
Definition: assembly_lmh_old.hh:699
InitCondPostprocessAssembly::used_fields_
FieldSet used_fields_
Sub field set contains fields used in calculation.
Definition: assembly_richards_old.hh:108
RichardsLMH::EqFields::genuchten_p_head_scale
Field< 3, FieldValue< 3 >::Scalar > genuchten_p_head_scale
Definition: richards_lmh.hh:77
DarcyMH::EqFields::sigma
Field< 3, FieldValue< 3 >::Scalar > sigma
Definition: darcy_flow_mh.hh:173
Armor::vec
ArmaVec< double, N > vec
Definition: armor.hh:885
MHMatrixAssemblyRichards::water_content_diff_
double water_content_diff_
Definition: assembly_richards_old.hh:315
MHMatrixAssemblyRichards::storativity_
double storativity_
Definition: assembly_richards_old.hh:311
DarcyLMH::EqData
Definition: darcy_flow_lmh.hh:157
InitCondPostprocessAssembly::EqData
RichardsLMH::EqData EqData
Definition: assembly_richards_old.hh:33
ReconstructSchurAssemblyLMH::end
void end() override
Implements AssemblyBase::end.
Definition: assembly_lmh_old.hh:714
DarcyLMH::EqData::p_edge_solution
VectorMPI p_edge_solution
Definition: darcy_flow_lmh.hh:175
MHMatrixAssemblyRichards::cr_disc_dofs_
LocDofVec cr_disc_dofs_
Vector of local DOF indices pre-computed on different DOF handlers.
Definition: assembly_richards_old.hh:308
DarcyMH::EqFields::bc_robin_sigma
BCField< 3, FieldValue< 3 >::Scalar > bc_robin_sigma
Definition: darcy_flow_mh.hh:178
MHMatrixAssemblyRichards::edge_indices_
LocDofVec edge_indices_
Dofs of discontinuous fields on element edges.
Definition: assembly_richards_old.hh:309
ReconstructSchurAssemblyRichards
Definition: assembly_richards_old.hh:323
ReconstructSchurAssemblyRichards::dirichlet_switch
void dirichlet_switch(FMT_UNUSED char &switch_dirichlet, FMT_UNUSED DHCellSide cell_side) override
Definition: assembly_richards_old.hh:369
InitCondPostprocessAssembly
Definition: assembly_richards_old.hh:29
DarcyMH::EqFields::bc_flux
BCField< 3, FieldValue< 3 >::Scalar > bc_flux
Definition: darcy_flow_mh.hh:177
ElementCacheMap
Directing class of FieldValueCache.
Definition: field_value_cache.hh:151
SoilData::n
double n
Definition: soil_models.hh:40
IntIdx
int IntIdx
Definition: index_types.hh:25
MHMatrixAssemblyRichards::diagonal_coef_
double diagonal_coef_
Definition: assembly_richards_old.hh:314
DarcyMH::EqFields::extra_source
Field< 3, FieldValue< 3 >::Scalar > extra_source
Externally added storativity.
Definition: darcy_flow_mh.hh:184
MHMatrixAssemblyRichards::reset_soil_model
void reset_soil_model(const DHCellAccessor &cell, BulkPoint &p)
Definition: assembly_richards_old.hh:223
BulkPoint
Base point accessor class.
Definition: eval_subset.hh:55
SoilData::Qr
double Qr
Definition: soil_models.hh:42
RichardsLMH::EqData::soil_model_
std::shared_ptr< SoilModelBase > soil_model_
Definition: richards_lmh.hh:98
ReconstructSchurAssemblyRichards::compute_conductivity
double compute_conductivity(const DHCellAccessor &cell, BulkPoint &p) override
Definition: assembly_richards_old.hh:360
ElementAccessor< 3 >
RichardsLMH::EqFields::water_content_residual
Field< 3, FieldValue< 3 >::Scalar > water_content_residual
Definition: richards_lmh.hh:76
RichardsLMH::EqFields::genuchten_n_exponent
Field< 3, FieldValue< 3 >::Scalar > genuchten_n_exponent
Definition: richards_lmh.hh:78
DHCellAccessor::dim
unsigned int dim() const
Return dimension of element appropriate to cell.
Definition: dh_cell_accessor.hh:101
DarcyLMH::EqFields
Definition: darcy_flow_lmh.hh:150
MHMatrixAssemblyLMH::used_fields_
FieldSet used_fields_
Sub field set contains fields used in calculation.
Definition: assembly_lmh_old.hh:646
assembly_base.hh
InitCondPostprocessAssembly::eq_fields_
EqFields * eq_fields_
Data objects shared with ConvectionTransport.
Definition: assembly_richards_old.hh:111
MHMatrixAssemblyRichards::postprocess_velocity_specific
void postprocess_velocity_specific(const DHCellAccessor &dh_cell, BulkPoint &p, arma::vec &solution, double edge_scale, double edge_source_term) override
Definition: assembly_richards_old.hh:265
RichardsLMH::EqData::water_content_previous_time
VectorMPI water_content_previous_time
Definition: richards_lmh.hh:95
InitCondPostprocessAssembly::phead
double phead
Definition: assembly_richards_old.hh:118
InitCondPostprocessAssembly::cr_disc_dofs_
LocDofVec cr_disc_dofs_
Vector of local DOF indices pre-computed on different DOF handlers.
Definition: assembly_richards_old.hh:114
RichardsLMH::EqData
Definition: richards_lmh.hh:89
VectorMPI::set
void set(unsigned int pos, double val)
Set value on given position.
Definition: vector_mpi.hh:111
ReconstructSchurAssemblyLMH::postprocess_bulk_integral
void postprocess_bulk_integral(const DHCellAccessor &cell, unsigned int element_patch_idx) override
Definition: assembly_lmh_old.hh:744
DHCellSide
Side accessor allows to iterate over sides of DOF handler cell.
Definition: dh_cell_accessor.hh:176
InitCondPostprocessAssembly::InitCondPostprocessAssembly
InitCondPostprocessAssembly(EqFields *eq_fields, EqData *eq_data)
Constructor.
Definition: assembly_richards_old.hh:38
ReconstructSchurAssemblyRichards::ReconstructSchurAssemblyRichards
ReconstructSchurAssemblyRichards(EqFields *eq_fields, EqData *eq_data)
Definition: assembly_richards_old.hh:331
DarcyMH::EqFields::cross_section
Field< 3, FieldValue< 3 >::Scalar > cross_section
Definition: darcy_flow_mh.hh:171
ReconstructSchurAssemblyRichards::name
static constexpr const char * name()
Definition: assembly_richards_old.hh:329
MHMatrixAssemblyRichards::assemble_source_term
void assemble_source_term(const DHCellAccessor &cell, BulkPoint &p) override
Definition: assembly_richards_old.hh:169
MHMatrixAssemblyRichards::update_water_content
void update_water_content(const DHCellAccessor &cell, BulkPoint &p)
Definition: assembly_richards_old.hh:239
DarcyLMH::EqData::loc_edge_dofs
std::array< std::vector< unsigned int >, 3 > loc_edge_dofs
Definition: darcy_flow_lmh.hh:197
DHCellAccessor::cell_with_other_dh
DHCellAccessor cell_with_other_dh(const DOFHandlerMultiDim *dh) const
Create new accessor with same local idx and given DOF handler. Actual and given DOF handler must be c...
Definition: dh_cell_accessor.hh:135
DarcyMH::EqFields::water_source_density
Field< 3, FieldValue< 3 >::Scalar > water_source_density
Definition: darcy_flow_mh.hh:172
InitCondPostprocessAssembly::storativity_
double storativity_
Definition: assembly_richards_old.hh:117
DarcyMH::EqFields::conductivity
Field< 3, FieldValue< 3 >::Scalar > conductivity
Definition: darcy_flow_mh.hh:170
DarcyLMH::EqData::loc_schur_
std::vector< LocalSystem > loc_schur_
Definition: darcy_flow_lmh.hh:194
generic_assembly.hh
DHCellAccessor::local_idx
unsigned int local_idx() const
Return local index to element (index of DOF handler).
Definition: dh_cell_accessor.hh:58
DarcyLMH::EqData::loc_system_
std::vector< LocalSystem > loc_system_
Following data members are stored in vectors, one item for every cell.
Definition: darcy_flow_lmh.hh:193
MHMatrixAssemblyRichards::compute_conductivity
double compute_conductivity(const DHCellAccessor &cell, BulkPoint &p) override
Definition: assembly_richards_old.hh:285
DarcyMH::EqFields::bc_switch_pressure
BCField< 3, FieldValue< 3 >::Scalar > bc_switch_pressure
Definition: darcy_flow_mh.hh:179
InitCondPostprocessAssembly::initialize
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
Definition: assembly_richards_old.hh:54
Field::field_result
FieldResult field_result(RegionSet region_set) const override
Indicates special field states.
Definition: field.impl.hh:420
DHCellAccessor::elm
const ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
Definition: dh_cell_accessor.hh:71
ReconstructSchurAssemblyRichards::begin
void begin() override
Implements AssemblyBase::begin.
Definition: assembly_richards_old.hh:336
soil_models.hh
FieldSet
Container for various descendants of FieldCommonBase.
Definition: field_set.hh:159
DarcyMH::EqFields::bc_type
BCField< 3, FieldValue< 3 >::Enum > bc_type
Definition: darcy_flow_mh.hh:175
coupling
@ coupling
Definition: generic_assembly.hh:35
ReconstructSchurAssemblyRichards::EqFields
RichardsLMH::EqFields EqFields
Definition: assembly_richards_old.hh:326
MHMatrixAssemblyRichards::genuchten_on
bool genuchten_on
Definition: assembly_richards_old.hh:310
RichardsLMH::EqFields
Definition: richards_lmh.hh:71
DarcyLMH::EqData::time_step_
double time_step_
Definition: darcy_flow_lmh.hh:172
InitCondPostprocessAssembly::genuchten_on
bool genuchten_on
Definition: assembly_richards_old.hh:116
MHMatrixAssemblyRichards::initialize
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
Definition: assembly_richards_old.hh:161
MHMatrixAssemblyRichards::mass_diagonal_
double mass_diagonal_
Definition: assembly_richards_old.hh:315
InitCondPostprocessAssembly::cell_integral
void cell_integral(DHCellAccessor cell, unsigned int element_patch_idx)
Definition: assembly_richards_old.hh:60
AssemblyBase::bulk_points
Range< BulkPoint > bulk_points(unsigned int element_patch_idx) const
Return BulkPoint range of appropriate dimension.
Definition: assembly_base.hh:104
ReconstructSchurAssemblyRichards::end
void end() override
Implements AssemblyBase::end.
Definition: assembly_richards_old.hh:343
InitCondPostprocessAssembly::EqFields
RichardsLMH::EqFields EqFields
Definition: assembly_richards_old.hh:32
MHMatrixAssemblyRichards::MHMatrixAssemblyRichards
MHMatrixAssemblyRichards(EqFields *eq_fields, EqData *eq_data)
Definition: assembly_richards_old.hh:134
Element::n_sides
unsigned int n_sides() const
Definition: elements.h:131
bulk
@ bulk
Definition: generic_assembly.hh:33
DHCellAccessor
Cell accessor allow iterate over DOF handler cells.
Definition: dh_cell_accessor.hh:43
ReconstructSchurAssemblyRichards::EqData
RichardsLMH::EqData EqData
Definition: assembly_richards_old.hh:327
DarcyMH::EqData::dh_cr_disc_
std::shared_ptr< DOFHandlerMultiDim > dh_cr_disc_
DOF handler represents DOFs of sides.
Definition: darcy_flow_mh.hh:220
DarcyMH::EqData::water_balance_idx
uint water_balance_idx
Definition: darcy_flow_mh.hh:223
MHMatrixAssemblyLMH
Definition: assembly_lmh_old.hh:116
ElementAccessor::region
Region region() const
Definition: accessors.hh:201
field_value_cache.hh
MHMatrixAssemblyRichards
Definition: assembly_richards_old.hh:126
InitCondPostprocessAssembly::reset_soil_model
void reset_soil_model(const DHCellAccessor &cell, BulkPoint &p)
Definition: assembly_richards_old.hh:91
AssemblyBase::active_integrals_
int active_integrals_
Holds mask of active integrals.
Definition: assembly_base.hh:191
MHMatrixAssemblyRichards::name
static constexpr const char * name()
Definition: assembly_richards_old.hh:132
SoilData::alpha
double alpha
Definition: soil_models.hh:41
DarcyMH::EqData::balance
std::shared_ptr< Balance > balance
Definition: darcy_flow_mh.hh:227
SoilData::Ks
double Ks
Definition: soil_models.hh:45
RichardsLMH::EqFields::water_content_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > water_content_ptr
Definition: richards_lmh.hh:82
DHCellAccessor::get_loc_dof_indices
LocDofVec get_loc_dof_indices() const
Returns the local indices of dofs associated to the cell on the local process.
Definition: dh_cell_accessor.hh:88
assembly_lmh_old.hh
InitCondPostprocessAssembly::name
static constexpr const char * name()
Definition: assembly_richards_old.hh:35
InitCondPostprocessAssembly::eq_data_
EqData * eq_data_
Definition: assembly_richards_old.hh:112
ReconstructSchurAssemblyRichards::postprocess_bulk_integral
void postprocess_bulk_integral(const DHCellAccessor &cell, unsigned int element_patch_idx) override
Definition: assembly_richards_old.hh:365
InitCondPostprocessAssembly::capacity
double capacity
Definition: assembly_richards_old.hh:118
SoilData
Definition: soil_models.hh:39
DarcyMH::EqFields::extra_storativity
Field< 3, FieldValue< 3 >::Scalar > extra_storativity
Definition: darcy_flow_mh.hh:183
AssemblyBase
Definition: assembly_base.hh:34
MHMatrixAssemblyRichards::phead
double phead
Definition: assembly_richards_old.hh:312
MHMatrixAssemblyRichards::source_diagonal_
double source_diagonal_
Definition: assembly_richards_old.hh:314
VectorMPI::get
double get(unsigned int pos) const
Return value on given position.
Definition: vector_mpi.hh:105
MHMatrixAssemblyRichards::water_content_previous_time
double water_content_previous_time
Definition: assembly_richards_old.hh:313
MHMatrixAssemblyRichards::~MHMatrixAssemblyRichards
~MHMatrixAssemblyRichards()
Destructor.
Definition: assembly_richards_old.hh:158
ReconstructSchurAssemblyLMH
Definition: assembly_lmh_old.hh:686
DarcyMH::EqFields::storativity
Field< 3, FieldValue< 3 >::Scalar > storativity
Definition: darcy_flow_mh.hh:182
InitCondPostprocessAssembly::~InitCondPostprocessAssembly
~InitCondPostprocessAssembly()
Destructor.
Definition: assembly_richards_old.hh:51
MHMatrixAssemblyRichards::eq_data_
EqData * eq_data_
Definition: assembly_richards_old.hh:306
MHMatrixAssemblyRichards::EqFields
RichardsLMH::EqFields EqFields
Definition: assembly_richards_old.hh:129
VectorMPI
Definition: vector_mpi.hh:43
InitCondPostprocessAssembly::edge_indices_
LocDofVec edge_indices_
Dofs of discontinuous fields on element edges.
Definition: assembly_richards_old.hh:115
boundary
@ boundary
Definition: generic_assembly.hh:36
ReconstructSchurAssemblyRichards::postprocess_velocity_specific
void postprocess_velocity_specific(const DHCellAccessor &dh_cell, BulkPoint &p, arma::vec &solution, double edge_scale, double edge_source_term) override
Definition: assembly_richards_old.hh:354
MHMatrixAssemblyRichards::mass_rhs_
double mass_rhs_
Definition: assembly_richards_old.hh:315
MHMatrixAssemblyLMH::initialize
void initialize(ElementCacheMap *element_cache_map)
Initialize auxiliary vectors and other data members.
Definition: assembly_lmh_old.hh:149
MHMatrixAssemblyRichards::EqData
RichardsLMH::EqData EqData
Definition: assembly_richards_old.hh:130
RegionIdx::bulk_idx
unsigned int bulk_idx() const
Returns index of the region in the bulk set.
Definition: region.hh:91
DarcyMH::EqFields::anisotropy
Field< 3, FieldValue< 3 >::TensorFixed > anisotropy
Definition: darcy_flow_mh.hh:169
GenericAssembly
Generic class of assemblation.
Definition: generic_assembly.hh:160
RichardsLMH::EqData::capacity
VectorMPI capacity
Definition: richards_lmh.hh:96
AssemblyBase::element_cache_map_
ElementCacheMap * element_cache_map_
ElementCacheMap shared with GenericAssembly object.
Definition: assembly_base.hh:193
SoilData::Qs
double Qs
Definition: soil_models.hh:43
RichardsLMH::EqFields::water_content_saturated
Field< 3, FieldValue< 3 >::Scalar > water_content_saturated
Definition: richards_lmh.hh:75
ElementAccessor::measure
double measure() const
Computes the measure of the element.
Definition: accessors_impl.hh:67
ReconstructSchurAssemblyRichards::assemble_source_term
void assemble_source_term(const DHCellAccessor &cell, BulkPoint &p) override
Definition: assembly_richards_old.hh:349
FMT_UNUSED
#define FMT_UNUSED
Definition: posix.h:75
IntDim
unsigned int IntDim
A dimension index type.
Definition: mixed.hh:19