Flow123d  release_3.0.0-875-gdc24e59
Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
DarcyFlowMHOutput Class Reference

#include <darcy_flow_mh_output.hh>

Collaboration diagram for DarcyFlowMHOutput:
Collaboration graph
[legend]

Classes

struct  DiffData
 
struct  FEData
 
class  OutputFields
 Standard quantities for output in DarcyFlowMH. More...
 
class  OutputSpecificFields
 Specific quantities for output in DarcyFlowMH - error estimates etc. More...
 

Public Member Functions

 DarcyFlowMHOutput (DarcyMH *flow, Input::Record in_rec)
 
virtual ~DarcyFlowMHOutput ()
 
void output ()
 Calculate values for output. More...
 
template<int dim>
void l2_diff_local (ElementAccessor< 3 > &ele, FEValues< dim, 3 > &fe_values, FEValues< dim, 3 > &fv_rt, ExactSolution &anal_sol, DarcyFlowMHOutput::DiffData &result)
 

Static Public Member Functions

static const Input::Type::Instanceget_input_type ()
 
static const Input::Type::Instanceget_input_type_specific ()
 

Protected Types

typedef const vector< unsigned int > & ElementSetRef
 

Protected Member Functions

virtual void prepare_output (Input::Record in_rec)
 
virtual void prepare_specific_output (Input::Record in_rec)
 
void make_side_flux ()
 
void make_element_scalar (ElementSetRef element_indices)
 
void make_element_vector (ElementSetRef element_indices)
 
void make_node_scalar_param (ElementSetRef element_indices)
 Calculate nodes scalar, store it in double* node_scalars instead of node->scalar. More...
 
void make_corner_scalar (vector< double > &node_scalar)
 
void output_internal_flow_data ()
 
void compute_l2_difference ()
 
template<int dim>
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. More...
 

Protected Attributes

DarcyMHdarcy_flow
 
Meshmesh_
 
bool compute_errors_
 Specific experimental error computing. More...
 
VectorMPI corner_pressure
 
VectorMPI ele_pressure
 
VectorMPI ele_piezo_head
 
VectorMPI ele_flux
 
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > ele_pressure_ptr
 Field of pressure head in barycenters of elements. More...
 
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > ele_piezo_head_ptr
 Field of piezo-metric head in barycenters of elements. More...
 
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed > > ele_flux_ptr
 Field of flux in barycenter of every element. More...
 
std::vector< unsigned int > all_element_idx_
 
std::vector< double > l2_diff_pressure
 
std::vector< double > l2_diff_velocity
 
std::vector< double > l2_diff_divergence
 
std::shared_ptr< DOFHandlerMultiDimdh_
 
FE_P_disc< 0 > fe0
 
std::shared_ptr< DiscreteSpaceds
 
OutputFields output_fields
 
OutputSpecificFields output_specific_fields
 
std::shared_ptr< OutputTimeoutput_stream
 
ofstream raw_output_file
 Raw data output file. More...
 
bool is_output_specific_fields
 Output specific field stuff. More...
 
struct DarcyFlowMHOutput::DiffData diff_data
 
FEData< 1 > fe_data_1d
 
FEData< 2 > fe_data_2d
 
FEData< 3 > fe_data_3d
 

Detailed Description

Actually this class only collect former code from postprocess.* This code depends on values stored in mesh and has to be changed to use fields or other data provided by interface to darcy_flow. We have to relay on the interface in order to allow different implementation of darcy_flow.

Principal functionalities of current postprocess are:

Further functionality of this class should be:

Definition at line 75 of file darcy_flow_mh_output.hh.

Member Typedef Documentation

typedef const vector<unsigned int>& DarcyFlowMHOutput::ElementSetRef
protected

Definition at line 116 of file darcy_flow_mh_output.hh.

Constructor & Destructor Documentation

DarcyFlowMHOutput::DarcyFlowMHOutput ( DarcyMH flow,
Input::Record  in_rec 
)

Definition at line 126 of file darcy_flow_mh_output.cc.

DarcyFlowMHOutput::~DarcyFlowMHOutput ( )
virtual

Definition at line 238 of file darcy_flow_mh_output.cc.

Member Function Documentation

void DarcyFlowMHOutput::compute_l2_difference ( )
protected

Temporary hack. Calculate approximation of L2 norm for: 1) difference between regularized pressure and analytical solution (using FunctionPython) 2) difference between RT velocities and analytical solution 3) difference of divergence

TODO: 1) implement field objects 2) implement DG_P2 finite elements 3) implement pressure postprocessing (result is DG_P2 field) 4) implement calculation of L2 norm for two field (compute the norm and values on individual elements as P0 field)

Definition at line 676 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

const it::Instance & DarcyFlowMHOutput::get_input_type ( )
static

Definition at line 60 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

const it::Instance & DarcyFlowMHOutput::get_input_type_specific ( )
static

Definition at line 68 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

template<int dim>
void DarcyFlowMHOutput::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 
)
protected

Computes L2 error on an element.

template<int dim>
void DarcyFlowMHOutput::l2_diff_local ( ElementAccessor< 3 > &  ele,
FEValues< dim, 3 > &  fe_values,
FEValues< dim, 3 > &  fv_rt,
ExactSolution anal_sol,
DarcyFlowMHOutput::DiffData result 
)

Definition at line 573 of file darcy_flow_mh_output.cc.

void DarcyFlowMHOutput::make_corner_scalar ( vector< double > &  node_scalar)
protected

Definition at line 362 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::make_element_scalar ( ElementSetRef  element_indices)
protected

Definition at line 322 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::make_element_vector ( ElementSetRef  element_indices)
protected

Computes fluxes at the barycenters of elements. TODO: We use FEValues to get fluxes at the barycenters of elements, but we still use MHDofHandler. Once we are able to make output routines parallel, we can use simply FieldFE for velocity here.

Definition at line 344 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::make_node_scalar_param ( ElementSetRef  element_indices)
protected

Calculate nodes scalar, store it in double* node_scalars instead of node->scalar.

< tmp variable for storing particular distance node –> element, node –> side*/

Accessors

< number of nodes in the mesh */

< index of each node */

< sum elements joined to node */

< sum sides joined to node */

< sum distances to all joined elements */

< Sum distances to all joined sides */

tmp variables, will be replaced by ini keys TODO include them into ini file

< scalar is counted via elements*/

< scalar is counted via sides */

init arrays

first pass - calculate sums (weights)

< get NodeAccessor from element */

< get nod index from mesh */

< get NodeAccessor from element */

< get nod index from mesh */

second pass - calculate scalar

< get NodeAccessor from element */

< get nod index from mesh */

TODO - calculate it again or store it in prior pass

< get NodeAccessor from element */

< get nod index from mesh */

TODO - calculate it again or store it in prior pass

free memory

Definition at line 399 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::make_side_flux ( )
protected
void DarcyFlowMHOutput::output ( )

Calculate values for output.

Definition at line 250 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::output_internal_flow_data ( )
protected

Definition at line 521 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::prepare_output ( Input::Record  in_rec)
protectedvirtual

Definition at line 166 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

void DarcyFlowMHOutput::prepare_specific_output ( Input::Record  in_rec)
protectedvirtual

Definition at line 208 of file darcy_flow_mh_output.cc.

Here is the caller graph for this function:

Member Data Documentation

std::vector<unsigned int> DarcyFlowMHOutput::all_element_idx_
protected

Definition at line 185 of file darcy_flow_mh_output.hh.

bool DarcyFlowMHOutput::compute_errors_
protected

Specific experimental error computing.

Definition at line 163 of file darcy_flow_mh_output.hh.

VectorMPI DarcyFlowMHOutput::corner_pressure
protected

Pressure head (in [m]) interpolated into nodes. Provides P1 approximation. Indexed by element-node numbering.

Definition at line 167 of file darcy_flow_mh_output.hh.

