Compute F at current point x
| 157 | |
| 158 | /// Compute F at current point x |
| 159 | void F(const Vec x) |
| 160 | { |
| 161 | VecGhostUpdateBegin(x, INSERT_VALUES, SCATTER_FORWARD); |
| 162 | VecGhostUpdateEnd(x, INSERT_VALUES, SCATTER_FORWARD); |
| 163 | |
| 164 | // Assemble b and update ghosts |
| 165 | std::span b(_b_vec.array()); |
| 166 | std::ranges::fill(b, 0); |
| 167 | fem::assemble_vector(b, _l); |
| 168 | VecGhostUpdateBegin(_b, ADD_VALUES, SCATTER_REVERSE); |
| 169 | VecGhostUpdateEnd(_b, ADD_VALUES, SCATTER_REVERSE); |
| 170 | |
| 171 | // Set bcs |
| 172 | fem::petsc::set_bc(_b, _bcs, x, -1); |
| 173 | } |
| 174 | |
| 175 | /// Compute J = F' at current point x |
| 176 | void J(const Vec, Mat A) |
nothing calls this directly
no test coverage detected