8 #ifndef SRC_FLOW_ASSEMBLY_LMH_HH_ 9 #define SRC_FLOW_ASSEMBLY_LMH_HH_ 81 double water_content = 0;
88 water_content = evaluated.val();
89 capacity = x_phead.d(0);
92 ad_->water_content_previous_it[ele.
side_local_idx(i)] = water_content + storativity * phead;
102 double conductivity, head;
109 double phead =
ad_->phead_edge_[local_edge];
110 conductivity +=
soil_model->conductivity(phead);
111 head +=
ad_->phead_edge_[local_edge];
143 if (this->dirichlet_edge[i] == 0) {
145 double capacity = this->
ad_->capacity[local_side];
146 double water_content_diff = -
ad_->water_content_previous_it[local_side] +
ad_->water_content_previous_time[local_side];
147 double mass_diagonal = diagonal_coef * capacity;
161 double mass_rhs = mass_diagonal *
ad_->phead_edge_[local_edge] / this->
ad_->time_step_
162 + diagonal_coef * water_content_diff / this->
ad_->time_step_;
168 this->loc_system_.add_value(this->loc_edge_dofs[i], this->loc_edge_dofs[i],
169 -mass_diagonal/this->
ad_->time_step_,
170 -source_diagonal - mass_rhs);
173 if (
ad_->balance !=
nullptr) {
175 diagonal_coef*
ad_->water_content_previous_it[local_side]);
const arma::vec3 centre() const
int IdxInt
Define integers that are indices into large arrays (elements, nodes, dofs etc.)
AssemblyLMH(AssemblyDataPtr data)
ElementAccessor< 3 > element_accessor()
uint edge_local_idx(uint i)
#define FOR_ELEMENT_SIDES(i, j)
void reset_soil_model(LocalElementAccessorBase< 3 > ele)
uint side_local_idx(uint i)
void assemble_source_term(LocalElementAccessorBase< 3 > ele) override
std::shared_ptr< SoilModelBase > soil_model
void assemble_sides_scale(LocalElementAccessorBase< 3 > ele_ac, double scale)
std::shared_ptr< RichardsLMH::EqData > AssemblyDataPtr
void assemble_sides(LocalElementAccessorBase< 3 > ele) override
unsigned int bulk_idx() const
Returns index of the region in the bulk set.
void update_water_content(LocalElementAccessorBase< 3 > ele) override
ElementFullIter full_iter()