28 #include "petscviewer.h"
29 #include "petscerror.h"
85 .
add_value(
MortarP1,
"P1",
"Mortar space: P1 on intersections, using non-conforming pressures.")
95 "Boundary piezometric head for BC types: dirichlet, robin, and river." )
97 "Boundary switch piezometric head for BC types: seepage, river." )
99 "Initial condition for the pressure given as the piezometric head." )
101 return field_descriptor;
107 "Linear solver for MH problem.")
109 "Residual tolerance.")
111 "Minimum number of iterations (linear solutions) to use.\nThis is usefull if the convergence criteria "
112 "does not characterize your goal well enough so it converges prematurely, possibly even without a single linear solution."
113 "If greater then 'max_it' the value is set to 'max_it'.")
115 "Maximum number of iterations (linear solutions) of the non-linear solver.")
117 "If a stagnation of the nonlinear solver is detected the solver stops. "
118 "A divergence is reported by default, forcing the end of the simulation. By setting this flag to 'true', the solver "
119 "ends with convergence success on stagnation, but it reports warning about it.")
129 "Vector of the gravity force. Dimensionless.")
131 "Input data for Darcy flow model.")
133 "Non-linear solver for MH problem.")
135 "Output stream settings.\n Specify file format, precision etc.")
138 IT::Default(
"{ \"fields\": [ \"pressure_p0\", \"velocity_p0\" ] }"),
139 "Specification of output fields and output times.")
141 "Output settings specific to Darcy flow model.\n"
142 "Includes raw output and some experimental functionality.")
144 "Settings for computing mass balance.")
146 "Method for coupling Darcy flow between dimensions on incompatible meshes. [Experimental]" )
152 Input::register_class< DarcyLMH, Mesh &, const Input::Record >(equation_name()) +
162 .
description(
"Pressure solution - P0 interpolation.");
167 .
description(
"Pressure solution - Crouzeix-Raviart interpolation.");
172 .
description(
"Piezo head solution - P0 interpolation.");
177 .
description(
"Velocity solution - P0 interpolation.");
185 .
description(
"Anisotropy of the conductivity tensor.")
190 .
description(
"Complement dimension parameter (cross section for 1D, thickness for 2D).")
201 .
description(
"Transition coefficient between dimensions.")
219 .description(
"Prescribed pressure value on the boundary. Used for all values of ``bc_type`` except ``none`` and ``seepage``. "
220 "See documentation of ``bc_type`` for exact meaning of ``bc_pressure`` in individual boundary condition types.")
221 .input_default(
"0.0")
227 .description(
"Incoming water boundary flux. Used for bc_types : ``total_flux``, ``seepage``, ``river``.")
228 .input_default(
"0.0")
229 .units(
UnitSI().m().s(-1) );
233 .name(
"bc_robin_sigma")
234 .description(
"Conductivity coefficient in the ``total_flux`` or the ``river`` boundary condition type.")
235 .input_default(
"0.0")
240 .name(
"bc_switch_pressure")
241 .description(
"Critical switch pressure for ``seepage`` and ``river`` boundary conditions.")
242 .input_default(
"0.0")
248 .
description(
"Initial condition for pressure in time dependent problems.")
253 .
description(
"Storativity (in time dependent problems).")
258 .
description(
"Storativity added from upstream equation.")
264 .
description(
"Water source density added from upstream equation.")
298 .
description(
"Precomputed pressure of l2 difference output.");
304 .
description(
"Precomputed velocity of l2 difference output.");
310 .
description(
"Precomputed divergence of l2 difference output.");
323 "Homogeneous Neumann boundary condition\n(zero normal flux over the boundary).")
325 "Dirichlet boundary condition. "
326 "Specify the pressure head through the ``bc_pressure`` field "
327 "or the piezometric head through the ``bc_piezo_head`` field.")
328 .
add_value(total_flux,
"total_flux",
"Flux boundary condition (combines Neumann and Robin type). "
329 "Water inflow equal to (($ \\delta_d(q_d^N + \\sigma_d (h_d^R - h_d) )$)). "
330 "Specify the water inflow by the ``bc_flux`` field, the transition coefficient by ``bc_robin_sigma`` "
331 "and the reference pressure head or piezometric head through ``bc_pressure`` or ``bc_piezo_head`` respectively.")
333 "Seepage face boundary condition. Pressure and inflow bounded from above. Boundary with potential seepage flow "
334 "is described by the pair of inequalities: "
335 "(($h_d \\le h_d^D$)) and (($ -\\boldsymbol q_d\\cdot\\boldsymbol n \\le \\delta q_d^N$)), where the equality holds in at least one of them. "
336 "Caution: setting (($q_d^N$)) strictly negative "
337 "may lead to an ill posed problem since a positive outflow is enforced. "
338 "Parameters (($h_d^D$)) and (($q_d^N$)) are given by the fields ``bc_switch_pressure`` (or ``bc_switch_piezo_head``) and ``bc_flux`` respectively."
341 "River boundary condition. For the water level above the bedrock, (($H_d > H_d^S$)), the Robin boundary condition is used with the inflow given by: "
342 "(( $ \\delta_d(q_d^N + \\sigma_d(H_d^D - H_d) )$)). For the water level under the bedrock, constant infiltration is used: "
343 "(( $ \\delta_d(q_d^N + \\sigma_d(H_d^D - H_d^S) )$)). Parameters: ``bc_pressure``, ``bc_switch_pressure``, "
344 " ``bc_sigma``, ``bc_flux``."
359 auto size = dh_p_->get_local_to_global_map().size();
360 save_local_system_.resize(
size);
361 bc_fluxes_reconstruted.resize(
size);
362 loc_system_.resize(
size);
363 postprocess_solution_.resize(
size);
369 std::fill(save_local_system_.begin(), save_local_system_.end(),
false);
370 std::fill(bc_fluxes_reconstruted.begin(), bc_fluxes_reconstruted.end(),
false);
411 MessageOut() <<
"Duplicate key 'time', time in flow equation is already initialized from parent class!";
451 return next_t * (1 - 2*std::numeric_limits<double>::epsilon());
472 gravity_array.copy_to(gvec);
478 auto field_algo=std::make_shared<FieldConstant<3, FieldValue<3>::VectorFixed>>();
479 field_algo->set_value(gvalue);
480 eq_fields_->gravity_field.set(field_algo, 0.0);
500 MessageOut() <<
"Missing the key 'time', obligatory for the transient problems." << endl;
511 std::shared_ptr< FiniteElement<1> > fe1_rt = std::make_shared<FE_RT0_disc<1>>();
512 std::shared_ptr< FiniteElement<2> > fe2_rt = std::make_shared<FE_RT0_disc<2>>();
513 std::shared_ptr< FiniteElement<3> > fe3_rt = std::make_shared<FE_RT0_disc<3>>();
514 std::shared_ptr< FiniteElement<0> > fe0_disc = std::make_shared<FE_P_disc<0>>(0);
515 std::shared_ptr< FiniteElement<1> > fe1_disc = std::make_shared<FE_P_disc<1>>(0);
516 std::shared_ptr< FiniteElement<2> > fe2_disc = std::make_shared<FE_P_disc<2>>(0);
517 std::shared_ptr< FiniteElement<3> > fe3_disc = std::make_shared<FE_P_disc<3>>(0);
518 std::shared_ptr< FiniteElement<0> > fe0_cr = std::make_shared<FE_CR<0>>();
519 std::shared_ptr< FiniteElement<1> > fe1_cr = std::make_shared<FE_CR<1>>();
520 std::shared_ptr< FiniteElement<2> > fe2_cr = std::make_shared<FE_CR<2>>();
521 std::shared_ptr< FiniteElement<3> > fe3_cr = std::make_shared<FE_CR<3>>();
523 FESystem<0> fe0_sys( {fe0_disc, fe0_disc, fe0_cr} );
529 std::shared_ptr<DiscreteSpace> ds = std::make_shared<EqualOrderDiscreteSpace>(
mesh_, fe_sys);
530 eq_data_->dh_ = std::make_shared<DOFHandlerMultiDim>(*
mesh_);
540 uint rt_component = 0;
542 auto ele_flux_ptr = create_field_fe<3, FieldValue<3>::VectorFixed>(
eq_data_->dh_, &
eq_data_->full_solution, rt_component);
547 uint p_ele_component = 1;
548 auto ele_pressure_ptr = create_field_fe<3, FieldValue<3>::Scalar>(
eq_data_->dh_, &
eq_data_->full_solution, p_ele_component);
549 eq_fields_->field_ele_pressure.set(ele_pressure_ptr, 0.0);
551 uint p_edge_component = 2;
552 auto edge_pressure_ptr = create_field_fe<3, FieldValue<3>::Scalar>(
eq_data_->dh_, &
eq_data_->full_solution, p_edge_component);
553 eq_fields_->field_edge_pressure.set(edge_pressure_ptr, 0.0);
562 uint p_element_component = 1;
563 eq_data_->dh_p_ = std::make_shared<SubDOFHandlerMultiDim>(
eq_data_->dh_,p_element_component);
567 uint p_edge_component = 2;
568 eq_data_->dh_cr_ = std::make_shared<SubDOFHandlerMultiDim>(
eq_data_->dh_,p_edge_component);
573 std::shared_ptr<DiscreteSpace> ds_cr_disc = std::make_shared<EqualOrderDiscreteSpace>(
mesh_, fe_cr_disc);
574 eq_data_->dh_cr_disc_ = std::make_shared<DOFHandlerMultiDim>(*
mesh_);
575 eq_data_->dh_cr_disc_->distribute_dofs(ds_cr_disc);
586 eq_data_->p_edge_solution_previous_time =
eq_data_->dh_cr_->create_vector();
595 .val<Input::AbstractRecord>(
"linear_solver");
673 eq_data_->p_edge_solution.zero_entries();
675 if (
eq_data_->use_steady_assembly_) {
676 MessageOut() <<
"Flow zero time step - steady case\n";
680 MessageOut() <<
"Flow zero time step - unsteady case\n";
691 START_TIMER(
"DarcyFlowMH::reconstruct_solution_from_schur");
693 END_TIMER(
"DarcyFlowMH::reconstruct_solution_from_schur");
712 eq_data_->full_solution.local_to_ghost_begin();
713 eq_data_->full_solution.local_to_ghost_end();
721 bool jump_time =
eq_fields_->storativity.is_jump_time();
722 if (! zero_time_term_from_left) {
723 MessageOut() <<
"Flow time step - unsteady case\n";
728 eq_data_->use_steady_assembly_ =
false;
734 WarningOut() <<
"Output of solution discontinuous in time not supported yet.\n";
743 if (! zero_time_term_from_left && ! jump_time && output)
750 if (zero_time_term_from_right) {
751 MessageOut() <<
"Flow time step - steady case\n";
753 eq_data_->use_steady_assembly_ =
true;
758 }
else if (! zero_time_term_from_left && jump_time) {
759 WarningOut() <<
"Discontinuous time term not supported yet.\n";
770 return (
eq_fields_->storativity.input_list_size() == 0);
783 MessageOut().fmt(
"[nonlinear solver] norm of initial residual: {}\n", residual_norm);
786 int is_linear_common;
791 this->
max_n_it_ = nl_solver_rec.
val<
unsigned int>(
"max_it");
792 this->
min_n_it_ = nl_solver_rec.
val<
unsigned int>(
"min_it");
793 if (this->min_n_it_ > this->max_n_it_) this->min_n_it_ = this->
max_n_it_;
795 if (! is_linear_common) {
801 while (
eq_data_->nonlinear_iteration_ < this->min_n_it_ ||
802 (residual_norm > this->tolerance_ &&
eq_data_->nonlinear_iteration_ < this->max_n_it_ )) {
804 convergence_history.push_back(residual_norm);
808 if (convergence_history.size() >= 5 &&
809 convergence_history[ convergence_history.size() - 1]/convergence_history[ convergence_history.size() - 2] > 0.9 &&
810 convergence_history[ convergence_history.size() - 1]/convergence_history[ convergence_history.size() - 5] > 0.8) {
813 WarningOut().fmt(
"Accept solution on stagnation. Its: {} Residual: {}\n",
eq_data_->nonlinear_iteration_, residual_norm);
816 THROW(ExcSolverDiverge() << EI_Reason(
"Stagnation."));
820 if (! is_linear_common){
822 eq_data_->p_edge_solution_previous.local_to_ghost_begin();
823 eq_data_->p_edge_solution_previous.local_to_ghost_end();
827 MessageOut().fmt(
"[schur solver] lin. it: {}, reason: {}, residual: {}\n",
833 if (is_linear_common){
836 MessageOut().fmt(
"[nonlinear solver] lin. it: {}, reason: {}, residual: {}\n",
843 VecAXPBY(
eq_data_->p_edge_solution.petsc_vec(), (1-alpha), alpha,
eq_data_->p_edge_solution_previous.petsc_vec());
850 MessageOut().fmt(
"[nonlinear solver] it: {} lin. it: {}, reason: {}, residual: {}\n",
855 START_TIMER(
"DarcyFlowMH::reconstruct_solution_from_schur");
857 END_TIMER(
"DarcyFlowMH::reconstruct_solution_from_schur");
862 if (
eq_data_->nonlinear_iteration_ < 3) mult = 1.6;
863 if (
eq_data_->nonlinear_iteration_ > 7) mult = 0.7;
873 eq_data_->p_edge_solution_previous_time.copy_from(
eq_data_->p_edge_solution);
874 eq_data_->p_edge_solution_previous_time.local_to_ghost_begin();
875 eq_data_->p_edge_solution_previous_time.local_to_ghost_end();
940 double zeros[100000];
941 for(
int i=0; i<100000; i++) zeros[i] = 0.0;
944 tmp_rows.reserve(200);
947 dofs.reserve(
eq_data_->dh_cr_->max_elem_dofs());
948 dofs_ngh.reserve(
eq_data_->dh_cr_->max_elem_dofs());
954 const uint ndofs = dh_cell.n_dofs();
955 dofs.resize(dh_cell.n_dofs());
956 dh_cell.get_dof_indices(dofs);
958 int* dofs_ptr = dofs.
data();
965 for (
DHCellSide neighb_side : dh_cell.neighb_sides() ) {
973 const uint ndofs_ngh = dh_neighb_cell.
n_dofs();
974 dofs_ngh.resize(ndofs_ngh);
978 tmp_rows.push_back(dofs_ngh[neighb_side.side().side_idx()]);
1138 eq_data_->lin_sys_schur = std::make_shared<LinSys_PETSC>( &(*
eq_data_->dh_cr_->distr()) );
1212 eq_data_->full_solution.zero_entries();
1213 eq_data_->p_edge_solution.zero_entries();
1217 THROW( ExcUnknownSolver() );
1252 START_TIMER(
"DarcyFlowMH::assembly_linear_system");
1255 eq_data_->p_edge_solution.local_to_ghost_begin();
1256 eq_data_->p_edge_solution.local_to_ghost_end();
1278 START_TIMER(
"DarcyLMH::assembly_steady_mh_matrix");
1280 END_TIMER(
"DarcyLMH::assembly_steady_mh_matrix");
1293 std::string output_file;
1296 double d_max = std::numeric_limits<double>::max();
1297 double h1 = d_max, h2 = d_max, h3 = d_max;
1298 double he2 = d_max, he3 = d_max;
1301 case 1: h1 = std::min(h1,ele.measure());
break;
1302 case 2: h2 = std::min(h2,ele.measure());
break;
1303 case 3: h3 = std::min(h3,ele.measure());
break;
1306 for (
unsigned int j=0; j<ele->n_sides(); j++) {
1308 case 2: he2 = std::min(he2, ele.side(j)->measure());
break;
1309 case 3: he3 = std::min(he3, ele.side(j)->measure());
break;
1313 if(h1 == d_max) h1 = 0;
1314 if(h2 == d_max) h2 = 0;
1315 if(h3 == d_max) h3 = 0;
1316 if(he2 == d_max) he2 = 0;
1317 if(he3 == d_max) he3 = 0;
1320 file = fopen(output_file.c_str(),
"a");
1322 fprintf(file,
"nB = %d;\n",
eq_data_->dh_->mesh()->get_el_ds()->size());
1324 fprintf(file,
"h1 = %e;\nh2 = %e;\nh3 = %e;\n", h1, h2, h3);
1325 fprintf(file,
"he2 = %e;\nhe3 = %e;\n", he2, he3);
1331 PetscViewerASCIIOpen(PETSC_COMM_WORLD, output_file.c_str(), &viewer);
1332 PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_MATLAB);
1333 MatView( *
const_cast<Mat*
>(
lin_sys_schur().get_matrix()), viewer);
1334 VecView( *
const_cast<Vec*
>(
lin_sys_schur().get_rhs()), viewer);
1335 VecView( *
const_cast<Vec*
>(&(
lin_sys_schur().get_solution())), viewer);
1336 VecView( *
const_cast<Vec*
>(&(
eq_data_->full_solution.petsc_vec())), viewer);
1533 if(
time_ !=
nullptr)
1552 void dofs_range(
unsigned int n_dofs,
unsigned int &min,
unsigned int &max,
unsigned int component) {
1556 }
else if (component==1) {
1567 ASSERT_LT(component, 3).error(
"Invalid component!");
1568 unsigned int i, n_dofs, min, max;
1572 n_dofs = dh_cell.get_dof_indices(dof_indices);
1574 for (i=min; i<max; ++i) dof_vec.push_back(dof_indices[i]);
Functors of FieldModels used in Darcy flow module.
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
#define ASSERT_EQ(a, b)
Definition of comparative assert macro (EQual) only for debug mode.
static const Input::Type::Record & get_input_type()
Main balance input record type.
Cell accessor allow iterate over DOF handler cells.
unsigned int n_dofs() const
Return number of dofs on given cell.
unsigned int get_dof_indices(std::vector< LongIdx > &indices) const
Fill vector of the global indices of dofs associated to the cell.
Side accessor allows to iterate over sides of DOF handler cell.
static Input::Type::Abstract & get_input_type()
MortarMethod
Type of experimental Mortar-like method for non-compatible 1d-2d interaction.
static const Input::Type::Instance & get_input_type_specific()
void output()
Calculate values for output.
static const Input::Type::Instance & get_input_type(FieldSet &eq_data, const std::string &equation_name)
void reset()
Reset data members.
void init()
Initialize vectors, ...
Field< 3, FieldValue< 3 >::Scalar > water_source_density
Field< 3, FieldValue< 3 >::Scalar > ref_divergence
Field< 3, FieldValue< 3 >::Scalar > extra_storativity
Field< 3, FieldValue< 3 >::Scalar > field_ele_pressure
Externally added water source.
BCField< 3, FieldValue< 3 >::Enum > bc_type
Field< 3, FieldValue< 3 >::VectorFixed > gravity_field
Field< 3, FieldValue< 3 >::Scalar > sigma
Field< 3, FieldValue< 3 >::Scalar > init_pressure
Field< 3, FieldValue< 3 >::Scalar > storativity
BCField< 3, FieldValue< 3 >::Scalar > bc_pressure
BCField< 3, FieldValue< 3 >::Scalar > bc_flux
Field< 3, FieldValue< 3 >::TensorFixed > anisotropy
Field< 3, FieldValue< 3 >::Scalar > cross_section
Field< 3, FieldValue< 3 >::Scalar > conductivity
Field< 3, FieldValue< 3 >::VectorFixed > field_ele_velocity
Field< 3, FieldValue< 3 >::Scalar > field_edge_pressure
BCField< 3, FieldValue< 3 >::Scalar > bc_switch_piezo_head
Field< 3, FieldValue< 3 >::Scalar > field_ele_piezo_head
Field< 3, FieldValue< 3 >::Scalar > init_piezo_head
Same as previous but used in boundary fields.
BCField< 3, FieldValue< 3 >::Scalar > bc_robin_sigma
static const Input::Type::Selection & get_bc_type_selection()
Return a Selection corresponding to enum BC_Type.
Field< 3, FieldValue< 3 >::Scalar > extra_source
Externally added storativity.
Field< 3, FieldValue< 3 >::VectorFixed > ref_velocity
Precompute l2 difference outputs.
Field< 3, FieldValue< 3 >::VectorFixed > flux
EqFields()
Creation of all fields.
BCField< 3, FieldValue< 3 >::Scalar > bc_switch_pressure
BCField< 3, FieldValue< 3 >::VectorFixed > bc_gravity
Holds gravity vector acceptable in FieldModel.
BCField< 3, FieldValue< 3 >::Scalar > bc_piezo_head
Field< 3, FieldValue< 3 >::Scalar > ref_pressure
GenericAssemblyBase * mh_matrix_assembly_
void initialize() override
void print_matlab_matrix(string matlab_file)
Print darcy flow matrix in matlab format into a file.
virtual double solved_time() override
void zero_time_step() override
virtual void postprocess()
void solve_nonlinear()
Solve method common to zero_time_step and update solution.
static std::string equation_name()
virtual void initialize_specific()
static const int registrar
Registrar of class to factory.
DarcyFlowMHOutput * output_object
std::shared_ptr< EqData > eq_data_
GenericAssembly< ReadInitCondAssemblyLMH > * read_init_cond_assembly_
general assembly objects, hold assembly objects of appropriate dimension
GenericAssemblyBase * reconstruct_schur_assembly_
virtual void initialize_asm()
Create and initialize assembly objects.
void update_solution() override
void allocate_mh_matrix()
void solve_time_step(bool output=true)
Solve the problem without moving to next time and without output.
std::vector< int > get_component_indices_vec(unsigned int component) const
Get vector of all DOF indices of given component (0..side, 1..element, 2..edge)
static const Input::Type::Record & type_field_descriptor()
void create_linear_system(Input::AbstractRecord rec)
static const Input::Type::Record & get_input_type()
DarcyLMH(Mesh &mesh, const Input::Record in_rec, TimeGovernor *tm=nullptr)
CREATE AND FILL GLOBAL MH MATRIX OF THE WATER MODEL.
friend class DarcyFlowMHOutput
virtual bool zero_time_term(bool time_global=false)
std::shared_ptr< EqFields > eq_fields_
static const Input::Type::Selection & get_mh_mortar_selection()
Selection for enum MortarMethod.
std::shared_ptr< Balance > balance_
virtual void accept_time_step()
postprocess velocity field (add sources)
virtual ~DarcyLMH() override
virtual void output_data() override
Write computed fields.
LinSys & lin_sys_schur()
Getter for the linear system of the 2. Schur complement.
virtual void assembly_linear_system()
virtual void read_init_cond_asm()
Call assemble of read_init_cond_assembly_.
unsigned int n_neighs_vb() const
Return number of neighbours.
Input::Record input_record_
static Input::Type::Record & record_template()
Template Record with common keys for derived equations.
std::shared_ptr< FieldSet > eq_fieldset_
static Input::Type::Record & user_fields_template(std::string equation_name)
Template Record with common key user_fields for derived equations.
Compound finite element on dim dimensional simplex.
static const std::string field_descriptor_record_description(const string &record_name)
FieldCommon & input_selection(Input::Type::Selection element_selection)
FieldCommon & description(const string &description)
FieldCommon & flags(FieldFlag::Flags::Mask mask)
FieldCommon & name(const string &name)
FieldCommon & set_limits(double min, double max=std::numeric_limits< double >::max())
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
FieldCommon & input_default(const string &input_default)
static constexpr Mask input_copy
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
void set_default_fieldset()
auto disable_where(const Field< spacedim, typename FieldValue< spacedim >::Enum > &control_field, const vector< FieldEnum > &value_list) -> Field &
Dedicated class for storing path to input and output files.
virtual void assemble(std::shared_ptr< DOFHandlerMultiDim > dh)=0
void assemble(std::shared_ptr< DOFHandlerMultiDim > dh) override
General assemble methods.
static const Input::Type::Record & get_input_type()
void set_solution(Vec sol_vec)
void set_matrix_changed()
virtual void set_from_input(const Input::Record in_rec)
virtual void start_add_assembly()
virtual void finish_assembly()=0
virtual void set_tolerances(double r_tol, double a_tol, double d_tol, unsigned int max_it)=0
virtual void mat_set_values(int nrow, int *rows, int ncol, int *cols, double *vals)=0
virtual double compute_residual()=0
void set_symmetric(bool flag=true)
virtual PetscErrorCode rhs_zero_entries()
virtual void start_allocation()
virtual SolveInfo solve()=0
void set_positive_definite(bool flag=true)
virtual PetscErrorCode mat_zero_entries()
static Input::Type::Abstract & get_input_type()
const RegionDB & region_db() const
unsigned int n_edges() const
unsigned int n_elements() const
Range< ElementAccessor< 3 > > elements_range() const
Returns range of mesh elements.
BCMesh * bc_mesh() const override
Implement MeshBase::bc_mesh(), getter of boundary mesh.
MixedMeshIntersections & mixed_intersections()
unsigned int n_sides() const
static const Input::Type::Record & get_input_type()
The specification of output stream.
RegionSet get_region_set(const std::string &set_name) const
Basic time management functionality for unsteady (and steady) solvers (class Equation).
bool is_end() const
Returns true if the actual time is greater than or equal to the end time.
int set_upper_constraint(double upper, std::string message)
Sets upper constraint for the next time step estimating.
void view(const char *name="") const
double estimate_dt() const
Estimate choice of next time step according to actual setting of constraints.
const TimeStep & step(int index=-1) const
void next_time()
Proceed to the next time according to current estimated time step.
Class for representation SI units of Fields.
static UnitSI & dimensionless()
Returns dimensionless unit.
void dofs_range(unsigned int n_dofs, unsigned int &min, unsigned int &max, unsigned int component)
Helper method fills range (min and max) of given component.
Lumped mixed-hybrid model of linear Darcy flow, possibly unsteady.
Output class for darcy_flow_mh model.
Support classes for parallel programing.
Definitions of basic Lagrangean finite elements with polynomial shape functions.
#define FLOW123D_FORCE_LINK_IN_CHILD(x)
#define THROW(whole_exception_expr)
Wrapper for throw. Saves the throwing point.
Classes with algorithms for computation of intersections of meshes.
Wrappers for linear systems based on MPIAIJ and MATIS format.
Solver based on the original PETSc solver using MPIAIJ matrix and succesive Schur complement construc...
#define WarningOut()
Macro defining 'warning' record of log.
#define MessageOut()
Macro defining 'message' record of log.
#define MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm)
FMT_FUNC int fprintf(std::ostream &os, CStringRef format, ArgList args)
Implementation of range helper class.
Assembly explicit Schur complement for the given linear system. Provides method for resolution of the...
#define END_TIMER(tag)
Ends a timer with specified tag.
#define START_TIMER(tag)
Starts a timer with specified tag.
Basic time management class.