libMesh
|
A class which provides the residual and jacobian assembly functions for the Laplace-Young system of equations. More...
Public Member Functions | |
LaplaceYoung () | |
virtual void | residual (const NumericVector< Number > &X, NumericVector< Number > &R, NonlinearImplicitSystem &S) |
Function which computes the residual. More... | |
virtual void | jacobian (const NumericVector< Number > &X, SparseMatrix< Number > &J, NonlinearImplicitSystem &S) |
Function which computes the jacobian. More... | |
virtual void | postcheck (const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln, NonlinearImplicitSystem &S) |
Function which performs a postcheck on the solution. More... | |
virtual void | residual (const NumericVector< Number > &X, NumericVector< Number > &R, sys_type &S)=0 |
Residual function. More... | |
virtual void | jacobian (const NumericVector< Number > &X, SparseMatrix< Number > &J, sys_type &S)=0 |
Jacobian function. More... | |
virtual void | postcheck (const NumericVector< Number > &old_soln, NumericVector< Number > &search_direction, NumericVector< Number > &new_soln, bool &changed_search_direction, bool &changed_new_soln, sys_type &S)=0 |
This interface, which is inspired by PETSc's, passes the user: .) A constant reference to the "old" solution vector (previous Newton iterate), .) A pointer to the search direction (update) vector, and .) The "proposed" new solution vector. More... | |
Private Attributes | |
Real | _kappa |
Real | _sigma |
Real | _gamma |
A class which provides the residual and jacobian assembly functions for the Laplace-Young system of equations.
Definition at line 77 of file miscellaneous_ex3.C.
|
inline |
Definition at line 83 of file miscellaneous_ex3.C.
|
virtual |
Function which computes the jacobian.
Definition at line 455 of file miscellaneous_ex3.C.
References libMesh::SparseMatrix< T >::add_matrix(), libMesh::FEGenericBase< OutputType >::build(), dim, libMesh::FIFTH, libMesh::System::get_dof_map(), libMesh::System::get_equation_systems(), libMesh::EquationSystems::get_mesh(), libMesh::EquationSystems::get_system(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::QBase::n_points(), libMesh::DenseMatrix< T >::resize(), and std::sqrt().
|
pure virtualinherited |
Jacobian function.
This function will be called to compute the jacobian and must be implemented by the user in a derived class.
Referenced by libMesh::Problem_Interface::computeJacobian(), libMesh::Problem_Interface::computePreconditioner(), and libMesh::libmesh_petsc_snes_jacobian().
|
virtual |
Function which performs a postcheck on the solution.
In this example, we take a "damped" Newton step defined by:
u_new = u_old + gamma*delta_u
where delta_u is the search direction, and 0 < gamma <= 1 is a damping parameter. gamma=1 corresponds to a full Newton step.
This is really for demonstration purposes only, as it just degrades the rate of nonlinear convergence in this particular example.
Definition at line 583 of file miscellaneous_ex3.C.
References libMesh::NumericVector< T >::add().
|
pure virtualinherited |
This interface, which is inspired by PETSc's, passes the user: .) A constant reference to the "old" solution vector (previous Newton iterate), .) A pointer to the search direction (update) vector, and .) The "proposed" new solution vector.
The user can then modify either the search direction or the new solution vector according to their own application-specific criteria. If they do, they must set the associated boolean references appropriately.
Referenced by libMesh::libmesh_petsc_snes_postcheck().
|
virtual |
Function which computes the residual.
Definition at line 285 of file miscellaneous_ex3.C.
References libMesh::NumericVector< T >::add_vector(), libMesh::FEGenericBase< OutputType >::build(), dim, libMesh::FIFTH, libMesh::System::get_dof_map(), libMesh::System::get_equation_systems(), libMesh::EquationSystems::get_mesh(), libMesh::EquationSystems::get_system(), mesh, libMesh::MeshBase::mesh_dimension(), libMesh::QBase::n_points(), libMesh::DenseVector< T >::resize(), std::sqrt(), and libMesh::NumericVector< T >::zero().
|
pure virtualinherited |
Residual function.
This function will be called to compute the residual and must be implemented by the user in a derived class.
Referenced by libMesh::Problem_Interface::computeF(), libMesh::libmesh_petsc_snes_fd_residual(), libMesh::libmesh_petsc_snes_mffd_residual(), and libMesh::libmesh_petsc_snes_residual().
|
private |
Definition at line 128 of file miscellaneous_ex3.C.
|
private |
Definition at line 124 of file miscellaneous_ex3.C.
|
private |
Definition at line 125 of file miscellaneous_ex3.C.