![]() |
ElmerFoamFSI
2.0
ElmerFoamFSI is fluid-solid interaction simulation application built up from OpenFOAM CFD and Elmer CSM coupled through the IMPACT multiphysics software integration infrastructure.
|
| double TrapezoidQuadrature | ( | double(*)(double) | f, |
| double | x0, | ||
| double | xn, | ||
| int | n | ||
| ) |
Integrates f with composite trapezoid rule.
| f | Function to integrate takes a double argument, x, and returns a double value |
| x0 | The lower integration domain limit. |
| xn | The upper integration domain limit. |
| n | The number of intervals into which to break the domain. |
.With
, and
, the integral is calculated as:

The error of this method is
.
Definition at line 39 of file Third_Party_Modules/ElmerFSI/trunk/src/ExampleSourceFile.C.
Referenced by TestingObject< ResultsType >::Test__TrapezoidQuadrature().