3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Member Functions | List of all members
Dumux::TwoPGridDataTransfer< TypeTag > Class Template Reference

Class performing the transfer of data on a grid from before to after adaptation. More...

#include <dumux/porousmediumflow/2p/griddatatransfer.hh>

Inheritance diagram for Dumux::TwoPGridDataTransfer< TypeTag >:
Inheritance graph

Description

template<class TypeTag>
class Dumux::TwoPGridDataTransfer< TypeTag >

Class performing the transfer of data on a grid from before to after adaptation.

Public Member Functions

 TwoPGridDataTransfer (std::shared_ptr< const Problem > problem, std::shared_ptr< GridGeometry > gridGeometry, std::shared_ptr< const GridVariables > gridVariables, SolutionVector &sol)
 Constructor. More...
 
void store () override
 Stores primary variables and additional data. More...
 
void reconstruct () override
 Reconstruct missing primary variables (where elements are created/deleted) More...
 

Constructor & Destructor Documentation

◆ TwoPGridDataTransfer()

template<class TypeTag >
Dumux::TwoPGridDataTransfer< TypeTag >::TwoPGridDataTransfer ( std::shared_ptr< const Problem >  problem,
std::shared_ptr< GridGeometry >  gridGeometry,
std::shared_ptr< const GridVariables >  gridVariables,
SolutionVector &  sol 
)
inline

Constructor.

Parameters
problemThe DuMuX problem to be solved
gridGeometryThe finite volume grid geometry
gridVariablesThe secondary variables on the grid
solThe solution (primary variables) on the grid

Member Function Documentation

◆ reconstruct()

template<class TypeTag >
void Dumux::TwoPGridDataTransfer< TypeTag >::reconstruct ( )
inlineoverridevirtual

Reconstruct missing primary variables (where elements are created/deleted)

To reconstruct the solution in father elements, problem properties might need to be accessed. Starting from the lowest level, the old solution is mapped on the new grid: Where coarsened, new cells get information from old father element. Where refined, a new solution is reconstructed from the old father cell, and then a new son is created. That is then stored into the general data structure (AdaptedValues).

TODO: fix adaptive simulations in parallel

Implements Dumux::GridDataTransfer.

◆ store()

template<class TypeTag >
void Dumux::TwoPGridDataTransfer< TypeTag >::store ( )
inlineoverridevirtual

Stores primary variables and additional data.

To reconstruct the solution in father elements, problem properties might need to be accessed. From upper level on downwards, the old solution is stored into a container object, before the grid is adapted. Father elements hold averaged information from the son cells for the case of the sons being coarsened.

Implements Dumux::GridDataTransfer.


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