Electrowetting on dielectric
Classes | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
Pressure< dim > Class Template Reference
Inheritance diagram for Pressure< dim >:
Inheritance graph
[legend]
Collaboration diagram for Pressure< dim >:
Collaboration graph
[legend]

List of all members.

Classes

struct  ScratchData

Public Member Functions

 Pressure (const Triangulation< dim > &tria, Material_Parameters &params, const unsigned deg, const double ee, const double thres, const unsigned sweeps)
virtual ~Pressure ()

Public Attributes

AsFunction< dim > get_pressure
 pressure $p^{k+1}$
AsFunction< dim > get_extrapolated_pressure
 extrapolated pressure $p^k-p^{k-1}$

Protected Types

typedef IteratorGroup
< 2, typename hp::DoFHandler
< dim >::active_cell_iterator > 
Iterator

Protected Member Functions

virtual void SetupDoFsSuffix ()
virtual void InitLADataSuffix ()
virtual void AssembleSystem (std::vector< AsFunction< dim > * > &data, const double time, const bool m_threaded=true)
void AssembleCell (const Iterator Its, ScratchData &scratch, typename Problem< dim >::PerTaskData &data)
virtual void ReinitPrec ()
virtual void DoSolve (SolverControl &control)
virtual void SolveSystemSuffix ()
virtual void SetInitialData ()
virtual void PreRefinementPreffix ()
virtual void PostRefinementSuffix (const std::vector< TrilinosWrappers::Vector > &sol_tmp)

Protected Attributes

const double rho_min
 Penalization parameter.
TrilinosWrappers::PreconditionAMG prec
 Preconditioner (AMG)
TrilinosWrappers::PreconditionAMG::AdditionalData prec_data
 Preconditioner data.
TrilinosWrappers::Vector p
 pressure
TrilinosWrappers::Vector pres_extr
 extrapolated pressure $=2p^k - p^{k-1}$.

Detailed Description

template<int dim>
class Pressure< dim >

The elliptic problem that determines the pressure. After time discretization, at each time step, we solve

\[ \Delta \xi^{k+1} = \frac{\varrho}{\Delta t} \nabla\cdot \mathbf{u}^{k+1}, \quad \text{ in } \Omega, \]

with boundary condition

\[ \partial_n \xi^{k+1} = 0, \quad \text{ on } \Gamma \]

After which, the pressure is determined by

\[ p^{k+1} = p^k + \xi^{k+1}. \]

For this reason, the "solution" in this problem is the variable $\xi$ and the pressure is just a view, that is an instance of the AsFunction class template.

Definition at line 24 of file NSE.h.


Member Typedef Documentation

template<int dim>
typedef IteratorGroup<2, typename hp::DoFHandler<dim>::active_cell_iterator> Pressure< dim >::Iterator [protected]

We group the iterators of this problem and the problems this one takes information from as follows:

  • Iterator[0]: this.
  • Iterator[1]: Velocity

Definition at line 68 of file NSE.h.


Constructor & Destructor Documentation

template<int dim>
Pressure< dim >::Pressure ( const Triangulation< dim > &  tria,
Material_Parameters params,
const unsigned  deg,
const double  ee,
const double  thres,
const unsigned  sweeps 
)

Initialize the members:

Parameters:
tria: A reference to the mesh where this problem is defined.
params: The list of material parameters.
deg: The polynomial degree
ee: The accuracy to which we iteraritvely solve the problem.
thres: The aggregation threshold for the AMG preconditioner.
sweeps: The number of smoothing steps the AMG preconditioner must perform.

Notice that in this problem the matrix does not change and, therefore, the preconditioner does not need to be updated.

template<int dim>
virtual Pressure< dim >::~Pressure ( ) [virtual]

Clear parameters


Member Function Documentation

template<int dim>
virtual void Pressure< dim >::SetupDoFsSuffix ( ) [protected, virtual]

Since the problem we are solving has a homogeneous Neumann boundary condition we obtain a singular matrix. To remove the singularity we add to the ConstraintMatrix one extra constraint, fixing the value of the solution at one degree of freedom.

Reimplemented from Problem< dim >.

template<int dim>
virtual void Pressure< dim >::InitLADataSuffix ( ) [protected, virtual]

We just set the auxiliary vectors to the proper size

Reimplemented from Problem< dim >.

template<int dim>
virtual void Pressure< dim >::AssembleSystem ( std::vector< AsFunction< dim > * > &  data,
const double  time,
const bool  m_threaded = true 
) [protected, virtual]

Assemble the system matrix and right hand side for the current status of the problem

Parameters:
data: The views of the other problems this one needs information from to be able to assemble.
  1. Velocity.
time: The current time.
m_threaded: flag that indicates if the assembly should be done using multithreading.

Implements Problem< dim >.

template<int dim>
void Pressure< dim >::AssembleCell ( const Iterator  Its,
ScratchData scratch,
typename Problem< dim >::PerTaskData data 
) [protected]

Assemble the local problems.

Parameters:
Its: The cell iterators for the current problem and the data.
scratch: The scratch data.
data: The per task data.
template<int dim>
virtual void Pressure< dim >::ReinitPrec ( ) [protected, virtual]

Reinit the preconditioner

Implements Problem< dim >.

template<int dim>
virtual void Pressure< dim >::DoSolve ( SolverControl control) [protected, virtual]

Solve the system

Parameters:
control: Provides the maximal number of iterations and exit criterion

Implements Problem< dim >.

template<int dim>
virtual void Pressure< dim >::SolveSystemSuffix ( ) [protected, virtual]

Since $p^{k+1}$ and $p^{\star,k+1}$ are actually views of the problem. After solving the system, we need to update them.

Reimplemented from Problem< dim >.

template<int dim>
virtual void Pressure< dim >::SetInitialData ( ) [protected, virtual]

Set the initial data

Implements Problem< dim >.

template<int dim>
virtual void Pressure< dim >::PreRefinementPreffix ( ) [protected, virtual]

Used to handle changes in the triangulation: Copy to the solution transfer

Implements Problem< dim >.

template<int dim>
virtual void Pressure< dim >::PostRefinementSuffix ( const std::vector< TrilinosWrappers::Vector > &  sol_tmp) [protected, virtual]

Used to handle changes in the triangulation: Copy from the solution transfer

Implements Problem< dim >.


Member Data Documentation

template<int dim>
const double Pressure< dim >::rho_min [protected]

Penalization parameter.

Definition at line 45 of file NSE.h.

template<int dim>
TrilinosWrappers::PreconditionAMG Pressure< dim >::prec [protected]

Preconditioner (AMG)

Definition at line 46 of file NSE.h.

Preconditioner data.

Definition at line 47 of file NSE.h.

template<int dim>
TrilinosWrappers::Vector Pressure< dim >::p [protected]

pressure

Definition at line 48 of file NSE.h.

template<int dim>
TrilinosWrappers::Vector Pressure< dim >::pres_extr [protected]

extrapolated pressure $=2p^k - p^{k-1}$.

Definition at line 48 of file NSE.h.

template<int dim>
AsFunction<dim> Pressure< dim >::get_pressure

pressure $p^{k+1}$

Definition at line 139 of file NSE.h.

template<int dim>
AsFunction<dim> Pressure< dim >::get_extrapolated_pressure

extrapolated pressure $p^k-p^{k-1}$

Definition at line 139 of file NSE.h.


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