NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
ep16Prep.H
Go to the documentation of this file.
1 /*******************************************************************************
2 * Promesh *
3 * Copyright (C) 2022, IllinoisRocstar LLC. All rights reserved. *
4 * *
5 * Promesh is the property of IllinoisRocstar LLC. *
6 * *
7 * IllinoisRocstar LLC *
8 * Champaign, IL *
9 * www.illinoisrocstar.com *
10 * promesh@illinoisrocstar.com *
11 *******************************************************************************/
12 /*******************************************************************************
13 * This file is part of Promesh *
14 * *
15 * This version of Promesh is free software: you can redistribute it and/or *
16 * modify it under the terms of the GNU Lesser General Public License as *
17 * published by the Free Software Foundation, either version 3 of the License, *
18 * or (at your option) any later version. *
19 * *
20 * Promesh is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more *
23 * details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
27 * *
28 *******************************************************************************/
29 #ifndef NEMOSYS_EP16PREP_H_
30 #define NEMOSYS_EP16PREP_H_
31 
32 #ifdef HAVE_EPIC
33 
34 // Nemosys headers
35 #include "nemosys_export.h"
37 #include "Mesh/exoMesh.H"
38 
39 // other
40 #include <iostream>
41 
42 
43 // A preprocessor class derived from generic
44 // high-fidelity input generation class inputGen
45 // This derived class will implement methods to generate
46 // input files specific to EPIC 2016 code.
47 class NEMOSYS_EXPORT ep16Prep : public inputGen {
48  public:
49  explicit ep16Prep(const jsoncons::json &inputjson)
50  : inputGen(inputjson), _shortForm(false), _mdb(nullptr) {};
51 
52  ~ep16Prep() override;
53 
54  static ep16Prep *readJSON(const std::string &jsonFName);
55  static ep16Prep *readJSON(const jsoncons::json &inputjson);
56 
57  // basic methods
58  public:
59  void readJSON();
60  void process() override;
61  void read(const std::string &fname) override;
62  void close(const std::string &fname) override;
63 
64  // feature specifications
65  public:
66  void addNdeSet() override {};
67  void addElmSet() override {};
68 
69  // attribute assignment
70  public:
71  void addMat() override {};
72  void addBC() override {};
73  void addIC() override {};
74  bool addMisc() override { return false; };
75 
76  // internal processing
77  public:
78  void wrtPre(const std::string &_tsk, const std::string &__tsk) override;
79  void wrtCmnt(const std::string &cmnt) override;
80  void wrtMsh(const std::string &_tsk, const std::string &__tsk) override;
81  void wrtNdeCrds() override {};
82  void wrtElmCon() override {};
83  void wrtPost() override {};
84  void wrtNdeSet() override {};
85  void wrtElmSet() override {};
86  void wrtMisc(const std::string &_tsk, const std::string &__tsk) override;
87  void edit(const std::string &_tsk, const std::string &__tsk) override;
88 
89  private:
90  std::string _fname;
91  bool _shortForm;
93  std::map<std::string, int> _mat;
94  std::map<std::string, std::string> _bcs;
95  std::stringstream _buffer;
96 };
97 
98 #endif
99 
100 #endif // NEMOSYS_EP16PREP_H_
virtual void addElmSet()=0
virtual void addNdeSet()=0
A complete I/O class for EXODUS II file format.
Definition: exoMesh.H:172
virtual void wrtPost()=0
virtual void wrtMsh(const std::string &_tsk, const std::string &__tsk)=0
virtual void addMat()=0
virtual void wrtElmSet()=0
virtual void wrtMisc(const std::string &_tsk, const std::string &__tsk)=0
virtual void wrtCmnt(const std::string &cmnt)=0
virtual void wrtNdeCrds()=0
virtual void addBC()=0
virtual void close(const std::string &fname)=0
virtual void addIC()=0
virtual void read(const std::string &fname)=0
virtual void edit(const std::string &_tsk, const std::string &__tsk)=0
virtual bool addMisc()=0
virtual void wrtNdeSet()=0
virtual void wrtElmCon()=0
virtual void process()=0
virtual void wrtPre(const std::string &_tsk, const std::string &__tsk)=0