15 #include "petscviewer.h" 16 #include "petscerror.h" 32 return it::Record(
"UnsteadyDarcy_LMH",
"Lumped Mixed-Hybrid solver for unsteady saturated Darcy flow.")
36 "Time governor setting for the unsteady Darcy flow model.")
42 Input::register_class< DarcyFlowLMH_Unsteady, Mesh &, const Input::Record >(
"UnsteadyDarcy_LMH") +
94 for (
unsigned int i_loc_el = 0; i_loc_el <
el_ds->
lsize(); i_loc_el++) {
100 int edge_row =
row_4_edge[ele->side(i)->edge_idx()];
129 for (
unsigned int i_loc_el = 0; i_loc_el <
el_ds->
lsize(); i_loc_el++) {
135 int edge_row =
row_4_edge[ele->side(i)->edge_idx()];
137 double diagonal_coef = ele->measure() *
170 if (scale_factor != 1.0) {
195 for (
unsigned int i_loc = 0; i_loc <
el_ds->
lsize(); i_loc++)
200 double diagonal_coef = ele->measure()
207 int edge_row =
row_4_edge[ele->side(i)->edge_idx()];
222 int side_row, loc_edge_row, i;
225 double new_pressure, old_pressure, time_coef;
227 PetscScalar *loc_prev_sol;
232 for (
unsigned int i_loc = 0; i_loc <
edge_ds->
lsize(); i_loc++) {
238 old_pressure = loc_prev_sol[loc_edge_row];
246 VecSetValue(
schur0->
get_solution(), side_row, time_coef * (new_pressure - old_pressure), ADD_VALUES);
260 for (
unsigned int i_loc = 0; i_loc <
el_ds->
lsize(); i_loc++) {
264 values[i] = 1.0 * ele->
measure() *
Output class for darcy_flow_mh model.
virtual void postprocess()
postprocess velocity field (add sources)
Field< 3, FieldValue< 3 >::Scalar > water_source_density
#define FOR_EDGE_SIDES(i, j)
static const int registrar
Registrar of class to factory.
Field< 3, FieldValue< 3 >::Scalar > cross_section
bool solution_changed_for_scatter
#define ELEMENT_FULL_ITER(_mesh_, i)
#define FOR_ELEMENT_SIDES(i, j)
DarcyFlowLMH_Unsteady(Mesh &mesh, const Input::Record in_rec)
boost::shared_ptr< Distribution > rows_ds
const TimeStep & step(int index=-1) const
unsigned int water_balance_idx_
index of water balance within the Balance object.
FLOW123D_FORCE_LINK_IN_CHILD(richards_lmh)
Basic time management class.
void modify_system() override
static const Input::Type::Record & get_input_type()
Assembly explicit Schur complement for the given linear system. Provides method for resolution of the...
Global macros to enhance readability and debugging, general constants.
double * get_solution_array()
const Vec & get_solution()
unsigned int n_sides() const
bool is_changed_dt() const
#define START_TIMER(tag)
Starts a timer with specified tag.
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
unsigned int side_dof(const SideIter side) const
static Input::Type::Abstract & get_input_type()
void read_initial_condition() override
SideIter side(const unsigned int loc_index)
virtual const Vec * get_rhs()
ElementFullIter element() const
boost::shared_ptr< Balance > balance_
object for calculation and writing the water balance to file.
arma::vec3 centre() const
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
static const Input::Type::Record & get_input_type()
Mixed-hybrid model of linear Darcy flow, possibly unsteady.
void assembly_source_term() override
Source term is implemented differently in LMH version.
void set_matrix_changed()
ElementAccessor< 3 > element_accessor() const
Gets ElementAccessor of this element.
unsigned int index() const
static const Input::Type::Record & get_input_type()
virtual const Mat * get_matrix()
Field< 3, FieldValue< 3 >::Scalar > storativity
SideIter side(const unsigned int i) const
void rhs_set_value(int row, double val)
Field< 3, FieldValue< 3 >::Scalar > init_pressure
ElementVector element
Vector of elements of the mesh.
unsigned int lsize(int proc) const
get local size