DarcyMH* DarcyFlowMHOutput::darcy_flow
protected

Definition at line 159 of file darcy_flow_mh_output.hh.

std::shared_ptr<DOFHandlerMultiDim> DarcyFlowMHOutput::dh_
protected

Definition at line 190 of file darcy_flow_mh_output.hh.

struct DarcyFlowMHOutput::DiffData DarcyFlowMHOutput::diff_data
protected
std::shared_ptr<DiscreteSpace> DarcyFlowMHOutput::ds
protected

Definition at line 192 of file darcy_flow_mh_output.hh.

VectorMPI DarcyFlowMHOutput::ele_flux
protected

Average flux in barycenter of every element. Indexed as elements in the mesh.

Definition at line 176 of file darcy_flow_mh_output.hh.

std::shared_ptr<FieldFE<3, FieldValue<3>::VectorFixed> > DarcyFlowMHOutput::ele_flux_ptr
protected

Field of flux in barycenter of every element.

Definition at line 182 of file darcy_flow_mh_output.hh.

VectorMPI DarcyFlowMHOutput::ele_piezo_head
protected

Piezo-metric head (in [m]) in barycenter of elements (or equivalently mean pressure over every element). Indexed by element indexes in the mesh.

Definition at line 171 of file darcy_flow_mh_output.hh.

std::shared_ptr<FieldFE<3, FieldValue<3>::Scalar> > DarcyFlowMHOutput::ele_piezo_head_ptr
protected

Field of piezo-metric head in barycenters of elements.

Definition at line 181 of file darcy_flow_mh_output.hh.

VectorMPI DarcyFlowMHOutput::ele_pressure
protected

Pressure head (in [m]) in barycenters of elements (or equivalently mean pressure over every element). Indexed by element indexes in the mesh.

Definition at line 169 of file darcy_flow_mh_output.hh.

std::shared_ptr<FieldFE<3, FieldValue<3>::Scalar> > DarcyFlowMHOutput::ele_pressure_ptr
protected

Field of pressure head in barycenters of elements.

Definition at line 180 of file darcy_flow_mh_output.hh.

FE_P_disc<0> DarcyFlowMHOutput::fe0
protected

Definition at line 191 of file darcy_flow_mh_output.hh.

FEData<1> DarcyFlowMHOutput::fe_data_1d
protected

Definition at line 248 of file darcy_flow_mh_output.hh.

FEData<2> DarcyFlowMHOutput::fe_data_2d
protected

Definition at line 249 of file darcy_flow_mh_output.hh.

FEData<3> DarcyFlowMHOutput::fe_data_3d
protected

Definition at line 250 of file darcy_flow_mh_output.hh.

bool DarcyFlowMHOutput::is_output_specific_fields
protected

Output specific field stuff.

Definition at line 203 of file darcy_flow_mh_output.hh.

std::vector<double> DarcyFlowMHOutput::l2_diff_divergence
protected

Definition at line 188 of file darcy_flow_mh_output.hh.

std::vector<double> DarcyFlowMHOutput::l2_diff_pressure
protected

Definition at line 188 of file darcy_flow_mh_output.hh.

std::vector<double> DarcyFlowMHOutput::l2_diff_velocity
protected

Definition at line 188 of file darcy_flow_mh_output.hh.

Mesh* DarcyFlowMHOutput::mesh_
protected

Definition at line 160 of file darcy_flow_mh_output.hh.

OutputFields DarcyFlowMHOutput::output_fields
protected

Definition at line 194 of file darcy_flow_mh_output.hh.

OutputSpecificFields DarcyFlowMHOutput::output_specific_fields
protected

Definition at line 195 of file darcy_flow_mh_output.hh.

std::shared_ptr<OutputTime> DarcyFlowMHOutput::output_stream
protected

Definition at line 197 of file darcy_flow_mh_output.hh.

ofstream DarcyFlowMHOutput::raw_output_file
protected

Raw data output file.

Definition at line 200 of file darcy_flow_mh_output.hh.


The documentation for this class was generated from the following files: