![]() |
deal.II version 9.8.0
|
Go to the source code of this file.
Typedefs | |
| using | ADHelper = Differentiation::AD::ResidualLinearization<Differentiation::AD::NumberTypes::sacado_dfad,double> |
| using | ADNumberType = typename ADHelper::ad_type |
Functions | |
| * * FEFaceValues< 2 > | fe_face_values (fe, face_quadrature_formula, update_values|update_quadrature_points| * update_normal_vectors|update_JxW_values) |
| * * Vector< double > | cell_rhs (dofs_per_cell) |
| * * * std::vector< double > | consol (n_q_points) |
| * | for (const auto &cell:dof_handler.active_cell_iterators()) * |
| * * | for (const types::global_dof_index i:DoFTools::extract_boundary_dofs(dof_handler, t_mask,{1})) * residual(i)=0 |
Variables | |
| * const unsigned int | dofs_per_cell = fe.dofs_per_cell |
| * const unsigned int | n_q_points = quadrature_formula.size() |
| * const unsigned int | n_q_f_points = face_quadrature_formula.size() |
| * * const FEValuesExtractors::Scalar t * | |
| * * ComponentMask | t_mask = fe.component_mask(t) |
| * * | residual = 0.0 |
| using ADHelper = Differentiation::AD::ResidualLinearization<Differentiation::AD::NumberTypes::sacado_dfad,double> |
* Here we define the type of Number we want to use to define our variables
* so that they are suitable for automatic differentiation.
Definition at line 1398 of file nonlinear-heat_transfer_with_AD_NOX.h.
| using ADNumberType = typename ADHelper::ad_type |
Definition at line 1399 of file nonlinear-heat_transfer_with_AD_NOX.h.
| * * FEFaceValues< 2 > fe_face_values | ( | fe | , |
| face_quadrature_formula | , | ||
| update_values|update_quadrature_points| * update_normal_vectors| | update_JxW_values ) |
| * * Vector< double > cell_rhs | ( | dofs_per_cell | ) |
* cell_rhs holds the local rhs. That is the residual evaluated at the * #evaluation_point. Defining a local (residual) vector
| * * * std::vector< double > consol | ( | n_q_points | ) |
* consol now holds the #converged_solution at the Gauss points of a current cell. These are of the double type i.e., regular numbers.
* It is in the following line, we say that the #evalaution_point needs to be substituted in * place of the #old_solution (or #old_solution_grad) to get the residual (in numerical form).
* In the following steps, consol and #consol_grad are used to grab value of the #converged_solution * and its gradient at the gauss points, respectively.
* residual_ad is defined and initialized in its symbolic form.
* We here define the entire residual using all intermediate variables, which are also of the type ADNumberType.
* The following lines, apply the Newmann boundary conditions to the right hand side.
* The Newumann boundary condition (-10) is applied to the right edge, with boundary id 3.
* Here, we tell the ad_helper that the residual (in its symbolic form) is given by #residual_ad.
* Here, the residual is calculated at the values given by #evaluation_point. * Note that the residual does not have the -ve sign as in the regular way of solving. * This is because, the NOX solvers, only needs the actual reisdual.
Definition at line 1430 of file nonlinear-heat_transfer_with_AD_NOX.h.
|
pure virtual |
| * const unsigned int dofs_per_cell = fe.dofs_per_cell |
Number of degree of freedom per cell
Definition at line 1385 of file nonlinear-heat_transfer_with_AD_NOX.h.
| * const unsigned int n_q_points = quadrature_formula.size() |
Number of quadrature points over the domain of the finite element
Definition at line 1386 of file nonlinear-heat_transfer_with_AD_NOX.h.
| * const unsigned int n_q_f_points = face_quadrature_formula.size() |
Number of quadrature point over the boundary of a finite element
Definition at line 1387 of file nonlinear-heat_transfer_with_AD_NOX.h.
| * std::vector<Tensor<1, 2,ADNumberType> > old_solution_grad * |
* The FEValuesExtractors is used as usual to get the degree of freedom we are interested in. * For this single variable problem, this may not be needed. We still use it to show * how it needs to be declared, when multiple variables exist and when we want to define component mask * to define boundary conditions for specific variables.
Local to Global Degree of freedom indices
* #concol_grad now holds the #converged_solution at the Gauss points of the current cell. These are regular numbers.
Definition at line 1406 of file nonlinear-heat_transfer_with_AD_NOX.h.
| * * ComponentMask t_mask = fe.component_mask(t) |
Definition at line 1425 of file nonlinear-heat_transfer_with_AD_NOX.h.
* Actual, numerical residual.
Definition at line 1429 of file nonlinear-heat_transfer_with_AD_NOX.h.