MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / F

Method F

cpp/demo/hyperelasticity/main.cpp:159–173  ·  view source on GitHub ↗

Compute F at current point x

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 3

assemble_vectorFunction · 0.50
set_bcFunction · 0.50
arrayMethod · 0.45

Tested by

no test coverage detected