FEDEM Solver  R8.0
Source code of the dynamics solver
Functions
compareResponse.C File Reference

Utility for comparing two ASCII files with numerical data. More...

#include <fstream>
#include <iostream>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
Include dependency graph for compareResponse.C:

Functions

int compareResponse (const char *fn1, const char *fn2, double eps, int skip)
 Utility function to compare two ASCII files with numerical data. More...
 

Detailed Description

Utility for comparing two ASCII files with numerical data.

This is only used to facilitate regression testing of the solver, where a simulation generates some responses (time history data), which are to be compared against reference responses stored on some file. It is typically invoked at the end of the simulation, after the response to be checked has been exported to an ASCII-file.

Author
Knut Morten Okstad, Fedem Technology AS
Date
13 Dec 2016

Function Documentation

◆ compareResponse()

int compareResponse ( const char *  fn1,
const char *  fn2,
double  eps,
int  skip 
)

Utility function to compare two ASCII files with numerical data.

Parameters
[in]fn1Path to the first file
[in]fn2Path to the second file (with reference data)
[in]epsComparison tolerance
[in]skipNumber of initial lines to skip coomparison for
Here is the caller graph for this function: