#include <old_interface.h>
Public Member Functions | |
virtual | ~Interface () |
Interface (const std::string &name="", const std::string &default_fe="FE_Q(1)", const std::string &default_component_names="u", const std::string &default_coupling="", const std::string &default_preconditioner_coupling="", const std::string &default_differential_components="") | |
virtual void | declare_parameters (ParameterHandler &prm) |
virtual void | parse_parameters_call_back () |
const std::vector< unsigned int > | get_differential_blocks () const |
virtual void | set_time (const double &t) const |
update time of all parsed mapped functions More... | |
virtual void | postprocess_newly_created_triangulation (Triangulation< dim, spacedim > &tria) const |
This function is used to modify triangulation using boundary_id or manifold_id. More... | |
virtual void | apply_dirichlet_bcs (const DoFHandler< dim, spacedim > &dof_handler, ConstraintMatrix &constraints) const |
Applies Dirichlet boundary conditions. More... | |
template<typename Number > | |
void | apply_neumann_bcs (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopySystem &data, std::vector< Number > &local_residual) const |
Applies Neumann boundary conditions. More... | |
template<typename Number > | |
void | apply_forcing_terms (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopySystem &data, std::vector< Number > &local_residual) const |
Applies CONSERVATIVE forcing terms. More... | |
virtual void | initialize_data (const typename LAC::VectorType &solution, const typename LAC::VectorType &solution_dot, const double t, const double alpha) const |
Initialize all data required for the system. More... | |
virtual void | get_preconditioner_energy (const typename DoFHandler< dim, spacedim >::active_cell_iterator &, Scratch &, CopySystem &, Sdouble &) const |
Build the energy needed to get the preconditioner in the case it is required just one derivative. More... | |
virtual void | get_preconditioner_energy (const typename DoFHandler< dim, spacedim >::active_cell_iterator &, Scratch &, CopyPreconditioner &, SSdouble &) const |
Build the energy needed to get the preconditioner in the case it is required two derivatives. More... | |
virtual void | get_system_energy (const typename DoFHandler< dim, spacedim >::active_cell_iterator &, Scratch &, CopySystem &, Sdouble &) const |
Build the energy needed to get the system matrix in the case it is required two derivatives. More... | |
virtual void | get_system_energy (const typename DoFHandler< dim, spacedim >::active_cell_iterator &, Scratch &, CopySystem &, SSdouble &) const |
Build the energy needed to get the system matrix in the case it is required two derivatives. More... | |
virtual void | get_system_residual (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopySystem &data, std::vector< Sdouble > &local_residual) const |
Build the residual needed to get the system matrix in the case it is required two derivatives. More... | |
virtual void | get_system_residual (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopySystem &data, std::vector< double > &local_residual) const |
Build the residual needed to get the system matrix in the case it is required just one derivative. More... | |
virtual void | get_preconditioner_residual (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopyPreconditioner &data, std::vector< Sdouble > &local_residual) const |
Build the residual needed to get the preconditioner matrix in the case two derivatives are required. More... | |
virtual void | compute_system_operators (const DoFHandler< dim, spacedim > &, const typename LAC::BlockMatrix &, const typename LAC::BlockMatrix &, const std::vector< shared_ptr< typename LAC::BlockMatrix > >, LinearOperator< typename LAC::VectorType > &, LinearOperator< typename LAC::VectorType > &) const |
Compute linear operators needed by the problem. More... | |
virtual void | assemble_local_system (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopySystem &data) const |
virtual void | assemble_local_preconditioner (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopyPreconditioner &data) const |
virtual shared_ptr< Mapping< dim, spacedim > > | get_mapping (const DoFHandler< dim, spacedim > &, const typename LAC::VectorType &) const |
virtual UpdateFlags | get_jacobian_flags () const |
virtual UpdateFlags | get_residual_flags () const |
virtual UpdateFlags | get_jacobian_preconditioner_flags () const |
virtual UpdateFlags | get_face_flags () const |
void | fix_solution_dot_derivative (FEValuesCache< dim, spacedim > &, double) const |
void | fix_solution_dot_derivative (FEValuesCache< dim, spacedim > &fe_cache, Sdouble alpha) const |
void | fix_solution_dot_derivative (FEValuesCache< dim, spacedim > &fe_cache, SSdouble alpha) const |
template<typename Number > | |
void | reinit (const Number &alpha, const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, FEValuesCache< dim, spacedim > &fe_cache) const |
template<typename Number > | |
void | reinit (const Number &alpha, const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face_no, FEValuesCache< dim, spacedim > &fe_cache) const |
virtual void | get_aux_matrix_residuals (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopyPreconditioner &data, std::vector< std::vector< double > > &local_residuals) const |
virtual void | get_aux_matrix_residuals (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopyPreconditioner &data, std::vector< std::vector< Sdouble > > &local_residuals) const |
virtual void | assemble_local_aux_matrices (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, Scratch &scratch, CopyPreconditioner &data) const |
UpdateFlags | get_aux_matrix_flags (const unsigned int &i) const |
const Table< 2, DoFTools::Coupling > & | get_aux_matrix_coupling (const unsigned int &i) const |
virtual unsigned int | get_number_of_aux_matrices () const |
Public Attributes | |
std::vector< UpdateFlags > | aux_matrix_update_flags |
std::vector< Table< 2, DoFTools::Coupling > > | aux_matrix_coupling |
Protected Attributes | |
ParsedMappedFunctions< spacedim, n_components > | forcing_terms |
ParsedMappedFunctions< spacedim, n_components > | neumann_bcs |
ParsedDirichletBCs< dim, spacedim, n_components > | dirichlet_bcs |
std::string | str_diff_comp |
std::vector< unsigned int > | _diff_comp |
const LAC::VectorType * | solution |
Solution vector evaluated at time t. More... | |
LAC::VectorType | old_solution |
Solution vector evaluated at time t-dt. More... | |
const LAC::VectorType * | solution_dot |
Time derivative solution vector evaluated at time t. More... | |
double | t |
Current time step. More... | |
double | old_t |
Previous time step. More... | |
double | alpha |
unsigned int | dofs_per_cell |
unsigned int | n_q_points |
unsigned int | n_face_q_points |
This class has two child: conservative_interface.h and non_conservative_interface.h Users should not derive directly from this class, but from its specialization classes. For istance, a stokes problem should consist in a interface class derived from conservative_interface.h. (see include/interfaces/ for some examples)
Goal: provide a derivable interface to solve a particular PDEs problem (time depending, first-order, non linear).
Usage: This class requires some arguments related to the setting of the problem: finite elements, boundary conditions, and initial conditions. Moreover, it helps to write the system matrix and the preconditioner matrix. (see conservative_interface.h and non_conservative_interface.h)
Varibles:
default_differential_components
: this variable is a list of ones and zeroes. 1 in the case the corresponding variable should be differentiable and 0 otherwise. TODO: add flags
|
inlinevirtual |
|
inline |
|
virtual |
Applies Dirichlet boundary conditions.
This function is used to applies Dirichlet boundary conditions. It takes as argument a DoF handler dof_handler
and a constraint matrix constraints
.
void Interface< dim, spacedim, n_components, LAC >::apply_forcing_terms | ( | const typename DoFHandler< dim, spacedim >::active_cell_iterator & | cell, |
Scratch & | scratch, | ||
CopySystem & | data, | ||
std::vector< Number > & | local_residual | ||
) | const |
Applies CONSERVATIVE forcing terms.
This function applies the conservative forcing terms, which can be defined by expressions in the parameter file.
If the problem involves NON-conservative loads, they must be included in the residual formulation.
void Interface< dim, spacedim, n_components, LAC >::apply_neumann_bcs | ( | const typename DoFHandler< dim, spacedim >::active_cell_iterator & | cell, |
Scratch & | scratch, | ||
CopySystem & | data, | ||
std::vector< Number > & | local_residual | ||
) | const |
Applies Neumann boundary conditions.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Compute linear operators needed by the problem.
This function is used to assemble linear operators related to the problem. It takes a reference to DoF Handler, two references to block sparse matrices representing the system matrix and the preconditioner, and two references to LinearOperator.
|
virtual |
Reimplemented in FreeSwellingThreeFields< dim, spacedim >, CompressibleNeoHookeanInterface< dim, spacedim, LAC >, ALENavierStokes< dim >, NeoHookeanTwoFieldsInterface< dim, spacedim, LAC >, NonConservativeInterface< dim, spacedim, n_components, Implementation, LAC >, NonConservativeInterface< dim, dim, dim+dim+1, ALENavierStokes< dim > >, CompressibleNeoHookeanInterface< dim, spacedim, LAC >, NeoHookeanTwoFieldsInterface< dim, spacedim, LAC >, ConservativeInterface< dim, spacedim, n_components, Implementation, LAC >, ConservativeInterface< dim, spacedim, dim, CompressibleNeoHookeanInterface< dim, spacedim > >, ConservativeInterface< dim, spacedim, dim, CompressibleNeoHookeanInterface< dim, spacedim >, LADealII >, ConservativeInterface< dim, spacedim, dim+1, NeoHookeanTwoFieldsInterface< dim, spacedim > >, ConservativeInterface< dim, dim, 1, HeatEquation< dim, LAC >, LAC >, ConservativeInterface< dim, spacedim, dim+2, FreeSwellingThreeFields< dim, spacedim >, LAC >, and CompressibleNeoHookeanInterface< dim, spacedim, LAC >.
void Interface< dim, spacedim, n_components, LAC >::fix_solution_dot_derivative | ( | FEValuesCache< dim, spacedim > & | , |
double | |||
) | const |
void Interface< dim, spacedim, n_components, LAC >::fix_solution_dot_derivative | ( | FEValuesCache< dim, spacedim > & | fe_cache, |
Sdouble | alpha | ||
) | const |
void Interface< dim, spacedim, n_components, LAC >::fix_solution_dot_derivative | ( | FEValuesCache< dim, spacedim > & | fe_cache, |
SSdouble | alpha | ||
) | const |
const Table<2,DoFTools::Coupling>& Interface< dim, spacedim, n_components, LAC >::get_aux_matrix_coupling | ( | const unsigned int & | i | ) | const |
UpdateFlags Interface< dim, spacedim, n_components, LAC >::get_aux_matrix_flags | ( | const unsigned int & | i | ) | const |
|
virtual |
|
virtual |
const std::vector<unsigned int> Interface< dim, spacedim, n_components, LAC >::get_differential_blocks | ( | ) | const |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Build the energy needed to get the preconditioner in the case it is required just one derivative.
This function is used to build the energy associated to the preconditioner in the case it is required just one derivative. It takes as argument a reference to the active cell (DoFHandler<dim,spacedim>::active_cell_iterator), all the informations of the system such as fe values, quadrature points, AnyData (Scratch), all the informations related to the PDE (CopySystem) and the energy (Sdouble)
Reimplemented in ConservativeInterface< dim, dim, 1, HeatEquation< dim, LAC >, LAC >, and ConservativeInterface< dim, spacedim, dim+2, FreeSwellingThreeFields< dim, spacedim >, LAC >.
|
virtual |
Build the energy needed to get the preconditioner in the case it is required two derivatives.
This function is used to build the energy associated to the preconditioner in the case the Jacobian is automatically constructed using the derivative of the residual. It takes as argument a reference to the active cell (DoFHandler<dim,spacedim>::active_cell_iterator), all the informations of the system such as fe values, quadrature points, AnyData (Scratch), all the informations related to the PDE (CopySystem) and the energy (SSdouble)
Reimplemented in ConservativeInterface< dim, dim, 1, HeatEquation< dim, LAC >, LAC >, and ConservativeInterface< dim, spacedim, dim+2, FreeSwellingThreeFields< dim, spacedim >, LAC >.
|
virtual |
Build the residual needed to get the preconditioner matrix in the case two derivatives are required.
This function is used to build the residual associated to the preconditioner in the case it is required just one derivatice. It takes as argument a reference to the active cell cell
, all the informations of the system scratch
( fe values, quadrature points, AnyData ), all the informations related to the PDE data
and a reference to the local residual local_residual
.
|
virtual |
|
virtual |
Build the energy needed to get the system matrix in the case it is required two derivatives.
This function is used to build the energy associated to the system matrix in the case two derivatives are required. It takes as argument a reference to the active cell (DoFHandler<dim,spacedim>::active_cell_iterator), all the informations of the system such as fe values, quadrature points, AnyData (Scratch), all the informations related to the PDE (CopySystem) and the energy (SSdouble)
Reimplemented in ConservativeInterface< dim, dim, 1, HeatEquation< dim, LAC >, LAC >, and ConservativeInterface< dim, spacedim, dim+2, FreeSwellingThreeFields< dim, spacedim >, LAC >.
|
virtual |
Build the energy needed to get the system matrix in the case it is required two derivatives.
This function is used to build the energy associated to the system matrix in the case two derivatives are required. It takes as argument a reference to the active cell (DFHandler<dim,spacedim>::active_cell_iterator), all the informations of the system such as fe values, quadrature points, AnyData (Scratch), all the informations related to the PDE (CopySystem) and the energy (SSdouble)
Reimplemented in ConservativeInterface< dim, dim, 1, HeatEquation< dim, LAC >, LAC >, and ConservativeInterface< dim, spacedim, dim+2, FreeSwellingThreeFields< dim, spacedim >, LAC >.
|
virtual |
Build the residual needed to get the system matrix in the case it is required two derivatives.
This function is used to build the residual associated to the system in the case two derivatives are required. It takes as argument a reference to the active cell cell
, all the informations of the system scratch
( fe values, quadrature points, AnyData ), all the informations related to the PDE data
and a reference to the local residual local_residual
.
|
virtual |
Build the residual needed to get the system matrix in the case it is required just one derivative.
This function is used to build the residual associated to the system in the case it is required just one derivatice. It takes as argument a reference to the active cell cell
, all the informations of the system scratch
( fe values, quadrature points, AnyData ), all the informations related to the PDE data
and a reference to the local residual local_residual
.
|
virtual |
Initialize all data required for the system.
This function is used to initialize the varibale AnyData d
that contains all data of the problem (solutions, DoF, quadrature points, solutions vector, etc ). It takes as argument the number of DoF per cell dofs_per_cell
, the number of quadrature points n_q_points
, the number of quadrature points per face n_face_q_points
, the reference to solutions vectors sol
and the reference to the AnyData d
.
TODO: add current_time and current_alpha
|
virtual |
Reimplemented in FreeSwellingThreeFields< dim, spacedim >, CompressibleNeoHookeanInterface< dim, spacedim, LAC >, ALENavierStokes< dim >, NonConservativeInterface< dim, spacedim, n_components, Implementation, LAC >, NonConservativeInterface< dim, dim, dim+dim+1, ALENavierStokes< dim > >, NeoHookeanTwoFieldsInterface< dim, spacedim, LAC >, CompressibleNeoHookeanInterface< dim, spacedim, LAC >, ConservativeInterface< dim, spacedim, n_components, Implementation, LAC >, ConservativeInterface< dim, spacedim, dim, CompressibleNeoHookeanInterface< dim, spacedim > >, ConservativeInterface< dim, spacedim, dim, CompressibleNeoHookeanInterface< dim, spacedim >, LADealII >, ConservativeInterface< dim, spacedim, dim+1, NeoHookeanTwoFieldsInterface< dim, spacedim > >, ConservativeInterface< dim, dim, 1, HeatEquation< dim, LAC >, LAC >, ConservativeInterface< dim, spacedim, dim+2, FreeSwellingThreeFields< dim, spacedim >, LAC >, and CompressibleNeoHookeanInterface< dim, spacedim, LAC >.
|
virtual |
This function is used to modify triangulation using boundary_id or manifold_id.
In the case a signal is required, this is the function to modify.
void Interface< dim, spacedim, n_components, LAC >::reinit | ( | const Number & | alpha, |
const typename DoFHandler< dim, spacedim >::active_cell_iterator & | cell, | ||
FEValuesCache< dim, spacedim > & | fe_cache | ||
) | const |
void Interface< dim, spacedim, n_components, LAC >::reinit | ( | const Number & | alpha, |
const typename DoFHandler< dim, spacedim >::active_cell_iterator & | cell, | ||
const unsigned int | face_no, | ||
FEValuesCache< dim, spacedim > & | fe_cache | ||
) | const |
|
virtual |
update time of all parsed mapped functions
|
protected |
|
mutableprotected |
std::vector<Table<2,DoFTools::Coupling> > Interface< dim, spacedim, n_components, LAC >::aux_matrix_coupling |
std::vector<UpdateFlags> Interface< dim, spacedim, n_components, LAC >::aux_matrix_update_flags |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
Solution vector evaluated at time t-dt.
|
mutableprotected |
Previous time step.
|
mutableprotected |
Solution vector evaluated at time t.
|
mutableprotected |
Time derivative solution vector evaluated at time t.
|
protected |
|
mutableprotected |
Current time step.