Loading...
Searching...
No Matches
ITHACAutilities.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3 ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4 ██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5 ██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6 ██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7 ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8
9 * In real Time Highly Advanced Computational Applications for Finite Volumes
10 * Copyright (C) 2017 by the ITHACA-FV authors
11-------------------------------------------------------------------------------
12License
13 This file is part of ITHACA-FV
14 ITHACA-FV is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Lesser General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18 ITHACA-FV is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24Class
25 ITHACAutilities
26Description
27 Utilities to manage files and check existence of folders
28SourceFiles
29 ITHACAutilities.C
30\*---------------------------------------------------------------------------*/
31
36
37#ifndef ITHACAutilities_H
38#define ITHACAutilities_H
39
40#include "fvCFD.H"
41#include "IOmanip.H"
42#include "freestreamFvPatchField.H"
43#include <sys/stat.h>
44#include <unistd.h>
45#pragma GCC diagnostic push
46#pragma GCC diagnostic ignored "-Wold-style-cast"
47#include <Eigen/Eigen>
48#pragma GCC diagnostic pop
49#include <functional>
50#include "./colormod.H"
51#include "polyMeshTools.H"
52#include <chrono>
53#include "mixedFvPatchFields.H"
54#include "fvMeshSubset.H"
55using namespace std::placeholders;
56#include "Foam2Eigen.H"
57#include "ITHACAstream.H"
58#include "ITHACAparameters.H"
59#include "ITHACAgeometry.H"
60#include "ITHACAsystem.H"
61#include "ITHACAerror.H"
62#include "ITHACAassign.H"
63#include "ITHACAcoeffsMass.H"
64
65
66// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67
68
69/*---------------------------------------------------------------------------*\
70 Namespace ITHACAutilities Declaration
71\*---------------------------------------------------------------------------*/
72
74namespace ITHACAutilities
75{
76
77//--------------------------------------------------------------------------
87Eigen::MatrixXd rand(label rows, label cols, double min, double max);
88
89//--------------------------------------------------------------------------
97Eigen::MatrixXd rand(label rows, Eigen::MatrixXd minMax);
98
99
100//--------------------------------------------------------------------------
107bool isInteger(double ratio);
108
109//--------------------------------------------------------------------------
114bool isTurbulent();
115
116//------------------------------------------------------------------------------
125template<typename T>
126List<T> combineList(List<List<T>>& doubleList);
127
128//------------------------------------------------------------------------------
137Eigen::MatrixXd pinv_eigen_based(Eigen::MatrixXd &origin, const float er = 0);
138
139//------------------------------------------------------------------------------
147Eigen::MatrixXd invertMatrix(Eigen::MatrixXd& matrixToInvert, const word inversionMethod);
148
149
150};
151#endif
Header file of the Foam2Eigen class.
Header file of the ITHACAassign file.
Header file of the ITHACAcoeffsMass file.
Header file of the ITHACAerror file.
Header file of the geometry namespace.
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Header file of the ITHACAsystem file.
Simple header and source file of the Color::Modifier class to change color to the output stream.
Namespace to implement some useful assign operation of OF fields.
bool isInteger(double ratio)
This function checks if ratio is an integer.
Eigen::MatrixXd invertMatrix(Eigen::MatrixXd &matrixToInvert, const word inversionMethod)
Invert a matrix given the method name in the ITHACAdict.
Eigen::MatrixXd pinv_eigen_based(Eigen::MatrixXd &origin, const float er)
Using the Eigen library, using the SVD decomposition method to solve the matrix pseudo-inverse,...
Eigen::MatrixXd rand(label rows, label cols, double min, double max)
Generates random matrix with random values in an interval.
bool isTurbulent()
This function checks if the case is turbulent.
List< T > combineList(List< List< T > > &doubleList)
Combine a list of list into a single list with unique elements.