Flow123d  release_3.0.0-973-g92f55e826
darcy_flow_mh_output.cc
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 darcy_flow_mh_output.cc
15  * @ingroup flow
16  * @brief Output class for darcy_flow_mh model.
17  * @author Jan Brezina
18  */
19 
20 #include <vector>
21 #include <iostream>
22 #include <sstream>
23 #include <string>
24 
25 #include <system/global_defs.h>
26 
27 #include "flow/darcy_flow_mh.hh"
30 
31 #include "io/output_time.hh"
32 #include "io/observe.hh"
33 #include "system/system.hh"
34 #include "system/sys_profiler.hh"
35 
36 #include "fields/field_set.hh"
37 #include "fem/dofhandler.hh"
38 #include "fem/fe_values.hh"
39 #include "fem/fe_rt.hh"
40 #include "fem/fe_values_views.hh"
42 #include "fields/field_fe.hh"
44 #include "fields/generic_field.hh"
45 
46 #include "mesh/long_idx.hh"
47 #include "mesh/mesh.h"
48 #include "mesh/partitioning.hh"
49 #include "mesh/accessors.hh"
50 #include "mesh/node_accessor.hh"
51 #include "mesh/range_wrapper.hh"
52 
53 // #include "coupling/balance.hh"
56 
57 namespace it = Input::Type;
58 
59 
62  DarcyMH::EqData eq_data;
63  output_fields += eq_data;
64  return output_fields.make_output_type("Flow_Darcy_MH", "");
65 }
66 
67 
69 
70  static it::Record& rec = it::Record("Output_DarcyMHSpecific", "Specific Darcy flow MH output.")
72  .declare_key("compute_errors", it::Bool(), it::Default("false"),
73  "SPECIAL PURPOSE. Computes error norms of the solution, particulary suited for non-compatible coupling models.")
75  "Output file with raw data from MH module.")
76  .close();
77 
80  "Flow_Darcy_MH_specific",
81  "");
82 }
83 
84 
87 {
88 
89  *this += field_ele_pressure.name("pressure_p0").units(UnitSI().m())
91  .description("Pressure solution - P0 interpolation.");
92  *this += field_node_pressure.name("pressure_p1").units(UnitSI().m())
94  .description("Pressure solution - P1 interpolation.");
95  *this += field_ele_piezo_head.name("piezo_head_p0").units(UnitSI().m())
97  .description("Piezo head solution - P0 interpolation.");
98  *this += field_ele_flux.name("velocity_p0").units(UnitSI().m().s(-1))
100  .description("Velocity solution - P0 interpolation.");
101  *this += subdomain.name("subdomain")
104  .description("Subdomain ids of the domain decomposition.");
105  *this += region_id.name("region_id")
108  .description("Region ids.");
109 }
110 
111 
113 : EquationOutput()
114 {
115  *this += pressure_diff.name("pressure_diff").units(UnitSI().m())
117  .description("Error norm of the pressure solution. [Experimental]");
118  *this += velocity_diff.name("velocity_diff").units(UnitSI().m().s(-1))
120  .description("Error norm of the velocity solution. [Experimental]");
121  *this += div_diff.name("div_diff").units(UnitSI().s(-1))
123  .description("Error norm of the divergence of the velocity solution. [Experimental]");
124 }
125 
127 : darcy_flow(flow),
128  mesh_(&darcy_flow->mesh()),
129  compute_errors_(false),
130  fe0(1),
132 {
133  Input::Record in_rec_output = main_mh_in_rec.val<Input::Record>("output");
134 
136  main_mh_in_rec.val<Input::Record>("output_stream"),
138  prepare_output(in_rec_output);
139 
140  auto in_rec_specific = main_mh_in_rec.find<Input::Record>("output_specific");
141  if (in_rec_specific) {
142  in_rec_specific->opt_val("compute_errors", compute_errors_);
143 
144  // raw output
145  int rank;
147  if (rank == 0) {
148  // optionally open raw output file
149  FilePath raw_output_file_path;
150  if (in_rec_specific->opt_val("raw_flow_output", raw_output_file_path)) {
151  MessageOut() << "Opening raw flow output: " << raw_output_file_path << "\n";
152  try {
153  raw_output_file_path.open_stream(raw_output_file);
154  } INPUT_CATCH(FilePath::ExcFileOpen, FilePath::EI_Address_String, (*in_rec_specific))
155  }
156  }
157 
158  auto fields_array = in_rec_specific->val<Input::Array>("fields");
159  if(fields_array.size() > 0){
161  prepare_specific_output(*in_rec_specific);
162  }
163  }
164 }
165 
167 {
168  // we need to add data from the flow equation at this point, not in constructor of OutputFields
171 
172  all_element_idx_.resize(mesh_->n_elements());
173  for(unsigned int i=0; i<all_element_idx_.size(); i++) all_element_idx_[i] = i;
174 
175  // create shared pointer to a FieldFE and push this Field to output_field on all regions
177  ele_pressure_ptr=create_field<3, FieldValue<3>::Scalar>(ele_pressure, *mesh_, 1);
179 
180  ds = std::make_shared<EqualOrderDiscreteSpace>(mesh_, &fe0, &fe_data_1d.fe_p1, &fe_data_2d.fe_p1, &fe_data_3d.fe_p1);
181  DOFHandlerMultiDim dh_par(*mesh_);
182  dh_par.distribute_dofs(ds);
183  dh_ = dh_par.sequential();
184  corner_pressure.resize(dh_->n_global_dofs());
185 
186  auto corner_ptr = make_shared< FieldFE<3, FieldValue<3>::Scalar> >();
187  corner_ptr->set_fe_data(dh_, 0, corner_pressure);
188 
191 
193  ele_piezo_head_ptr=create_field<3, FieldValue<3>::Scalar>(ele_piezo_head, *mesh_, 1);
195 
197  ele_flux_ptr=create_field<3, FieldValue<3>::VectorFixed>(ele_flux, *mesh_, 3);
199 
202 
203  //output_stream->add_admissible_field_names(in_rec_output.val<Input::Array>("fields"));
204  //output_stream->mark_output_times(darcy_flow->time());
206 }
207 
209 {
211  diff_data.data_ = darcy_flow->data_.get();
212 
213  // mask 2d elements crossing 1d
217  diff_data.velocity_mask[ isec.bulk_ele_idx() ]++;
218  }
219  }
220 
224 
226 
227  diff_data.vel_diff_ptr = create_field<3, FieldValue<3>::Scalar>(diff_data.velocity_diff, *mesh_, 1);
229  diff_data.pressure_diff_ptr = create_field<3, FieldValue<3>::Scalar>(diff_data.pressure_diff, *mesh_, 1);
231  diff_data.div_diff_ptr = create_field<3, FieldValue<3>::Scalar>(diff_data.div_diff, *mesh_, 1);
233 
236 }
237 
239 {};
240 
241 
242 
243 
244 
245 //=============================================================================
246 // CONVERT SOLUTION, CALCULATE BALANCES, ETC...
247 //=============================================================================
248 
249 
251 {
252  START_TIMER("Darcy fields output");
253 
254  ElementSetRef observed_elements = output_stream->observe(mesh_)->observed_elements();
255  {
256  START_TIMER("post-process output fields");
257 
259 
263  else
264  make_element_scalar(observed_elements);
265 
268  else
269  make_element_vector(observed_elements);
270 
273  //else
274  // make_node_scalar_param(observed_elements);
275 
279 
280  // Internal output only if both ele_pressure and ele_flux are output.
283  {
285  }
286  }
287 
288  {
289  START_TIMER("evaluate output fields");
291  }
292 
293  if (compute_errors_)
294  {
295  START_TIMER("compute specific output fields");
297  }
298 
300  {
301  START_TIMER("evaluate output fields");
307  }
308 
309  {
310  START_TIMER("write time frame");
311  output_stream->write_time_frame();
312  }
313 
314 
315 }
316 
317 
318 //=============================================================================
319 // FILL TH "SCALAR" FIELD FOR ALL ELEMENTS IN THE MESH
320 //=============================================================================
321 
322 void DarcyFlowMHOutput::make_element_scalar(ElementSetRef element_indices)
323 {
324  START_TIMER("DarcyFlowMHOutput::make_element_scalar");
325  unsigned int sol_size;
326  double *sol;
327 
328  darcy_flow->get_solution_vector(sol, sol_size);
329  unsigned int soi = mesh_->n_sides();
330  for(unsigned int i_ele : element_indices) {
332  ele_pressure[i_ele] = sol[ soi + i_ele];
333  ele_piezo_head[i_ele] = sol[soi + i_ele ]
334  - (darcy_flow->data_->gravity_[3] + arma::dot(darcy_flow->data_->gravity_vec_,ele.centre()));
335  }
336 }
337 
338 
339 
340 /****
341  * compute Darcian velocity in centre of elements
342  *
343  */
344 void DarcyFlowMHOutput::make_element_vector(ElementSetRef element_indices) {
345  START_TIMER("DarcyFlowMHOutput::make_element_vector");
346  // need to call this to create mh solution vector
348 
349  auto multidim_assembler = AssemblyBase::create< AssemblyMH >(darcy_flow->data_);
350  arma::vec3 flux_in_center;
351  for(unsigned int i_ele : element_indices) {
353 
354  flux_in_center = multidim_assembler[ele->dim() -1]->make_element_vector(ele);
355 
356  // place it in the sequential vector
357  for(unsigned int j=0; j<3; j++) ele_flux[3*i_ele + j]=flux_in_center[j];
358  }
359 }
360 
361 
363 {
364  START_TIMER("DarcyFlowMHOutput::make_corner_scalar");
365  unsigned int ndofs = dh_->max_elem_dofs();
366  std::vector<LongIdx> indices(ndofs);
367  unsigned int i_node;
368  /*for (DHCellAccessor cell : dh_->local_range()) {
369  cell.get_dof_indices(indices);
370  for (i_node=0; i_node<cell.elm()->n_nodes(); i_node++)
371  {
372  corner_pressure[indices[i_node]] = node_scalar[ cell.elm().node_accessor(i_node).idx() ];
373  }
374  }*/
375  for (auto ele : mesh_->elements_range()) {
376  dh_->get_dof_indices(ele, indices);
377  for (i_node=0; i_node<ele->n_nodes(); i_node++)
378  {
379  corner_pressure[indices[i_node]] = node_scalar[ ele.node_accessor(i_node).idx() ];
380  }
381  }
382 }
383 
384 
385 //=============================================================================
386 // pressure interpolation
387 //
388 // some sort of weighted average over elements and sides/edges of an node
389 //
390 // TODO:
391 // questions:
392 // - explain details of averaging and motivation for this type
393 // - edge scalars are stronger since thay are computed twice by each side
394 // - why division by (nod.aux-1)
395 // - ?implement without TED, TSD global arrays with single loop over elements, sides and one loop over nodes for normalization
396 //
397 //=============================================================================
398 
399 void DarcyFlowMHOutput::make_node_scalar_param(ElementSetRef element_indices) {
400  START_TIMER("DarcyFlowMHOutput::make_node_scalar_param");
401 
402  vector<double> scalars(mesh_->n_nodes());
403 
404  double dist; //!< tmp variable for storing particular distance node --> element, node --> side*/
405 
406  /** Accessors */
407  NodeAccessor<3> node;
408 
409  int n_nodes = mesh_->n_nodes(); //!< number of nodes in the mesh */
410  int node_index = 0; //!< index of each node */
411 
412  int* sum_elements = new int [n_nodes]; //!< sum elements joined to node */
413  int* sum_sides = new int [n_nodes]; //!< sum sides joined to node */
414  double* sum_ele_dist = new double [n_nodes]; //!< sum distances to all joined elements */
415  double* sum_side_dist = new double [n_nodes]; //!< Sum distances to all joined sides */
416 
417  /** tmp variables, will be replaced by ini keys
418  * TODO include them into ini file*/
419  bool count_elements = true; //!< scalar is counted via elements*/
420  bool count_sides = true; //!< scalar is counted via sides */
421 
422 
424 
425  /** init arrays */
426  for (int i = 0; i < n_nodes; i++){
427  sum_elements[i] = 0;
428  sum_sides[i] = 0;
429  sum_ele_dist[i] = 0.0;
430  sum_side_dist[i] = 0.0;
431  scalars[i] = 0.0;
432  };
433 
434  /**first pass - calculate sums (weights)*/
435  if (count_elements){
436  for (auto ele : mesh_->elements_range())
437  for (unsigned int li = 0; li < ele->n_nodes(); li++) {
438  node = ele.node_accessor(li); //!< get NodeAccessor from element */
439  node_index = node.idx(); //!< get nod index from mesh */
440 
441  dist = sqrt(
442  ((node->getX() - ele.centre()[ 0 ])*(node->getX() - ele.centre()[ 0 ])) +
443  ((node->getY() - ele.centre()[ 1 ])*(node->getY() - ele.centre()[ 1 ])) +
444  ((node->getZ() - ele.centre()[ 2 ])*(node->getZ() - ele.centre()[ 2 ]))
445  );
446  sum_ele_dist[node_index] += dist;
447  sum_elements[node_index]++;
448  }
449  }
450  if (count_sides){
451  for (auto ele : mesh_->elements_range())
452  for(SideIter side = ele.side(0); side->side_idx() < ele->n_sides(); ++side) {
453  for (unsigned int li = 0; li < side->n_nodes(); li++) {
454  node = side->node(li);//!< get NodeAccessor from element */
455  node_index = node.idx(); //!< get nod index from mesh */
456  dist = sqrt(
457  ((node->getX() - side->centre()[ 0 ])*(node->getX() - side->centre()[ 0 ])) +
458  ((node->getY() - side->centre()[ 1 ])*(node->getY() - side->centre()[ 1 ])) +
459  ((node->getZ() - side->centre()[ 2 ])*(node->getZ() - side->centre()[ 2 ]))
460  );
461 
462  sum_side_dist[node_index] += dist;
463  sum_sides[node_index]++;
464  }
465  }
466  }
467 
468  /**second pass - calculate scalar */
469  if (count_elements){
470  for (auto ele : mesh_->elements_range())
471  for (unsigned int li = 0; li < ele->n_nodes(); li++) {
472  node = ele.node_accessor(li);//!< get NodeAccessor from element */
473  node_index = ele.node_accessor(li).idx(); //!< get nod index from mesh */
474 
475  /**TODO - calculate it again or store it in prior pass*/
476  dist = sqrt(
477  ((node->getX() - ele.centre()[ 0 ])*(node->getX() - ele.centre()[ 0 ])) +
478  ((node->getY() - ele.centre()[ 1 ])*(node->getY() - ele.centre()[ 1 ])) +
479  ((node->getZ() - ele.centre()[ 2 ])*(node->getZ() - ele.centre()[ 2 ]))
480  );
481  scalars[node_index] += dh.element_scalar(ele) *
482  (1 - dist / (sum_ele_dist[node_index] + sum_side_dist[node_index])) /
483  (sum_elements[node_index] + sum_sides[node_index] - 1);
484  }
485  }
486  if (count_sides) {
487  for (auto ele : mesh_->elements_range())
488  for(SideIter side = ele.side(0); side->side_idx() < ele->n_sides(); ++side) {
489  for (unsigned int li = 0; li < side->n_nodes(); li++) {
490  node = side->node(li);//!< get NodeAccessor from element */
491  node_index = node.idx(); //!< get nod index from mesh */
492 
493  /**TODO - calculate it again or store it in prior pass*/
494  dist = sqrt(
495  ((node->getX() - side->centre()[ 0 ])*(node->getX() - side->centre()[ 0 ])) +
496  ((node->getY() - side->centre()[ 1 ])*(node->getY() - side->centre()[ 1 ])) +
497  ((node->getZ() - side->centre()[ 2 ])*(node->getZ() - side->centre()[ 2 ]))
498  );
499 
500 
501  scalars[node_index] += dh.side_scalar( *side ) *
502  (1 - dist / (sum_ele_dist[node_index] + sum_side_dist[node_index])) /
503  (sum_sides[node_index] + sum_elements[node_index] - 1);
504  }
505  }
506  }
507 
508  /** free memory */
509  delete [] sum_elements;
510  delete [] sum_sides;
511  delete [] sum_ele_dist;
512  delete [] sum_side_dist;
513 
514  make_corner_scalar(scalars);
515 }
516 
517 
518 /*
519  * Output of internal flow data.
520  */
522 {
523  START_TIMER("DarcyFlowMHOutput::output_internal_flow_data");
525 
526  if (! raw_output_file.is_open()) return;
527 
528  //char dbl_fmt[ 16 ]= "%.8g ";
529  // header
530  raw_output_file << "// fields:\n//ele_id ele_presure flux_in_barycenter[3] n_sides side_pressures[n] side_fluxes[n]\n";
531  raw_output_file << fmt::format("$FlowField\nT={}\n", darcy_flow->time().t());
532  raw_output_file << fmt::format("{}\n" , mesh_->n_elements() );
533 
534  int cit = 0;
535  for (auto ele : mesh_->elements_range()) {
536  raw_output_file << fmt::format("{} {} ", ele.index(), ele_pressure[cit]);
537  for (unsigned int i = 0; i < 3; i++)
538  raw_output_file << ele_flux[3*cit+i] << " ";
539 
540  raw_output_file << ele->n_sides() << " ";
541 
542  for (unsigned int i = 0; i < ele->n_sides(); i++) {
543  raw_output_file << dh.side_scalar( *(ele.side(i) ) ) << " ";
544  }
545  for (unsigned int i = 0; i < ele->n_sides(); i++) {
546  raw_output_file << dh.side_flux( *(ele.side(i) ) ) << " ";
547  }
548 
549  raw_output_file << endl;
550  cit ++;
551  }
552  raw_output_file << "$EndFlowField\n" << endl;
553 }
554 
555 
557 #include "fem/fe_p.hh"
558 #include "fem/fe_values.hh"
559 #include "fem/mapping_p1.hh"
560 #include "fields/field_python.hh"
561 #include "fields/field_values.hh"
562 
564 
565 /*
566 * Calculate approximation of L2 norm for:
567  * 1) difference between regularized pressure and analytical solution (using FunctionPython)
568  * 2) difference between RT velocities and analytical solution
569  * 3) difference of divergence
570  * */
571 
572 template <int dim>
574  FEValues<dim,3> &fe_values, FEValues<dim,3> &fv_rt,
575  ExactSolution &anal_sol, DarcyFlowMHOutput::DiffData &result) {
576 
577  fv_rt.reinit(ele);
578  fe_values.reinit(ele);
579 
580  double conductivity = result.data_->conductivity.value(ele.centre(), ele );
581  double cross = result.data_->cross_section.value(ele.centre(), ele );
582 
583 
584  // get coefficients on the current element
585  vector<double> fluxes(dim+1);
586 // vector<double> pressure_traces(dim+1);
587 
588  for (unsigned int li = 0; li < ele->n_sides(); li++) {
589  fluxes[li] = result.dh->side_flux( *(ele.side( li ) ) );
590 // pressure_traces[li] = result.dh->side_scalar( *(ele->side( li ) ) );
591  }
592  double pressure_mean = result.dh->element_scalar(ele);
593 
594  arma::vec analytical(5);
595  arma::vec3 flux_in_q_point;
596  arma::vec3 anal_flux;
597 
598  double velocity_diff=0, divergence_diff=0, pressure_diff=0, diff;
599 
600  // 1d: mean_x_squared = 1/6 (v0^2 + v1^2 + v0*v1)
601  // 2d: mean_x_squared = 1/12 (v0^2 + v1^2 +v2^2 + v0*v1 + v0*v2 + v1*v2)
602  double mean_x_squared=0;
603  for(unsigned int i_node=0; i_node < ele->n_nodes(); i_node++ )
604  for(unsigned int j_node=0; j_node < ele->n_nodes(); j_node++ )
605  {
606  mean_x_squared += (i_node == j_node ? 2.0 : 1.0) / ( 6 * dim ) // multiply by 2 on diagonal
607  * arma::dot( ele.node(i_node)->point(), ele.node(j_node)->point());
608  }
609 
610  for(unsigned int i_point=0; i_point < fe_values.n_points(); i_point++) {
611  arma::vec3 q_point = fe_values.point(i_point);
612 
613 
614  analytical = anal_sol.value(q_point, ele );
615  for(unsigned int i=0; i< 3; i++) anal_flux[i] = analytical[i+1];
616 
617  // compute postprocesed pressure
618  diff = 0;
619  for(unsigned int i_shape=0; i_shape < ele->n_sides(); i_shape++) {
620  unsigned int oposite_node = RefElement<dim>::oposite_node(i_shape);
621 
622  diff += fluxes[ i_shape ] *
623  ( arma::dot( q_point, q_point )/ 2
624  - mean_x_squared / 2
625  - arma::dot( q_point, ele.node(oposite_node)->point() )
626  + arma::dot( ele.centre(), ele.node(oposite_node)->point() )
627  );
628  }
629 
630  diff = - (1.0 / conductivity) * diff / dim / ele.measure() / cross + pressure_mean ;
631  diff = ( diff - analytical[0]);
632  pressure_diff += diff * diff * fe_values.JxW(i_point);
633 
634 
635  // velocity difference
636  flux_in_q_point.zeros();
637  for(unsigned int i_shape=0; i_shape < ele->n_sides(); i_shape++) {
638  flux_in_q_point += fluxes[ i_shape ]
639  * fv_rt.vector_view(0).value(i_shape, i_point)
640  / cross;
641  }
642 
643  flux_in_q_point -= anal_flux;
644  velocity_diff += dot(flux_in_q_point, flux_in_q_point) * fe_values.JxW(i_point);
645 
646  // divergence diff
647  diff = 0;
648  for(unsigned int i_shape=0; i_shape < ele->n_sides(); i_shape++) diff += fluxes[ i_shape ];
649  diff = ( diff / ele.measure() / cross - analytical[4]);
650  divergence_diff += diff * diff * fe_values.JxW(i_point);
651 
652  }
653 
654 
655  result.velocity_diff[ ele.idx() ] = sqrt(velocity_diff);
656  result.velocity_error[dim-1] += velocity_diff;
657  if (dim == 2 && result.velocity_mask.size() != 0 ) {
658  result.mask_vel_error += (result.velocity_mask[ ele.idx() ])? 0 : velocity_diff;
659  }
660 
661  result.pressure_diff[ ele.idx() ] = sqrt(pressure_diff);
662  result.pressure_error[dim-1] += pressure_diff;
663 
664  result.div_diff[ ele.idx() ] = sqrt(divergence_diff);
665  result.div_error[dim-1] += divergence_diff;
666 
667 }
668 
670 : fe_p0(0), fe_p1(1), order(4), quad(order),
671  fe_values(mapp,quad,fe_p0,update_JxW_values | update_quadrature_points),
672  fv_rt(mapp,quad,fe_rt,update_values | update_quadrature_points)
673 {}
674 
675 
677  DebugOut() << "l2 norm output\n";
678  ofstream os( FilePath("solution_error", FilePath::output_file) );
679 
680  FilePath source_file( "analytical_module.py", FilePath::input_file);
681  ExactSolution anal_sol_1d(5); // components: pressure, flux vector 3d, divergence
682  anal_sol_1d.set_python_field_from_file( source_file, "all_values_1d");
683 
684  ExactSolution anal_sol_2d(5);
685  anal_sol_2d.set_python_field_from_file( source_file, "all_values_2d");
686 
687  ExactSolution anal_sol_3d(5);
688  anal_sol_3d.set_python_field_from_file( source_file, "all_values_3d");
689 
692  for(unsigned int j=0; j<3; j++){
693  diff_data.pressure_error[j] = 0;
694  diff_data.velocity_error[j] = 0;
695  diff_data.div_error[j] = 0;
696  }
697 
698  //diff_data.ele_flux = &( ele_flux );
699 
700  unsigned int solution_size;
702 
703 
704  for (auto ele : mesh_->elements_range()) {
705 
706  switch (ele->dim()) {
707  case 1:
708 
709  l2_diff_local<1>( ele, fe_data_1d.fe_values, fe_data_1d.fv_rt, anal_sol_1d, diff_data);
710  break;
711  case 2:
712  l2_diff_local<2>( ele, fe_data_2d.fe_values, fe_data_2d.fv_rt, anal_sol_2d, diff_data);
713  break;
714  case 3:
715  l2_diff_local<3>( ele, fe_data_3d.fe_values, fe_data_3d.fv_rt, anal_sol_3d, diff_data);
716  break;
717  }
718  }
719 
720  // square root for L2 norm
721  for(unsigned int j=0; j<3; j++){
724  diff_data.div_error[j] = sqrt(diff_data.div_error[j]);
725  }
727 
728  os << "l2 norm output\n\n"
729  << "pressure error 1d: " << diff_data.pressure_error[0] << endl
730  << "pressure error 2d: " << diff_data.pressure_error[1] << endl
731  << "pressure error 3d: " << diff_data.pressure_error[2] << endl
732  << "velocity error 1d: " << diff_data.velocity_error[0] << endl
733  << "velocity error 2d: " << diff_data.velocity_error[1] << endl
734  << "velocity error 3d: " << diff_data.velocity_error[2] << endl
735  << "masked velocity error 2d: " << diff_data.mask_vel_error <<endl
736  << "div error 1d: " << diff_data.div_error[0] << endl
737  << "div error 2d: " << diff_data.div_error[1] << endl
738  << "div error 3d: " << diff_data.div_error[2];
739 }
740 
741 
FieldCommon::units
FieldCommon & units(const UnitSI &units)
Set basic units of the field.
Definition: field_common.hh:140
LimitSide::right
@ right
DarcyFlowMHOutput::OutputSpecificFields::OutputSpecificFields
OutputSpecificFields()
Definition: darcy_flow_mh_output.cc:112
Input::Type::Bool
Class for declaration of the input of type Bool.
Definition: type_base.hh:452
DarcyFlowMHOutput::ele_flux
VectorMPI ele_flux
Definition: darcy_flow_mh_output.hh:176
DarcyFlowMHOutput::prepare_specific_output
virtual void prepare_specific_output(Input::Record in_rec)
Definition: darcy_flow_mh_output.cc:208
fe_rt.hh
Definitions of Raviart-Thomas finite elements.
DarcyFlowMHOutput::output
void output()
Calculate values for output.
Definition: darcy_flow_mh_output.cc:250
UnitSI::dimensionless
static UnitSI & dimensionless()
Returns dimensionless unit.
Definition: unit_si.cc:55
FieldSet::set_time
bool set_time(const TimeStep &time, LimitSide limit_side)
Definition: field_set.cc:157
fe_values_views.hh
ExactSolution
FieldPython< 3, FieldValue< 3 >::Vector > ExactSolution
Definition: darcy_flow_mh_output.cc:563
FieldCommon::output_type
FieldCommon & output_type(OutputTime::DiscreteSpace rt)
Definition: field_common.hh:172
DarcyFlowMHOutput::fe_data_1d
FEData< 1 > fe_data_1d
Definition: darcy_flow_mh_output.hh:248
EquationOutput::initialize
void initialize(std::shared_ptr< OutputTime > stream, Mesh *mesh, Input::Record in_rec, const TimeGovernor &tg)
Definition: equation_output.cc:109
field_python.hh
DarcyFlowMHOutput::is_output_specific_fields
bool is_output_specific_fields
Output specific field stuff.
Definition: darcy_flow_mh_output.hh:203
DarcyFlowMHOutput::output_specific_fields
OutputSpecificFields output_specific_fields
Definition: darcy_flow_mh_output.hh:195
FEValues::reinit
void reinit(ElementAccessor< 3 > &cell)
Update cell-dependent data (gradients, Jacobians etc.)
Definition: fe_values.cc:528
FEValuesBase::point
arma::vec::fixed< spacedim > point(const unsigned int point_no)
Return coordinates of the quadrature point in the actual cell system.
Definition: fe_values.hh:347
Element::dim
unsigned int dim() const
Definition: elements.h:124
Mesh::elements_range
virtual Range< ElementAccessor< 3 > > elements_range() const
Returns range of bulk elements.
Definition: mesh.cc:1116
Mesh::n_sides
unsigned int n_sides() const
Definition: mesh.cc:227
DarcyFlowMHOutput::compute_l2_difference
void compute_l2_difference()
Definition: darcy_flow_mh_output.cc:676
DarcyFlowMHOutput::make_element_vector
void make_element_vector(ElementSetRef element_indices)
Definition: darcy_flow_mh_output.cc:344
Input::Record::val
const Ret val(const string &key) const
Definition: accessors_impl.hh:31
EquationBase::data
FieldSet & data()
Definition: equation.hh:191
EquationBase::time
TimeGovernor & time()
Definition: equation.hh:146
DarcyFlowMHOutput::prepare_output
virtual void prepare_output(Input::Record in_rec)
Definition: darcy_flow_mh_output.cc:166
fe_values.hh
Class FEValues calculates finite element data on the actual cells such as shape function values,...
FilePath
Dedicated class for storing path to input and output files.
Definition: file_path.hh:54
VectorMPI::resize
void resize(unsigned int local_size)
Definition: vector_mpi.hh:76
DarcyFlowMHOutput::ElementSetRef
const typedef vector< unsigned int > & ElementSetRef
Definition: darcy_flow_mh_output.hh:116
field_set.hh
update_values
@ update_values
Shape function values.
Definition: update_flags.hh:87
EquationOutput::is_field_output_time
bool is_field_output_time(const FieldCommon &field, TimeStep step) const
Definition: equation_output.cc:174
MH_DofHandler::side_flux
double side_flux(const Side &side) const
temporary replacement for DofHandler accessor, flux through given side
Definition: mh_dofhandler.cc:273
DarcyFlowMHOutput::ele_pressure_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > ele_pressure_ptr
Field of pressure head in barycenters of elements.
Definition: darcy_flow_mh_output.hh:180
DarcyFlowMHOutput::FEData::fe_p1
FE_P_disc< dim > fe_p1
Definition: darcy_flow_mh_output.hh:234
std::vector< double >
DarcyFlowMHOutput::l2_diff_local
void l2_diff_local(ElementAccessor< 3 > &ele, FEValues< dim, 3 > &fe_values, FEValues< dim, 3 > &fv_rt, FieldPython< 3, FieldValue< 3 >::Vector > &anal_sol, DiffData &result)
Computes L2 error on an element.
ElementAccessor< 3 >
Input::Type::FileName::output
static FileName output()
The factory function for declaring type FileName for input files.
Definition: type_base.cc:532
system.hh
update_quadrature_points
@ update_quadrature_points
Transformed quadrature points.
Definition: update_flags.hh:102
DarcyFlowMHOutput::mesh_
Mesh * mesh_
Definition: darcy_flow_mh_output.hh:160
arma::vec3
Definition: doxy_dummy_defs.hh:17
FieldCommon::flags
FieldCommon & flags(FieldFlag::Flags::Mask mask)
Definition: field_common.hh:179
ElementAccessor::node
const Node * node(unsigned int ni) const
Definition: accessors.hh:145
field_fe.hh
DarcyFlowMHOutput::corner_pressure
VectorMPI corner_pressure
Definition: darcy_flow_mh_output.hh:167
dofhandler.hh
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
DarcyFlowMHOutput::make_corner_scalar
void make_corner_scalar(vector< double > &node_scalar)
Definition: darcy_flow_mh_output.cc:362
fmt::format
std::string format(CStringRef format_str, ArgList args)
Definition: format.h:3141
FilePath::open_stream
void open_stream(Stream &stream) const
Definition: file_path.cc:211
DarcyFlowMHOutput::output_stream
std::shared_ptr< OutputTime > output_stream
Definition: darcy_flow_mh_output.hh:197
flow
Definition: output_msh.hh:24
darcy_flow_assembly.hh
DarcyFlowMHOutput::FEData::fe_values
FEValues< dim, 3 > fe_values
Definition: darcy_flow_mh_output.hh:241
DarcyFlowMHOutput::OutputSpecificFields::pressure_diff
Field< 3, FieldValue< 3 >::Scalar > pressure_diff
Definition: darcy_flow_mh_output.hh:98
FieldFlag::equation_external_output
static constexpr Mask equation_external_output
Match an output field, that can be also copy of other field.
Definition: field_flag.hh:58
DarcyFlowMHOutput::OutputFields
Standard quantities for output in DarcyFlowMH.
Definition: darcy_flow_mh_output.hh:79
DarcyFlowMHOutput::dh_
std::shared_ptr< DOFHandlerMultiDim > dh_
Definition: darcy_flow_mh_output.hh:190
DarcyFlowMHOutput::OutputFields::region_id
Field< 3, FieldValue< 3 >::Scalar > region_id
Definition: darcy_flow_mh_output.hh:89
MPI_Comm_rank
#define MPI_Comm_rank
Definition: mpi.h:236
FEValues< dim, 3 >
EquationOutput::make_output_type
const Input::Type::Instance & make_output_type(const string &equation_name, const string &aditional_description="")
Definition: equation_output.cc:92
fe_p.hh
Definitions of basic Lagrangean finite elements with polynomial shape functions.
DarcyFlowMHOutput::DiffData::data_
DarcyMH::EqData * data_
Definition: darcy_flow_mh_output.hh:222
Node::getX
double getX() const
Definition: nodes.hh:56
DarcyMH::EqData
Definition: darcy_flow_mh.hh:149
DarcyFlowMHOutput::fe_data_3d
FEData< 3 > fe_data_3d
Definition: darcy_flow_mh_output.hh:250
Input::Type::Default
Class Input::Type::Default specifies default value of keys of a Input::Type::Record.
Definition: type_record.hh:61
MH_DofHandler::side_scalar
double side_scalar(const Side &side) const
temporary replacement for DofHandler accessor, scalar (pressure) on edge of the side
Definition: mh_dofhandler.cc:278
DarcyFlowMHOutput::ds
std::shared_ptr< DiscreteSpace > ds
Definition: darcy_flow_mh_output.hh:192
DarcyFlowMHOutput::DiffData::div_diff_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > div_diff_ptr
Definition: darcy_flow_mh_output.hh:215
accessors.hh
DarcyFlowMHOutput::DiffData::velocity_error
double velocity_error[3]
Definition: darcy_flow_mh_output.hh:205
DarcyFlowMHOutput::output_fields
OutputFields output_fields
Definition: darcy_flow_mh_output.hh:194
DarcyFlowMHOutput::DiffData::mask_vel_error
double mask_vel_error
Definition: darcy_flow_mh_output.hh:206
DarcyFlowMHOutput::all_element_idx_
std::vector< unsigned int > all_element_idx_
Definition: darcy_flow_mh_output.hh:185
Input::Record
Accessor to the data with type Type::Record.
Definition: accessors.hh:291
FieldFlag::equation_result
static constexpr Mask equation_result
Match result fields. These are never given by input or copy of input.
Definition: field_flag.hh:55
sys_profiler.hh
darcy_flow_mh_output.hh
Output class for darcy_flow_mh model.
DarcyFlowMHOutput::OutputSpecificFields
Specific quantities for output in DarcyFlowMH - error estimates etc.
Definition: darcy_flow_mh_output.hh:93
TimeGovernor::get_unit_string
std::string get_unit_string() const
Definition: time_governor.cc:785
quadrature_lib.hh
Definitions of particular quadrature rules on simplices.
DOFHandlerMultiDim
Provides the numbering of the finite element degrees of freedom on the computational mesh.
Definition: dofhandler.hh:152
DarcyFlowMHOutput::FEData::fv_rt
FEValues< dim, 3 > fv_rt
Definition: darcy_flow_mh_output.hh:245
DarcyFlowMHOutput::make_node_scalar_param
void make_node_scalar_param(ElementSetRef element_indices)
Calculate nodes scalar, store it in double* node_scalars instead of node->scalar.
Definition: darcy_flow_mh_output.cc:399
DarcyFlowMHOutput::DiffData::vel_diff_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > vel_diff_ptr
Definition: darcy_flow_mh_output.hh:214
mixed_mesh_intersections.hh
EquationOutput
Definition: equation_output.hh:40
INPUT_CATCH
#define INPUT_CATCH(ExceptionType, AddressEITag, input_accessor)
Definition: accessors.hh:63
DarcyFlowMHOutput::OutputSpecificFields::velocity_diff
Field< 3, FieldValue< 3 >::Scalar > velocity_diff
Definition: darcy_flow_mh_output.hh:97
TimeGovernor::step
const TimeStep & step(int index=-1) const
Definition: time_governor.cc:726
DarcyFlowMHOutput::OutputFields::field_ele_flux
Field< 3, FieldValue< 3 >::VectorFixed > field_ele_flux
Definition: darcy_flow_mh_output.hh:87
output_time.hh
DarcyFlowMHOutput::OutputSpecificFields::div_diff
Field< 3, FieldValue< 3 >::Scalar > div_diff
Definition: darcy_flow_mh_output.hh:99
DOFHandlerMultiDim::distribute_dofs
void distribute_dofs(std::shared_ptr< DiscreteSpace > ds)
Distributes degrees of freedom on the mesh needed for the given discrete space.
Definition: dofhandler.cc:242
DarcyFlowMHOutput::OutputFields::OutputFields
OutputFields()
Definition: darcy_flow_mh_output.cc:85
FEValuesBase::JxW
double JxW(const unsigned int point_no)
Return the product of Jacobian determinant and the quadrature weight at given quadrature point.
Definition: fe_values.hh:336
field_values.hh
GenericField::subdomain
static auto subdomain(Mesh &mesh) -> IndexField
Definition: generic_field.impl.hh:57
UnitSI
Class for representation SI units of Fields.
Definition: unit_si.hh:40
Mesh::region_db
const RegionDB & region_db() const
Definition: mesh.h:147
DarcyFlowMHOutput::get_input_type
static const Input::Type::Instance & get_input_type()
Definition: darcy_flow_mh_output.cc:60
RegionDB::get_region_set
RegionSet get_region_set(const std::string &set_name) const
Definition: region.cc:328
DarcyFlowMHOutput::DiffData::pressure_diff_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > pressure_diff_ptr
Definition: darcy_flow_mh_output.hh:213
RefElement::oposite_node
static unsigned int oposite_node(unsigned int sid)
Definition: ref_element.cc:308
EquationOutput::get_input_type
static Input::Type::Record & get_input_type()
Definition: equation_output.cc:22
DarcyFlowMHOutput::ele_pressure
VectorMPI ele_pressure
Definition: darcy_flow_mh_output.hh:169
Input::Record::opt_val
bool opt_val(const string &key, Ret &value) const
Definition: accessors_impl.hh:107
DOFHandlerMultiDim::sequential
std::shared_ptr< DOFHandlerMultiDim > sequential()
Returns sequential version of the current dof handler.
Definition: dofhandler.cc:54
Input::Type::Instance
Helper class that stores data of generic types.
Definition: type_generic.hh:89
Input::Type::Record::declare_key
Record & declare_key(const string &key, std::shared_ptr< TypeBase > type, const Default &default_value, const string &description, TypeBase::attribute_map key_attributes=TypeBase::attribute_map())
Declares a new key of the Record.
Definition: type_record.cc:501
FEValuesBase::vector_view
const FEValuesViews::Vector< dim, spacedim > & vector_view(unsigned int i) const
Accessor to vector values of multicomponent FE.
Definition: fe_values.hh:388
Node::point
arma::vec3 & point()
Definition: nodes.hh:67
DarcyFlowMHOutput::DiffData::div_diff
VectorMPI div_diff
Definition: darcy_flow_mh_output.hh:209
DarcyFlowMHOutput::DiffData::div_error
double div_error[3]
Definition: darcy_flow_mh_output.hh:205
DarcyFlowMHOutput::get_input_type_specific
static const Input::Type::Instance & get_input_type_specific()
Definition: darcy_flow_mh_output.cc:68
mesh.h
DarcyFlowMHOutput::fe_data_2d
FEData< 2 > fe_data_2d
Definition: darcy_flow_mh_output.hh:249
DarcyFlowMHOutput::output_internal_flow_data
void output_internal_flow_data()
Definition: darcy_flow_mh_output.cc:521
DarcyFlowMHOutput::OutputFields::field_ele_piezo_head
Field< 3, FieldValue< 3 >::Scalar > field_ele_piezo_head
Definition: darcy_flow_mh_output.hh:86
Input::Record::find
Iterator< Ret > find(const string &key) const
Definition: accessors_impl.hh:91
Input::Type::Record::close
Record & close() const
Close the Record for further declarations of keys.
Definition: type_record.cc:303
generic_field.hh
DarcyFlowMHOutput::DiffData
Definition: darcy_flow_mh_output.hh:204
Side::side_idx
unsigned int side_idx() const
Definition: side_impl.hh:82
Field::set_field
void set_field(const RegionSet &domain, FieldBasePtr field, double time=0.0)
Definition: field.impl.hh:196
DarcyFlowMHOutput::DiffData::dh
const MH_DofHandler * dh
Definition: darcy_flow_mh_output.hh:218
Input::Type
Definition: balance.hh:38
partitioning.hh
Node::getZ
double getZ() const
Definition: nodes.hh:60
Input::Type::Record
Record type proxy class.
Definition: type_record.hh:182
DarcyMH::data_
std::shared_ptr< EqData > data_
Definition: darcy_flow_mh.hh:377
DarcyFlowMHOutput::DiffData::darcy
DarcyMH * darcy
Definition: darcy_flow_mh_output.hh:221
Field::value
virtual const Value::return_type & value(const Point &p, const ElementAccessor< spacedim > &elm) const
Definition: field.hh:392
observe.hh
GenericField::region_id
static auto region_id(Mesh &mesh) -> IndexField
Definition: generic_field.impl.hh:38
DarcyFlowMHOutput::raw_output_file
ofstream raw_output_file
Raw data output file.
Definition: darcy_flow_mh_output.hh:200
Node::getY
double getY() const
Definition: nodes.hh:58
EquationOutput::output
void output(TimeStep step)
Definition: equation_output.cc:186
DarcyFlowMHOutput::OutputFields::field_node_pressure
Field< 3, FieldValue< 3 >::Scalar > field_node_pressure
Definition: darcy_flow_mh_output.hh:85
FieldPython
Definition: field_python.hh:46
MixedMeshIntersections::intersection_storage12_
std::vector< IntersectionLocal< 1, 2 > > intersection_storage12_
Stores 1D-2D intersections.
Definition: mixed_mesh_intersections.hh:74
DarcyFlowMHOutput::diff_data
struct DarcyFlowMHOutput::DiffData diff_data
OutputTime::NODE_DATA
@ NODE_DATA
Definition: output_time.hh:105
Element::n_sides
unsigned int n_sides() const
Definition: elements.h:135
DarcyFlowMHOutput::DiffData::solution
double * solution
Definition: darcy_flow_mh_output.hh:217
Input::Type::Record::copy_keys
Record & copy_keys(const Record &other)
Copy keys from other record.
Definition: type_record.cc:215
DarcyFlowMHOutput::ele_piezo_head
VectorMPI ele_piezo_head
Definition: darcy_flow_mh_output.hh:171
DarcyFlowMHOutput::DiffData::velocity_mask
std::vector< int > velocity_mask
Definition: darcy_flow_mh_output.hh:220
MH_DofHandler::element_scalar
double element_scalar(ElementAccessor< 3 > &ele) const
temporary replacement for DofHandler accessor, scalar (pressure) on element
Definition: mh_dofhandler.cc:284
Input::Array
Accessor to input data conforming to declared Array.
Definition: accessors.hh:566
global_defs.h
Global macros to enhance readability and debugging, general constants.
FieldSet::set_mesh
void set_mesh(const Mesh &mesh)
Definition: field_set.hh:183
FilePath::input_file
@ input_file
Definition: file_path.hh:68
fe_value_handler.hh
DarcyFlowMHOutput::ele_flux_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed > > ele_flux_ptr
Field of flux in barycenter of every element.
Definition: darcy_flow_mh_output.hh:182
DarcyFlowMHOutput::compute_errors_
bool compute_errors_
Specific experimental error computing.
Definition: darcy_flow_mh_output.hh:163
NodeAccessor
Definition: mesh.h:54
IntersectionLocal< 1, 2 >
darcy_flow_mh.hh
mixed-hybrid model of linear Darcy flow, possibly unsteady.
update_JxW_values
@ update_JxW_values
Transformed quadrature weights.
Definition: update_flags.hh:114
DarcyFlowMHOutput::ele_piezo_head_ptr
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > ele_piezo_head_ptr
Field of piezo-metric head in barycenters of elements.
Definition: darcy_flow_mh_output.hh:181
EquationOutput::make_output_type_from_record
const Input::Type::Instance & make_output_type_from_record(Input::Type::Record &in_rec, const string &equation_name, const string &aditional_description="")
Definition: equation_output.cc:97
MPI_COMM_WORLD
#define MPI_COMM_WORLD
Definition: mpi.h:123
DarcyMH::NoMortar
@ NoMortar
Definition: darcy_flow_mh.hh:141
OutputTime::create_output_stream
static std::shared_ptr< OutputTime > create_output_stream(const std::string &equation_name, const Input::Record &in_rec, std::string unit_str)
This method delete all object instances of class OutputTime stored in output_streams vector.
Definition: output_time.cc:185
DarcyMH::EqData::mortar_method_
MortarMethod mortar_method_
Definition: darcy_flow_mh.hh:199
FieldPython::value
virtual const Value::return_type & value(const Point &p, const ElementAccessor< spacedim > &elm)
Definition: field_python.impl.hh:158
ElementAccessor::idx
unsigned int idx() const
Return local idx of element in boundary / bulk part of element vector.
Definition: accessors.hh:111
DarcyFlowMHOutput::DarcyFlowMHOutput
DarcyFlowMHOutput(DarcyMH *flow, Input::Record in_rec)
Definition: darcy_flow_mh_output.cc:126
FilePath::output_file
@ output_file
Definition: file_path.hh:69
fill_output_data
void fill_output_data(VectorMPI &vec_seq, std::shared_ptr< FieldFE< spacedim, Value > > field_ptr)
Definition: field_fe.hh:309
long_idx.hh
mapping_p1.hh
Class MappingP1 implements the affine transformation of the unit cell onto the actual cell.
DarcyFlowMHOutput::OutputFields::subdomain
Field< 3, FieldValue< 3 >::Scalar > subdomain
Definition: darcy_flow_mh_output.hh:88
FieldPython::set_python_field_from_file
void set_python_field_from_file(const FilePath &file_name, const string &func_name)
Definition: field_python.impl.hh:109
DarcyFlowMHOutput::~DarcyFlowMHOutput
virtual ~DarcyFlowMHOutput()
Definition: darcy_flow_mh_output.cc:238
DarcyFlowMHOutput::darcy_flow
DarcyMH * darcy_flow
Definition: darcy_flow_mh_output.hh:159
FieldCommon::description
FieldCommon & description(const string &description)
Definition: field_common.hh:115
DarcyMH::get_mh_dofhandler
const MH_DofHandler & get_mh_dofhandler() override
Definition: darcy_flow_mh.hh:224
Mesh::n_elements
virtual unsigned int n_elements(bool boundary=false) const
Returns count of boundary or bulk elements.
Definition: mesh.h:355
DarcyFlowMHOutput::DiffData::pressure_error
double pressure_error[3]
Definition: darcy_flow_mh_output.hh:205
Mesh::mixed_intersections
MixedMeshIntersections & mixed_intersections()
Definition: mesh.cc:785
DebugOut
#define DebugOut()
Macro defining 'debug' record of log.
Definition: logger.hh:252
ElementAccessor::side
SideIter side(const unsigned int loc_index)
Definition: accessors.hh:137
DarcyFlowMHOutput::FEData::FEData
FEData()
Definition: darcy_flow_mh_output.cc:669
Mesh::element_accessor
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
Definition: mesh.cc:802
Input::Type::Default::optional
static Default optional()
The factory function to make an empty default value which is optional.
Definition: type_record.hh:124
DarcyMH
Mixed-hybrid model of linear Darcy flow, possibly unsteady.
Definition: darcy_flow_mh.hh:126
DarcyMH::EqData::cross_section
Field< 3, FieldValue< 3 >::Scalar > cross_section
Definition: darcy_flow_mh.hh:172
DarcyMH::EqData::conductivity
Field< 3, FieldValue< 3 >::Scalar > conductivity
Definition: darcy_flow_mh.hh:171
DarcyFlowMHOutput::OutputFields::field_ele_pressure
Field< 3, FieldValue< 3 >::Scalar > field_ele_pressure
Definition: darcy_flow_mh_output.hh:84
Mesh::n_nodes
virtual unsigned int n_nodes() const
Definition: mesh.h:133
DarcyMH::get_solution_vector
void get_solution_vector(double *&vec, unsigned int &vec_size) override
Definition: darcy_flow_mh.cc:666
START_TIMER
#define START_TIMER(tag)
Starts a timer with specified tag.
Definition: sys_profiler.hh:119
FEValuesBase::n_points
unsigned int n_points()
Returns the number of quadrature points.
Definition: fe_values.hh:407
NodeAccessor::idx
unsigned int idx() const
Definition: node_accessor.hh:53
DarcyFlowMHOutput::make_element_scalar
void make_element_scalar(ElementSetRef element_indices)
Definition: darcy_flow_mh_output.cc:322
SideIter
Definition: sides.h:131
DarcyFlowMHOutput::DiffData::velocity_diff
VectorMPI velocity_diff
Definition: darcy_flow_mh_output.hh:208
MH_DofHandler
Definition: mh_dofhandler.hh:43
DarcyFlowMHOutput::fe0
FE_P_disc< 0 > fe0
Definition: darcy_flow_mh_output.hh:191
ElementAccessor::measure
double measure() const
Computes the measure of the element.
Definition: accessors.hh:254
Element::n_nodes
unsigned int n_nodes() const
Definition: elements.h:129
DarcyFlowMHOutput::DiffData::pressure_diff
VectorMPI pressure_diff
Definition: darcy_flow_mh_output.hh:207
FieldCommon::name
FieldCommon & name(const string &name)
Definition: field_common.hh:108
range_wrapper.hh
Implementation of range helper class.
ElementAccessor::centre
arma::vec::fixed< spacedim > centre() const
Computes the barycenter.
Definition: accessors.hh:285
MessageOut
#define MessageOut()
Macro defining 'message' record of log.
Definition: logger.hh:243
intersection_local.hh
Classes with algorithms for computation of intersections of meshes.
node_accessor.hh
TimeGovernor::t
double t() const
Definition: time_governor.hh:519