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.
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Groups Pages
bool DisplacementCheck ( double *  disp,
int  size 
)
inline

Definition at line 1524 of file ElmerFoamFSITest.H.

References TestingObject< ResultsType >::double_equals().

Referenced by TestingObject< ResultsType >::Test__SolidAgentRun().

1524  {
1525  double solidDisSave[size];
1526 
1527  // Hard coding the value
1528  solidDisSave[0] = 6.37522e-28;
1529  solidDisSave[1] = 0.000298136;
1530  solidDisSave[2] = 5.90759e-05;
1531  solidDisSave[3] = 6.37522e-28;
1532  solidDisSave[4] = 0.000298136;
1533  solidDisSave[5] = 5.90759e-05;
1534  solidDisSave[6] = 4.50796e-28;
1535  solidDisSave[7] = 0.000291629;
1536  solidDisSave[8] = 5.25282e-05;
1537  solidDisSave[9] = 4.50796e-28;
1538  solidDisSave[10] = 0.000291629;
1539  solidDisSave[11] = 5.25282e-05;
1540  solidDisSave[12] = 4.50796e-28;
1541  solidDisSave[13] = 0.000286197;
1542  solidDisSave[14] = 4.63341e-05;
1543  solidDisSave[15] = 8.55785e-28;
1544  solidDisSave[16] = 0.000286197;
1545  solidDisSave[17] = 4.63341e-05;
1546  solidDisSave[18] = 4.50796e-28;
1547  solidDisSave[19] = 0.000282032;
1548  solidDisSave[20] = 4.07105e-05;
1549  solidDisSave[21] = 4.50796e-28;
1550  solidDisSave[22] = 0.000282032;
1551  solidDisSave[23] = 4.07105e-05;
1552  solidDisSave[24] = 4.50796e-28;
1553  solidDisSave[25] = 0.000278934;
1554  solidDisSave[26] = 3.56933e-05;
1555  solidDisSave[27] = 4.50796e-28;
1556  solidDisSave[28] = 0.000278934;
1557  solidDisSave[29] = 3.56933e-05;
1558  solidDisSave[30] = 4.50796e-28;
1559  solidDisSave[31] = 0.0002767;
1560  solidDisSave[32] = 3.12723e-05;
1561  solidDisSave[33] = 8.55785e-28;
1562  solidDisSave[34] = 0.0002767;
1563  solidDisSave[35] = 3.12723e-05;
1564  solidDisSave[36] = 4.50796e-28;
1565  solidDisSave[37] = 0.000275146;
1566  solidDisSave[38] = 2.74114e-05;
1567  solidDisSave[39] = 4.50796e-28;
1568  solidDisSave[40] = 0.000275146;
1569  solidDisSave[41] = 2.74114e-05;
1570  solidDisSave[42] = 4.50796e-28;
1571  solidDisSave[43] = 0.000274116;
1572  solidDisSave[44] = 2.40609e-05;
1573  solidDisSave[45] = 4.50796e-28;
1574  solidDisSave[46] = 0.000274116;
1575  solidDisSave[47] = 2.40609e-05;
1576  solidDisSave[48] = 8.55785e-28;
1577  solidDisSave[49] = 0.000273477;
1578  solidDisSave[50] = 2.11655e-05;
1579  solidDisSave[51] = 4.50796e-28;
1580  solidDisSave[52] = 0.000273477;
1581  solidDisSave[53] = 2.11655e-05;
1582  solidDisSave[54] = 8.55785e-28;
1583  solidDisSave[55] = 0.000273123;
1584  solidDisSave[56] = 1.86691e-05;
1585  solidDisSave[57] = 4.50796e-28;
1586  solidDisSave[58] = 0.000273123;
1587  solidDisSave[59] = 1.86691e-05;
1588  solidDisSave[60] = 4.50796e-28;
1589  solidDisSave[61] = 0.00027297;
1590  solidDisSave[62] = 1.65176e-05;
1591  solidDisSave[63] = 4.50796e-28;
1592  solidDisSave[64] = 0.00027297;
1593  solidDisSave[65] = 1.65176e-05;
1594  solidDisSave[66] = 4.50796e-28;
1595  solidDisSave[67] = 0.000272951;
1596  solidDisSave[68] = 1.46611e-05;
1597  solidDisSave[69] = 4.50796e-28;
1598  solidDisSave[70] = 0.000272951;
1599  solidDisSave[71] = 1.46611e-05;
1600  solidDisSave[72] = 4.50796e-28;
1601  solidDisSave[73] = 0.000273019;
1602  solidDisSave[74] = 1.30543e-05;
1603  solidDisSave[75] = 4.50796e-28;
1604  solidDisSave[76] = 0.000273019;
1605  solidDisSave[77] = 1.30543e-05;
1606  solidDisSave[78] = 4.50796e-28;
1607  solidDisSave[79] = 0.000273137;
1608  solidDisSave[80] = 1.16571e-05;
1609  solidDisSave[81] = 4.50796e-28;
1610  solidDisSave[82] = 0.000273137;
1611  solidDisSave[83] = 1.16571e-05;
1612  solidDisSave[84] = 4.50796e-28;
1613  solidDisSave[85] = 0.000273281;
1614  solidDisSave[86] = 1.04348e-05;
1615  solidDisSave[87] = 8.55785e-28;
1616  solidDisSave[88] = 0.000273281;
1617  solidDisSave[89] = 1.04348e-05;
1618  solidDisSave[90] = 8.55785e-28;
1619  solidDisSave[91] = 0.000273436;
1620  solidDisSave[92] = 9.35745e-06;
1621  solidDisSave[93] = 8.55785e-28;
1622  solidDisSave[94] = 0.000273436;
1623  solidDisSave[95] = 9.35745e-06;
1624  solidDisSave[96] = 8.55785e-28;
1625  solidDisSave[97] = 0.000273593;
1626  solidDisSave[98] = 8.39999e-06;
1627  solidDisSave[99] = 4.50796e-28;
1628  solidDisSave[100] = 0.000273593;
1629  solidDisSave[101] = 8.39999e-06;
1630  solidDisSave[102] = 8.55785e-28;
1631  solidDisSave[103] = 0.000273749;
1632  solidDisSave[104] = 7.54154e-06;
1633  solidDisSave[105] = 8.55785e-28;
1634  solidDisSave[106] = 0.000273749;
1635  solidDisSave[107] = 7.54154e-06;
1636  solidDisSave[108] = 8.55785e-28;
1637  solidDisSave[109] = 0.000273907;
1638  solidDisSave[110] = 6.76512e-06;
1639  solidDisSave[111] = 8.55785e-28;
1640  solidDisSave[112] = 0.000273907;
1641  solidDisSave[113] = 6.76512e-06;
1642  solidDisSave[114] = 4.50796e-28;
1643  solidDisSave[115] = 0.000274069;
1644  solidDisSave[116] = 6.05734e-06;
1645  solidDisSave[117] = 4.50796e-28;
1646  solidDisSave[118] = 0.000274069;
1647  solidDisSave[119] = 6.05734e-06;
1648  solidDisSave[120] = 8.55785e-28;
1649  solidDisSave[121] = 0.000274242;
1650  solidDisSave[122] = 5.40816e-06;
1651  solidDisSave[123] = 4.50796e-28;
1652  solidDisSave[124] = 0.000274242;
1653  solidDisSave[125] = 5.40816e-06;
1654  solidDisSave[126] = 8.55785e-28;
1655  solidDisSave[127] = 0.000274433;
1656  solidDisSave[128] = 4.81074e-06;
1657  solidDisSave[129] = 4.50796e-28;
1658  solidDisSave[130] = 0.000274433;
1659  solidDisSave[131] = 4.81074e-06;
1660  solidDisSave[132] = 4.50796e-28;
1661  solidDisSave[133] = 0.000274649;
1662  solidDisSave[134] = 4.26143e-06;
1663  solidDisSave[135] = 8.55785e-28;
1664  solidDisSave[136] = 0.000274649;
1665  solidDisSave[137] = 4.26143e-06;
1666  solidDisSave[138] = 8.55785e-28;
1667  solidDisSave[139] = 0.000274897;
1668  solidDisSave[140] = 3.75988e-06;
1669  solidDisSave[141] = 8.55785e-28;
1670  solidDisSave[142] = 0.000274897;
1671  solidDisSave[143] = 3.75988e-06;
1672  solidDisSave[144] = 4.50796e-28;
1673  solidDisSave[145] = 0.000275182;
1674  solidDisSave[146] = 3.30926e-06;
1675  solidDisSave[147] = 4.50796e-28;
1676  solidDisSave[148] = 0.000275182;
1677  solidDisSave[149] = 3.30926e-06;
1678  solidDisSave[150] = 4.50796e-28;
1679  solidDisSave[151] = 0.000275506;
1680  solidDisSave[152] = 2.91661e-06;
1681  solidDisSave[153] = 4.50796e-28;
1682  solidDisSave[154] = 0.000275506;
1683  solidDisSave[155] = 2.91661e-06;
1684  solidDisSave[156] = 4.50796e-28;
1685  solidDisSave[157] = 0.000275867;
1686  solidDisSave[158] = 2.59325e-06;
1687  solidDisSave[159] = 4.50796e-28;
1688  solidDisSave[160] = 0.000275867;
1689  solidDisSave[161] = 2.59325e-06;
1690  solidDisSave[162] = 4.50796e-28;
1691  solidDisSave[163] = 0.000276258;
1692  solidDisSave[164] = 2.3553e-06;
1693  solidDisSave[165] = 8.55785e-28;
1694  solidDisSave[166] = 0.000276258;
1695  solidDisSave[167] = 2.3553e-06;
1696  solidDisSave[168] = 4.50796e-28;
1697  solidDisSave[169] = 0.000276662;
1698  solidDisSave[170] = 2.22417e-06;
1699  solidDisSave[171] = 4.50796e-28;
1700  solidDisSave[172] = 0.000276662;
1701  solidDisSave[173] = 2.22417e-06;
1702  solidDisSave[174] = 4.50796e-28;
1703  solidDisSave[175] = 0.000277053;
1704  solidDisSave[176] = 2.22707e-06;
1705  solidDisSave[177] = 8.55785e-28;
1706  solidDisSave[178] = 0.000277053;
1707  solidDisSave[179] = 2.22707e-06;
1708  solidDisSave[180] = 8.55785e-28;
1709  solidDisSave[181] = 0.000277391;
1710  solidDisSave[182] = 2.3973e-06;
1711  solidDisSave[183] = 4.50796e-28;
1712  solidDisSave[184] = 0.000277391;
1713  solidDisSave[185] = 2.3973e-06;
1714  solidDisSave[186] = 4.50796e-28;
1715  solidDisSave[187] = 0.000277621;
1716  solidDisSave[188] = 2.77441e-06;
1717  solidDisSave[189] = 4.50796e-28;
1718  solidDisSave[190] = 0.000277621;
1719  solidDisSave[191] = 2.77441e-06;
1720  solidDisSave[192] = 8.55785e-28;
1721  solidDisSave[193] = 0.000277665;
1722  solidDisSave[194] = 3.40386e-06;
1723  solidDisSave[195] = 4.50796e-28;
1724  solidDisSave[196] = 0.000277665;
1725  solidDisSave[197] = 3.40386e-06;
1726  solidDisSave[198] = 4.50796e-28;
1727  solidDisSave[199] = 0.000277422;
1728  solidDisSave[200] = 4.33615e-06;
1729  solidDisSave[201] = 4.50796e-28;
1730  solidDisSave[202] = 0.000277422;
1731  solidDisSave[203] = 4.33615e-06;
1732  solidDisSave[204] = 4.50796e-28;
1733  solidDisSave[205] = 0.000276762;
1734  solidDisSave[206] = 5.62512e-06;
1735  solidDisSave[207] = 4.50796e-28;
1736  solidDisSave[208] = 0.000276762;
1737  solidDisSave[209] = 5.62512e-06;
1738  solidDisSave[210] = 4.50796e-28;
1739  solidDisSave[211] = 0.000275523;
1740  solidDisSave[212] = 7.32512e-06;
1741  solidDisSave[213] = 4.50796e-28;
1742  solidDisSave[214] = 0.000275523;
1743  solidDisSave[215] = 7.32512e-06;
1744  solidDisSave[216] = 4.50796e-28;
1745  solidDisSave[217] = 0.000273506;
1746  solidDisSave[218] = 9.48674e-06;
1747  solidDisSave[219] = 4.50796e-28;
1748  solidDisSave[220] = 0.000273506;
1749  solidDisSave[221] = 9.48674e-06;
1750  solidDisSave[222] = 4.50796e-28;
1751  solidDisSave[223] = 0.000270473;
1752  solidDisSave[224] = 1.21506e-05;
1753  solidDisSave[225] = 4.50796e-28;
1754  solidDisSave[226] = 0.000270473;
1755  solidDisSave[227] = 1.21506e-05;
1756  solidDisSave[228] = 4.50796e-28;
1757  solidDisSave[229] = 0.000266148;
1758  solidDisSave[230] = 1.53391e-05;
1759  solidDisSave[231] = 4.50796e-28;
1760  solidDisSave[232] = 0.000266148;
1761  solidDisSave[233] = 1.53391e-05;
1762  solidDisSave[234] = 4.50796e-28;
1763  solidDisSave[235] = 0.000260217;
1764  solidDisSave[236] = 1.90445e-05;
1765  solidDisSave[237] = 8.55785e-28;
1766  solidDisSave[238] = 0.000260217;
1767  solidDisSave[239] = 1.90445e-05;
1768  solidDisSave[240] = 4.50796e-28;
1769  solidDisSave[241] = 0.000252337;
1770  solidDisSave[242] = 2.32151e-05;
1771  solidDisSave[243] = 8.55785e-28;
1772  solidDisSave[244] = 0.000252337;
1773  solidDisSave[245] = 2.32151e-05;
1774  solidDisSave[246] = 4.50796e-28;
1775  solidDisSave[247] = 0.000242147;
1776  solidDisSave[248] = 2.77362e-05;
1777  solidDisSave[249] = 8.55785e-28;
1778  solidDisSave[250] = 0.000242147;
1779  solidDisSave[251] = 2.77362e-05;
1780  solidDisSave[252] = 4.50796e-28;
1781  solidDisSave[253] = 0.00022929;
1782  solidDisSave[254] = 3.24075e-05;
1783  solidDisSave[255] = 8.55785e-28;
1784  solidDisSave[256] = 0.00022929;
1785  solidDisSave[257] = 3.24075e-05;
1786  solidDisSave[258] = 8.55785e-28;
1787  solidDisSave[259] = 0.000213439;
1788  solidDisSave[260] = 3.69166e-05;
1789  solidDisSave[261] = 4.50796e-28;
1790  solidDisSave[262] = 0.000213439;
1791  solidDisSave[263] = 3.69166e-05;
1792  solidDisSave[264] = 4.50796e-28;
1793  solidDisSave[265] = 0.000194344;
1794  solidDisSave[266] = 4.08076e-05;
1795  solidDisSave[267] = 4.50796e-28;
1796  solidDisSave[268] = 0.000194344;
1797  solidDisSave[269] = 4.08076e-05;
1798  solidDisSave[270] = 4.50796e-28;
1799  solidDisSave[271] = 0.000171881;
1800  solidDisSave[272] = 4.34459e-05;
1801  solidDisSave[273] = 4.50796e-28;
1802  solidDisSave[274] = 0.000171881;
1803  solidDisSave[275] = 4.34459e-05;
1804  solidDisSave[276] = 8.55785e-28;
1805  solidDisSave[277] = 0.000146113;
1806  solidDisSave[278] = 4.39784e-05;
1807  solidDisSave[279] = 4.50796e-28;
1808  solidDisSave[280] = 0.000146113;
1809  solidDisSave[281] = 4.39784e-05;
1810  solidDisSave[282] = 4.50796e-28;
1811  solidDisSave[283] = 0.000117336;
1812  solidDisSave[284] = 4.1277e-05;
1813  solidDisSave[285] = 8.55785e-28;
1814  solidDisSave[286] = 0.000117336;
1815  solidDisSave[287] = 4.1277e-05;
1816  solidDisSave[288] = 4.50796e-28;
1817  solidDisSave[289] = 8.60282e-05;
1818  solidDisSave[290] = 3.38566e-05;
1819  solidDisSave[291] = 4.50796e-28;
1820  solidDisSave[292] = 8.60282e-05;
1821  solidDisSave[293] = 3.38566e-05;
1822  solidDisSave[294] = 4.50796e-28;
1823  solidDisSave[295] = 5.2381e-05;
1824  solidDisSave[296] = 1.96674e-05;
1825  solidDisSave[297] = 4.50796e-28;
1826  solidDisSave[298] = 5.2381e-05;
1827  solidDisSave[299] = 1.96674e-05;
1828 
1829  //When comparing double, exact comparison might not do the job. Hence im giving 5% error margin.
1830  for(int i = 0; i < size; i++){
1831  if( !(double_equals(disp[i],solidDisSave[i]))){
1832  return false;
1833  }
1834  }
1835  return true;
1836  }
bool double_equals(double a, double b, double epsilon=.001)

Here is the call graph for this function:

Here is the caller graph for this function: