MCPcopy Create free account
hub / github.com/Cantera/cantera / eval

Method eval

src/oneD/OneDim.cpp:251–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void OneDim::eval(size_t j, double* x, double* r, double rdt, int count)
252{
253 clock_t t0 = clock();
254 if (m_interrupt) {
255 m_interrupt->eval(m_nevals);
256 }
257 fill(r, r + m_size, 0.0);
258 if (j == npos) {
259 fill(m_mask.begin(), m_mask.end(), 0);
260 }
261 if (rdt < 0.0) {
262 rdt = m_rdt;
263 }
264
265 // iterate over the bulk domains first
266 for (const auto& d : m_bulk) {
267 d->eval(j, x, r, m_mask.data(), rdt);
268 }
269
270 // then over the connector domains
271 for (const auto& d : m_connect) {
272 d->eval(j, x, r, m_mask.data(), rdt);
273 }
274
275 // increment counter and time
276 if (count) {
277 clock_t t1 = clock();
278 m_evaltime += double(t1 - t0)/CLOCKS_PER_SEC;
279 m_nevals++;
280 }
281}
282
283void OneDim::evalJacobian(double* x0)
284{

Callers 4

solveMethod · 0.45
stepMethod · 0.45
sim1D_evalFunction · 0.45
func_valueFunction · 0.45

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected