OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
AppShop::Residual::Cell Namespace Reference

Integration of cell residuals. More...

Functions

template<int dim>
void advection (Vector< double > &result, const std::vector< double > &input, const FEValuesBase< dim > &fe, const VectorSlice< const std::vector< std::vector< double > > > &velocity, double factor=1.)
 Linear advection in divergence form.
 
template<int dim>
void advection (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, const VectorSlice< const std::vector< std::vector< double > > > &velocity, double factor=1.)
 Linear advection in divergence form for vector valued elements.
 
template<int dim>
void advection (Vector< double > &result, const std::vector< double > &input, const FEValuesBase< dim > &fe, const std::vector< Point< dim > > &velocity, double factor=1.)
 Linear advection in divergence form.
 
template<int dim>
void di (Vector< double > &result, const std::vector< Tensor< 1, dim > > &input, unsigned int direction, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 Directional derivative in strong form.
 
template<int dim>
void di (Vector< double > &result, const std::vector< double > &input, unsigned int direction, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 Directional derivative in weak form.
 
template<int dim>
void div (Vector< double > &result, const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 Divergence in strong form.
 
template<int dim>
void div (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 Divergence in weak form.
 
template<int dim>
void div_scaled (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, const std::vector< double > &a)
 Scaled divergence in weak form.
 
template<int dim>
void grad (Vector< double > &result, const std::vector< Tensor< 1, dim > > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 Gradient in strong form.
 
template<int dim>
void grad (Vector< double > &result, const std::vector< double > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, double factor=1.)
 Gradient in weak form.
 
template<int dim>
void eps_div (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest)
 Elasticity.
 
template<int dim>
void eps (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest)
 Elasticity.
 
template<int dim>
void laplacian_scaled (Vector< double > &result, const std::vector< Tensor< 1, dim > > &input, const FEValuesBase< dim > &fe, const std::vector< double > &nu, bool divide=false)
 Laplacian in weak form.
 
template<int dim>
void laplacian_scaled (Vector< double > &result, const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &input, const FEValuesBase< dim > &fe, const std::vector< double > &nu, bool divide=false)
 Laplacian in weak form, vector valued.
 
template<int dim>
void laplacian (Vector< double > &result, const std::vector< Tensor< 1, dim > > &input, const FEValuesBase< dim > &fe, double factor=1.)
 Laplacian in weak form.
 
template<int dim>
void laplacian (Vector< double > &result, const std::vector< Tensor< 1, dim > > &input, const FEValuesBase< dim > &fe, const Tensor< 2, dim > factor)
 Laplacian in weak form with a factor that allows for anisotropy

\[ -(\nabla u, K \nabla v) \]

.

 
template<int dim>
void laplacian (Vector< double > &result, const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &input, const FEValuesBase< dim > &fe, double factor=1.)
 Vector-valued Laplacian in weak form.
 
template<int dim>
void mass (Vector< double > &result, const std::vector< double > &input, const FEValuesBase< dim > &fe, double factor=1.)
 Mass residual.
 
template<int dim>
void mass (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, double factor=1.)
 Mass residual for a slice of a vector valued right hand side.
 
template<int dim>
void mass (Vector< double > &result, const std::vector< Vector< double > > &input, const unsigned int start_component, const FEValuesBase< dim > &fe, double factor=1.)
 Mass residual for a vector valued right hand side in the format produced by Function::vector_value_list.
 
template<int dim>
void power (Vector< double > &result, const std::vector< double > &input, const FEValuesBase< dim > &fe, const double power, double factor=1.)
 Residual for a nonlinear power of u.
 
template<int dim>
void time_step (Vector< double > &result, const std::vector< double > &input, const std::vector< double > &last_time, const FEValuesBase< dim > &fe, const double time_step)
 Residual of an implicit Euler timestep.
 
template<int dim>
void time_step (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const VectorSlice< const std::vector< std::vector< double > > > &last_time, const FEValuesBase< dim > &fe, const double time_step)
 Residual of an implicit Euler timestep.
 
template<int dim>
void mass_scaled (Vector< double > &result, const std::vector< double > &input, const FEValuesBase< dim > &fe, const std::vector< double > &factor, bool divide=false)
 Scaled mass residual.
 
template<int dim>
void mass_scaled (Vector< double > &result, const VectorSlice< const std::vector< std::vector< double > > > &input, const FEValuesBase< dim > &fe, const std::vector< double > &factor, bool divide=false)
 Scaled mass residual.
 

Detailed Description

Integration of cell residuals.

Function Documentation

template<int dim>
void AppShop::Residual::Cell::advection ( Vector< double > &  result,
const std::vector< double > &  input,
const FEValuesBase< dim > &  fe,
const VectorSlice< const std::vector< std::vector< double > > > &  velocity,
double  factor = 1. 
)

Linear advection in divergence form.

The derivative is on the test function.

\[ -(u \mathbf w, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::advection ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
const VectorSlice< const std::vector< std::vector< double > > > &  velocity,
double  factor = 1. 
)

Linear advection in divergence form for vector valued elements.

The derivative is on the test function.

\[ -(u \mathbf w, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::advection ( Vector< double > &  result,
const std::vector< double > &  input,
const FEValuesBase< dim > &  fe,
const std::vector< Point< dim > > &  velocity,
double  factor = 1. 
)

Linear advection in divergence form.

The derivative is on the test function.

\[ -(u \mathbf w, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::di ( Vector< double > &  result,
const std::vector< Tensor< 1, dim > > &  input,
unsigned int  direction,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

Directional derivative in strong form.

\[ (\partial_i u, v) \]

template<int dim>
void AppShop::Residual::Cell::di ( Vector< double > &  result,
const std::vector< double > &  input,
unsigned int  direction,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

Directional derivative in weak form.

\[ (-u,\partial_i v) \]

template<int dim>
void AppShop::Residual::Cell::div ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

Divergence in strong form.

\[ (\nabla \cdot \mathbf u, v) \]

template<int dim>
void AppShop::Residual::Cell::div ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

Divergence in weak form.

\[ -(\mathbf u, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::div_scaled ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
const std::vector< double > &  a 
)

Scaled divergence in weak form.

\[ -(a \mathbf u, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::eps ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest 
)

Elasticity.

template<int dim>
void AppShop::Residual::Cell::eps_div ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest 
)

Elasticity.

template<int dim>
void AppShop::Residual::Cell::grad ( Vector< double > &  result,
const std::vector< Tensor< 1, dim > > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

Gradient in strong form.

The element fetest must be vector valued with dim components.

\[ (\nabla u, \mathbf v) \]

template<int dim>
void AppShop::Residual::Cell::grad ( Vector< double > &  result,
const std::vector< double > &  input,
const FEValuesBase< dim > &  fe,
const FEValuesBase< dim > &  fetest,
double  factor = 1. 
)

Gradient in weak form.

The element fetest must be vector valued with dim components.

\[ -(u, \nabla \cdot \mathbf v) \]

template<int dim>
void AppShop::Residual::Cell::laplacian ( Vector< double > &  result,
const std::vector< Tensor< 1, dim > > &  input,
const FEValuesBase< dim > &  fe,
double  factor = 1. 
)

Laplacian in weak form.

\[ -(\nabla u, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::laplacian ( Vector< double > &  result,
const std::vector< Tensor< 1, dim > > &  input,
const FEValuesBase< dim > &  fe,
const Tensor< 2, dim factor 
)

Laplacian in weak form with a factor that allows for anisotropy

\[ -(\nabla u, K \nabla v) \]

.

template<int dim>
void AppShop::Residual::Cell::laplacian ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &  input,
const FEValuesBase< dim > &  fe,
double  factor = 1. 
)

Vector-valued Laplacian in weak form.

\[ -(\nabla u, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::laplacian_scaled ( Vector< double > &  result,
const std::vector< Tensor< 1, dim > > &  input,
const FEValuesBase< dim > &  fe,
const std::vector< double > &  nu,
bool  divide = false 
)

Laplacian in weak form.

\[ -(\nu \nabla u, \nabla v) \]

template<int dim>
void AppShop::Residual::Cell::laplacian_scaled ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< Tensor< 1, dim > > > > &  input,
const FEValuesBase< dim > &  fe,
const std::vector< double > &  nu,
bool  divide = false 
)

Laplacian in weak form, vector valued.

\[ -(\nu \nabla u_i, \nabla v) \quad i=1\ldots d \]

template<int dim>
void AppShop::Residual::Cell::mass ( Vector< double > &  result,
const std::vector< double > &  input,
const FEValuesBase< dim > &  fe,
double  factor = 1. 
)

Mass residual.

\[ (f,v) \]

template<int dim>
void AppShop::Residual::Cell::mass ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
double  factor = 1. 
)

Mass residual for a slice of a vector valued right hand side.

\[ (f,v) \]

template<int dim>
void AppShop::Residual::Cell::mass ( Vector< double > &  result,
const std::vector< Vector< double > > &  input,
const unsigned int  start_component,
const FEValuesBase< dim > &  fe,
double  factor = 1. 
)

Mass residual for a vector valued right hand side in the format produced by Function::vector_value_list.

\[ (f,v) \]

template<int dim>
void AppShop::Residual::Cell::mass_scaled ( Vector< double > &  result,
const std::vector< double > &  input,
const FEValuesBase< dim > &  fe,
const std::vector< double > &  factor,
bool  divide = false 
)

Scaled mass residual.

template<int dim>
void AppShop::Residual::Cell::mass_scaled ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const FEValuesBase< dim > &  fe,
const std::vector< double > &  factor,
bool  divide = false 
)

Scaled mass residual.

template<int dim>
void AppShop::Residual::Cell::power ( Vector< double > &  result,
const std::vector< double > &  input,
const FEValuesBase< dim > &  fe,
const double  power,
double  factor = 1. 
)

Residual for a nonlinear power of u.

\[ (u^p,v) \]

template<int dim>
void AppShop::Residual::Cell::time_step ( Vector< double > &  result,
const std::vector< double > &  input,
const std::vector< double > &  last_time,
const FEValuesBase< dim > &  fe,
const double  time_step 
)

Residual of an implicit Euler timestep.

template<int dim>
void AppShop::Residual::Cell::time_step ( Vector< double > &  result,
const VectorSlice< const std::vector< std::vector< double > > > &  input,
const VectorSlice< const std::vector< std::vector< double > > > &  last_time,
const FEValuesBase< dim > &  fe,
const double  time_step 
)

Residual of an implicit Euler timestep.