svMultiPhysics
Loading...
Searching...
No Matches
set_output_props.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// The 'output_props_map' map defined here sets equation
32// output properties from the given OutputNameType.
33//
34
35#include <tuple>
36
37/// @brief The 'OutputProps' tuple stores data for the 'outputType' object for
38///
39/// output.grp - The group that this belong to (one of outType_)
40/// output.o - Offset from the first index
41/// output.l - Length of the outputed variable
42/// output.name - The name to be used for the output and also in input file
43//
44using OutputProps = std::tuple<consts::OutputNameType, int, int, std::string>;
45
46/// @brief Reproduces Fortran READOUTPUTS.
47//
48std::map<consts::OutputNameType, OutputProps> output_props_map =
49{
50 // -----------------------------------------------------------------
51 // output group o l name
52 // -----------------------------------------------------------------
53 {OutputNameType::out_absVelocity, std::make_tuple(OutputNameType::outGrp_absV, 0, nsd, "Absolute_velocity") },
54 {OutputNameType::out_acceleration, std::make_tuple(OutputNameType::outGrp_A, 0, nsd, "Acceleration") },
55 {OutputNameType::out_cauchy, std::make_tuple(OutputNameType::outGrp_cauchy, 0, com_mod.nsymd, "Cauchy_stress") },
56
57 {OutputNameType::out_CGInv1, std::make_tuple(OutputNameType::out_CGInv1, 0, 1, "CG_Strain_Trace") },
58 {OutputNameType::out_CGstrain, std::make_tuple(OutputNameType::outGrp_C, 0, com_mod.nsymd, "CG_Strain") },
59
60 {OutputNameType::out_defGrad, std::make_tuple(OutputNameType::outGrp_F, 0, nsd*nsd, "Def_grad") },
61 {OutputNameType::out_displacement, std::make_tuple(OutputNameType::outGrp_D, 0, nsd, "Displacement") },
62 {OutputNameType::out_divergence, std::make_tuple(OutputNameType::outGrp_divV, 0, 1, "Divergence") },
63 {OutputNameType::out_energyFlux, std::make_tuple(OutputNameType::outGrp_eFlx, 0, nsd, "Energy_flux") },
64
65 {OutputNameType::out_fibAlign, std::make_tuple(OutputNameType::outGrp_fA, 0, 1, "Fiber_alignment") },
66 {OutputNameType::out_fibDir, std::make_tuple(OutputNameType::outGrp_fN, 0, nsd, "Fiber_direction") },
67 {OutputNameType::out_fibStrn, std::make_tuple(OutputNameType::outGrp_fS, 0, 1, "Fiber_shortening") },
68
69 {OutputNameType::out_heatFlux, std::make_tuple(OutputNameType::outGrp_hFlx, 0, nsd, "Heat_flux") },
70 {OutputNameType::out_integ, std::make_tuple(OutputNameType::outGrp_I, 0, 1, nsd == 2 ? "Area" : "Volume") },
71 {OutputNameType::out_jacobian, std::make_tuple(OutputNameType::outGrp_J, 0, 1, "Jacobian") },
72 {OutputNameType::out_mises, std::make_tuple(OutputNameType::outGrp_mises, 0, 1, "VonMises_stress") },
73 {OutputNameType::out_pressure, std::make_tuple(OutputNameType::outGrp_Y, nsd, 1, "Pressure") },
74 {OutputNameType::out_strain, std::make_tuple(OutputNameType::outGrp_strain, 0, com_mod.nsymd, "Strain") },
75 {OutputNameType::out_strainInv, std::make_tuple(OutputNameType::outGrp_stInv, 0, nsd, "Strain_invariants") },
76 {OutputNameType::out_stress, std::make_tuple(OutputNameType::outGrp_stress, 0, com_mod.nsymd, "Stress") },
77 {OutputNameType::out_temperature, std::make_tuple(OutputNameType::outGrp_Y, 0, 1, "Temperature") },
78 {OutputNameType::out_traction, std::make_tuple(OutputNameType::outGrp_trac, 0, nsd, "Traction") },
79 {OutputNameType::out_velocity, std::make_tuple(OutputNameType::outGrp_Y, 0, nsd, "Velocity") },
80 {OutputNameType::out_viscosity, std::make_tuple(OutputNameType::outGrp_Visc, 0, 1, "Viscosity") },
81 {OutputNameType::out_voltage, std::make_tuple(OutputNameType::outGrp_Y, 0, 1, "Action_potential") },
82 {OutputNameType::out_vortex, std::make_tuple(OutputNameType::outGrp_vortex, 0, 1, "Vortex") },
83 {OutputNameType::out_vorticity, std::make_tuple(OutputNameType::outGrp_vort, 0, maxNSD, "Vorticity") },
84 {OutputNameType::out_WSS, std::make_tuple(OutputNameType::outGrp_WSS, 0, maxNSD, "WSS") }
85};
86