Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120278406
Configuration.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 05:20
Size
4 KB
Mime Type
text/x-c++
Expires
Sat, Jul 5, 05:20 (2 d)
Engine
blob
Format
Raw Data
Handle
27165788
Attached To
R3721 ConSol
Configuration.hpp
View Options
//
// Configuration.hpp
// ConserSolver
//
// Created by Fabian Moenkeberg on 04.05.17.
// Copyright © 2017 FabianMoenkeberg. All rights reserved.
//
#ifndef Configuration_hpp
#define Configuration_hpp
//class ModelBase;
#include <iostream>
#include <vector>
#include <ostream>
#include <chrono>
#include "reader.h"
#include <map>
enum evaluationMethod{PTWISE, MEANVALUE};
enum bcName{INFLOW, OUTFLOW, SLIPWALL, EXACT, PERIODIC, DIRICHLET, NEUMANN, MIXEDBC, MIXEDBCCOMPONENT, SPECIAL, DOUBLEMACHREF, Q2I, T2I, ABSORBINGBC, Q2Q, FAC, OPENFLOW, SCRAMJET};
enum ModelName{EULER, BURGERS,SW,BUCKLEYLEVERETT, LINEARADVECTION, KPP, KPPX, KPPY};
enum TimeIntegrationName{SSPRK2, SSPRK3, SSPRK5, FE};
enum limiterName{NOLIMITER, EXTREMAPRES};
enum ReconstrName{NORECONSTR, ENO, WENO};
enum InterpBaseName{MULTIQUADS, POLYNOMIALS, GAUSSIANS, POLYHARMONICS, NOTUSED};
enum PolyBasis{MONOMIALS, LAGRANGE};
enum FluxName{LAXFRIEDRICHS};
enum QuadratureName{GAUSSLOBATTO};
enum initalCondName{SIN,EULERSOD, BUBBLE, InitKPP, InitKPPY, COSCOS, InitBURGERS, SHOCKX, SINSIN, InitISENTROPICVORTEX, InitEULERBLAST, InitVORTEXSHOCK, RP, InitDOUBLEMACHREF, InitCUBE, InitFAC, InitAIRFOIL, InitNOZZLE};
enum sourceName{NOSOURCE};
enum stencilChoice{STD, OTF, SYMM};
enum MeshType{TRI, QUAD, HYBRID, TRIQUAD, MIXED, QUADQUAD, RT, RQ};
class Configuration {
ModelName model;
MeshType meshType;
evaluationMethod evalMethod;
bcName bcType[6];
ReconstrName reconstr;
InterpBaseName interpBase;
TimeIntegrationName time_scheme;
FluxName fluxScheme;
limiterName limiter_name;
bcName bcname;
initalCondName initialCond;
sourceName source;
stencilChoice stencilchoice;
bool reconstrOnCharact = 0;
int order;
int degPoly;
double tMax;
double cfl;
double shapeParam;
int maxNumWrite = 20;
int max_iter = 50000;
double min_residue;
std::vector<double> tInclude;
double xmin,xmax,ymin,ymax;
int dim;
std::vector<int> Nx_cell, Ny_cell;
char* input_file;
bool load_grid;
bool import_sol;
std::string grid_file;
std::string mesh_type;
std::string ic_file;
std::string source_file;
std::string OUTPUT_PATH;
std::string IMPORT_PATH;
std::string SOLN_DIR;
bool ic_file_read;
bool exact_available;
int nThreads;
std::map<std::string, double> constants;
public:
Configuration();
Configuration(char* file);
Configuration(ModelName model, evaluationMethod evalMethod, bcName bc, int order, double tMax, double cfl);
Configuration(ModelName model, evaluationMethod evalMethod, bcName bc, int order, double tMax, std::vector<double> tInclude, double cfl);
Configuration(ModelName model, evaluationMethod evalMethod, bcName bc, ReconstrName reconstr, InterpBaseName interpBase, int order, double tMax, double cfl);
Configuration(ModelName model, evaluationMethod evalMethod, bcName bc, ReconstrName reconstr, InterpBaseName interpBase, int order, double tMax, std::vector<double> tInclude, double cfl);
Configuration(ModelName model, evaluationMethod evalMethod, bcName bc, ReconstrName reconstr, InterpBaseName interpBase, bool reconstrOnCharact, int order, double tMax, double cfl);
Configuration(ModelName model, evaluationMethod evalMethod, bcName bc, ReconstrName reconstr, InterpBaseName interpBase, bool reconstrOnCharact, int order, double tMax, std::vector<double> tInclude, double cfl);
~Configuration(){};
ModelName getModel();
MeshType getMeshType();
TimeIntegrationName getTimeIntegration();
int getOrder();
evaluationMethod getEvalMethod();
bcName getBc();
ReconstrName getReconstr();
InterpBaseName getInterpBase();
limiterName getLimiter();
FluxName getFlux();
sourceName getSource();
initalCondName getInitialCond();
std::vector<double> getTInclude();
double getTmax();
double getCfl();
int getMaxNumWrite();
bool getReconstrOnCharact();
int getDim();
double getXmax();
double getXmin();
double getYmax();
double getYmin();
double getShapeParam();
std::vector<int> getNx();
std::vector<int> getNy();
void read ();
std::string getGridFile();
std::string getOutputPath();
std::string getImportPath();
bool getImportSol();
bool getLoadGrid();
int getNthreads();
stencilChoice getStencilChoice();
std::map<std::string, double> getConstants();
int getDegPoly();
private:
void read_grid (Reader&);
void read_constants (Reader&);
void read_numeric (Reader&);
void read_model (Reader&);
void read_initial_condition (Reader&);
void read_exact (Reader&);
void read_boundary_condition (Reader&);
void read_output (Reader&);
void read_import (Reader &);
};
#endif /* Configuration_hpp */
Event Timeline
Log In to Comment