|
| | PETScMFFDJacobianOperator (std::string object_name, std::string options_prefix="") |
| | Constructor. More...
|
| |
| | ~PETScMFFDJacobianOperator () |
| | Empty destructor. More...
|
| |
| void | setOperator (SAMRAI::tbox::Pointer< GeneralOperator > F) |
| | Set the operator to use in computing approximations to Jacobian-vector products. More...
|
| |
| void | setNewtonKrylovSolver (SAMRAI::tbox::Pointer< PETScNewtonKrylovSolver > nonlinear_solver) |
| | Set the PETScNewtonKrylov solver using this object to compute Jacobian-vector products. More...
|
| |
|
| void | formJacobian (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &u) override |
| | Compute hierarchy dependent data required for evaluating F'[x]. More...
|
| |
| SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > | getBaseVector () const override |
| | Return the vector where the Jacobian is evaluated. More...
|
| |
|
| void | modifyRhsForBcs (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) override |
| | Modify y to account for boundary conditions. More...
|
| |
|
| const std::string & | getName () const |
| | Return the object name. More...
|
| |
| virtual bool | getIsInitialized () const |
| | Return whether the operator is initialized. More...
|
| |
| virtual void | setHomogeneousBc (bool homogeneous_bc) |
| | Set whether the operator should use homogeneous boundary conditions. More...
|
| |
| virtual bool | getHomogeneousBc () const |
| | Return whether the operator is using homogeneous boundary conditions. More...
|
| |
| virtual void | setSolutionTime (double solution_time) |
| | Set the time at which the solution is to be evaluated. More...
|
| |
| virtual double | getSolutionTime () const |
| | Get the time at which the solution is being evaluated. More...
|
| |
| virtual void | setTimeInterval (double current_time, double new_time) |
| | Set the current time interval. More...
|
| |
| virtual std::pair< double, double > | getTimeInterval () const |
| | Get the current time interval. More...
|
| |
| virtual double | getDt () const |
| | Get the current time step size. More...
|
| |
| virtual void | setHierarchyMathOps (SAMRAI::tbox::Pointer< HierarchyMathOps > hier_math_ops) |
| | Set the HierarchyMathOps object used by the operator. More...
|
| |
| virtual SAMRAI::tbox::Pointer< HierarchyMathOps > | getHierarchyMathOps () const |
| | Get the HierarchyMathOps object used by the operator. More...
|
| |
| virtual void | applyAdd (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &z) |
| | Compute \(z=F[x]+y\). More...
|
| |
| virtual void | imposeSolBcs (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &u) |
| | Impose boudary conditions in the solution vector. More...
|
| |
|
| SAMRAI::tbox::Pointer< GeneralOperator > | d_F |
| |
| SAMRAI::tbox::Pointer< PETScNewtonKrylovSolver > | d_nonlinear_solver |
| |
| Mat | d_petsc_jac = nullptr |
| |
| SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > | d_op_u |
| |
| SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > | d_op_x |
| |
| SAMRAI::tbox::Pointer< SAMRAI::solv::SAMRAIVectorReal< NDIM, double > > | d_op_y |
| |
| Vec | d_petsc_u = nullptr |
| |
| Vec | d_petsc_x = nullptr |
| |
| Vec | d_petsc_y = nullptr |
| |
| std::string | d_options_prefix |
| |
| void | apply (SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &x, SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &y) override |
| | Compute y=Ax. More...
|
| |
| void | initializeOperatorState (const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &in, const SAMRAI::solv::SAMRAIVectorReal< NDIM, double > &out) override |
| | Compute hierarchy dependent data required for computing y=Ax and z=Ax+y. More...
|
| |
| void | deallocateOperatorState () override |
| | Remove all hierarchy dependent data allocated by initializeOperatorState(). More...
|
| |
| | PETScMFFDJacobianOperator ()=delete |
| | Default constructor. More...
|
| |
| | PETScMFFDJacobianOperator (const PETScMFFDJacobianOperator &from)=delete |
| | Copy constructor. More...
|
| |
| PETScMFFDJacobianOperator & | operator= (const PETScMFFDJacobianOperator &that)=delete |
| | Assignment operator. More...
|
| |
| static PetscErrorCode | FormFunction_SAMRAI (void *p_ctx, Vec x, Vec f) |
| |
The vector arguments for apply(), applyAdd(), etc, need not match those for initializeOperatorState(). However, there must be a certain degree of similarity, including
- hierarchy configuration (hierarchy pointer and level range)
- number, type and alignment of vector component data
- ghost cell widths of data in the input and output vectors
- Note
- It is generally necessary to reinitialize the operator state when the hierarchy configuration changes.
It is safe to call initializeOperatorState() when the state is already initialized. In this case, the operator state is first deallocated and then reinitialized.
Conditions on arguments:
- input and output vectors must have same hierarchy
- input and output vectors must have same structure, depth, etc.
Call deallocateOperatorState() to remove any data allocated by this method.
- See also
- deallocateOperatorState
- Parameters
-
| in | input vector |
| out | output vector |
- Note
- The default implementation is empty.
Reimplemented from IBTK::GeneralOperator.
Before calling applyAdd(), the form of the vectors x, y, and z should be set properly by the user on all patch interiors on the specified range of levels in the patch hierarchy. The user is responsible for all data management for the quantities associated with the vectors. In particular, patch data in these vectors must be allocated prior to calling this method.
- Parameters
-
| x | input vector |
| y | input vector |
| z | output vector, i.e., \(z=F[x]+y\) |
Conditions on Parameters:
- vectors x, y, and z must have same hierarchy
- vectors x, y, and z must have same structure, depth, etc.
In general, the vectors x and y cannot be the same.
- Note
- Subclasses may require that the operator be initialized prior to calling applyAdd().
- See also
- initializeOperatorState
- Note
- A default implementation is provided which employs apply() and SAMRAI::solv::SAMRAIVectorReal::add().
Reimplemented in IBTK::PETScSNESJacobianJOWrapper, and IBTK::PETScMatLOWrapper.