svMultiPhysics
Loading...
Searching...
No Matches
read_files.h
1/* Copyright (c) Stanford University, The Regents of the University of California, and others.
2 *
3 * All Rights Reserved.
4 *
5 * See Copyright-SimVascular.txt for additional details.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject
13 * to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
19 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
22 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef READ_FILES_H
32#define READ_FILES_H
33
34#include "Simulation.h"
35
36#include <string>
37
38/// @brief Define some types used to pass data to functions.
39///
40/// \todo [TODO:DaveP] maxOutput=5 is is defined in consts but in the Fortran READEQ
41/// subroutine is defined as maxOutput=22.
42//
43namespace read_files_ns {
44
45 const int maxOutput = 22;
46 using EquationNdop = std::array<int, 4>;
47 using EquationOutputs = std::array<consts::OutputNameType, maxOutput>;
48 using EquationPhys = std::vector<consts::EquationType>;
49 using EquationProps = std::array<std::array<consts::PhysicalProperyType, consts::maxNProp>, 20>;
50
51 void face_match(ComMod& com_mod, faceType& lFa, faceType& gFa, Vector<int>& ptr);
52
53 void read_bc(Simulation* simulation, EquationParameters* eq_params, eqType& lEq, BoundaryConditionParameters* bc_params, bcType& lBc);
54
55 void read_bct(ComMod& com_mod, MBType& lMB, faceType& lFa, const std::string& fName);
56
57 void read_bf(ComMod& com_mod, BodyForceParameters* bf_params, bfType& lBf);
58
59 void read_cplbc_initialization_file(const std::string& file_name, cplBCType& cplBC);
60
61 void read_domain(Simulation* simulation, EquationParameters* eq_params, eqType& lEq, EquationProps& propL, EquationPhys = {});
62
63 void read_eq(Simulation* simulation, EquationParameters* params, eqType& eq);
64
65 void read_files(Simulation* simulation, const std::string& file_name);
66
67 void read_fourier_coeff_values_file(const std::string& file_name, bcType& lBc);
68 void read_fourier_coeff_values_file(const std::string& file_name, bfType& lBf);
69
70 void read_ls(Simulation* simulation, EquationParameters* eq_params, consts::SolverType solver_type, eqType& lEq);
71
72 void read_mat_model(Simulation* simulation, EquationParameters* eq_params, DomainParameters* domain_params, dmnType& lDmn);
73
74 void read_outputs(Simulation* simulation, EquationParameters* eq_params, eqType& lEq, EquationNdop& nDOP, EquationOutputs& outPuts);
75
76 void read_rmsh(Simulation* simulation, EquationParameters* eq_param);
77
78 void read_spatial_values(const ComMod& com_mod, const mshType& msh, const faceType& lFa, const std::string& file_name, bcType& lBc);
79
80 void read_temporal_values(const std::string& file_name, bcType& lBc);
81 void read_temporal_values(const std::string& file_name, bfType& lBf);
82
83 void read_temp_spat_values(const ComMod& com_mod, const mshType& msh, const faceType& lFa,
84 const std::string& file_name, bcType& lBc);
85 void read_temp_spat_values(const ComMod& com_mod, const mshType& msh, const std::string& file_name, bfType& lBf);
86
87 void read_trac_bcff(ComMod& com_mod, MBType& lMB, faceType& lFa, const std::string& file_name);
88
89 void read_fluid_visc_model(Simulation* simulation, EquationParameters* eq_params, DomainParameters* domain_params, dmnType& lDmn);
90
91 void read_solid_visc_model(Simulation* simulation, EquationParameters* eq_params, DomainParameters* domain_params, dmnType& lDmn);
92
93 void read_wall_props_ff(ComMod& com_mod, const std::string& file_path, const int iM, const int iFa);
94
95 void set_cmm_bdry(mshType& lM, Vector<int>& bNds);
96
97 void set_equation_properties(Simulation* simulation, EquationParameters* eq_params, eqType& lEq, EquationProps& propL,
98 EquationOutputs& outPuts, EquationNdop& nDOP);
99
100
101};
102
103#endif
104
Body force over a mesh using the "Add_BF" command.
Definition Parameters.h:618
The BoundaryConditionParameters stores paramaters for various type of boundary conditions under the A...
Definition Parameters.h:674
The ComMod class duplicates the data structures in the Fortran COMMOD module defined in MOD....
Definition ComMod.h:1354
The DomainParameters class stores parameters for the XML 'Domain' element to specify properties for s...
Definition Parameters.h:1073
The EquationParameters class stores parameters for the 'Add_equation' XML element used to specify an ...
Definition Parameters.h:1218
Moving boundary data structure (used for general BC)
Definition ComMod.h:100
Definition Simulation.h:41
The Vector template class is used for storing int and double data.
Definition Vector.h:50
Boundary condition data type.
Definition ComMod.h:144
Definition ComMod.h:297
For coupled 0D-3D problems.
Definition ComMod.h:776
Domain type is to keep track with element belong to which domain and also different physical quantiti...
Definition ComMod.h:432
Equation type.
Definition ComMod.h:1022
The face type containing mesh at boundary.
Definition ComMod.h:521
This is the container for a mesh or NURBS patch, those specific to NURBS are noted.
Definition ComMod.h:832
Define some types used to pass data to functions.
Definition read_files.cpp:54
void face_match(ComMod &com_mod, faceType &lFa, faceType &gFa, Vector< int > &ptr)
Match two faces?
Definition read_files.cpp:65