svMultiPhysics
Loading...
Searching...
No Matches
Parameters.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 PARAMETERS_H
32#define PARAMETERS_H
33
34#include <any>
35#include <functional>
36#include <iostream>
37#include <map>
38#include <regex>
39#include <set>
40#include <sstream>
41#include <string>
42#include <tuple>
43#include <variant>
44#include <vector>
45
46#include "tinyxml2.h"
47
48template<typename T>
49
50/// @brief The Parameter class template is used to store a named
51/// paramater and its scalar value as a basic type: bool, double,
52/// int and string.
53///
54/// The classes defined here are used to process svFSIplus simulation parameters read in
55/// from an Extensible Markup Language (XML) format file. XML is a simple text-based format
56/// for representing structured information.
57///
58/// An XML document is formed as an element tree. The XML tree starts at a root element and
59/// branches from the root to sub-elements. All elements can have sub-elements:
60///
61/// \code{.cpp}
62/// <svMultiPhysicsFile>
63/// <element>
64/// <subelement>.....</subelement>
65/// </element>
66/// </svMultiPhysicsFile>
67/// \endcode
68///
69/// The elements in the svFSIplus simulation file are represented by sections of
70/// related parameters. Sub-elements are refered to as sub-sections.
71///
72///-----------------
73/// Parameters class
74///-----------------
75/// The Parameters class is the top level class. It contains objects used to store
76/// parameters for the sections making up an XML simulation parameters file
77///
78/// 1) General (GeneralSimulationParameters)
79/// 2) Mesh (MeshParameters)
80/// 3) Equation (EquationParameters)
81/// 4) Projection (ProjectionParameters)
82///
83/// Each object contains methods to parse the XML file for the parameters defined for it.
84/// These section objects may also contain objects representing the sub-sections defined
85/// for each section.
86///
87///-----------------
88/// Section objects
89///-----------------
90/// Each section object contains objects representing parameters. A parameter's name and value
91/// is stored using either a Parameter and VectorParamater template objects. A parameter
92/// value is stored as a basic type: bool, double, int and string.
93///
94/// Parameter objects in a section class are named using the same XML element name with the 1st
95/// character lower case.
96///
97/// Example: GeneralSimulationParameters class
98///
99/// \code{.cpp}
100/// Parameter<bool> verbose; // <Verbose>
101/// Parameter<double> spectral_radius_of_infinite_time_step; // <Spectral_radius_of_infinite_time_step>
102/// Parameter<double> time_step_size; // <Time_step_size>
103/// \endcode
104///
105/// The name and default value for each parameter is defined in a section object's constructor.
106///
107/// Parameter values are set using the set_values() method which contains calls to tinyxml2
108/// to parse parameter values from an XML file.
109///
110/// Each section object inherits from the ParameterLists class. This class provides methods to
111/// store parameters in a map and process iterated over them for setting values and other operations.
113{
114 public:
115 Parameter() {};
116
117 Parameter(const std::string& name, T value, bool required, std::vector<T> range = {}) :
118 value_(value), name_(name), required_(required)
119 {
120 value_ = value;
121 range_ = range;
122 };
123
124 std::string name() const { return name_; };
125 T value() const { return value_; };
126 T operator()() const { return value_; };
127 bool defined() const { return value_set_; };
128
129 /// @brief Get the value of a parameter as a string.
130 std::string svalue()
131 {
132 std::ostringstream str_stream;
133 str_stream << value_;
134 return str_stream.str();
135 }
136
137 friend std::ostream& operator << (std::ostream& out, const Parameter<T>& param)
138 {
139 out << param.value();
140 return out;
141 }
142
143 /// @brief Set the parameter name and value, and if it is required.
144 void set(const std::string& name, bool required, T value) {
145 name_ = name;
146 required_ = required;
147 value_ = value;
148 }
149
150 /// @brief Set the parameter value from a string.
151 void set(const std::string& str_value)
152 {
153 if (str_value == "") {
154 value_ = T{0};
155 }
156
157 auto str = str_value;
158 std::string::iterator end_pos = std::remove(str.begin(), str.end(), ' ');
159 str.erase(end_pos, str.end());
160
161 std::istringstream str_stream(str);
162 if (!(str_stream >> value_)) {
163 std::istringstream str_stream(str);
164 if (!(str_stream >> std::boolalpha >> value_)) {
165 throw std::runtime_error("Incorrect value '" + str + "' for '" + name_ + "'.");
166 }
167 }
168
169 value_set_ = true;
170 }
171
172 bool check_required_set()
173 {
174 if (!required_) {
175 return true;
176 }
177 return value_set_;
178 }
179
180 T value_ = T{0};
181 std::string name_ = "";
182 bool required_ = false;
183 bool value_set_ = false;
184 std::vector<T> range_;
185};
186
187/// @brief The VectorParameter class template is used to store a named
188/// paramater and its vector of values as a basic type: bool, double,
189/// int and string.
190template<typename T>
192{
193 public:
194 VectorParameter() {};
195
196 VectorParameter(const std::string& name, const std::vector<T>& value, bool required, std::vector<T> range = {}) :
197 value_(value), name_(name), required_(required)
198 {
199 value_ = value;
200 range_ = range;
201 };
202
203 std::string name() const { return name_; };
204 std::vector<T> value() const { return value_; };
205 bool defined() const { return value_set_; };
206 int size() const { return value_.size(); };
207
208 std::vector<T> operator()() const { return value_; };
209 const double& operator[](const int i) const { return value_[i]; };
210
211 /// @brief Get the string representation of the parameter value.
212 std::string svalue()
213 {
214 std::string str;
215
216 if constexpr (std::is_same<T, std::string>::value) {
217 for (auto v : value_) {
218 str += " " + v + " ";
219 }
220 } else {
221 for (auto v : value_) {
222 str += " " + std::to_string(v);
223 }
224 }
225
226 return str;
227 }
228
229 friend std::ostream& operator << (std::ostream& out, const VectorParameter<T>& param)
230 {
231 for (int i = 0; i < param.size(); i++) {
232 out << param.value_[i];
233 }
234 return out;
235 }
236
237 /// @brief Set the parameter name and value, and if it is required.
238 void set(const std::string& name, bool required, const std::vector<T>& value)
239 {
240 name_ = name;
241 required_ = required;
242 value_ = value;
243 }
244
245 /// @brief Set the parameter value from a string.
246 void set(const std::string& str_value)
247 {
248 if (str_value == "") {
249 return;
250 }
251
252 std::string error_msg = "Improper vector format '" + str_value + "' found in '" + name_ + "'." + " Vector format is: (x,y,z)";
253 std::regex sep("\\(|\\)|\\,");
254 auto str = std::regex_replace(str_value, sep, " ");
255
256 if constexpr (std::is_same<T, std::string>::value) {
257 std::stringstream ssin(str);
258 std::string value;
259 while (ssin >> value) {
260 value_.push_back(value);
261 }
262 } else {
263 T value;
264 std::istringstream ssin(str);
265 while (ssin >> value) {
266 value_.push_back(value);
267 }
268 }
269 }
270
271 bool check_required_set()
272 {
273 if (!required_) {
274 return true;
275 }
276 return value_set_;
277 }
278
279 std::vector<T> value_;
280 std::string name_;
281 bool required_ = false;
282 bool value_set_ = false;
283 std::vector<T> range_;
284};
285
286/// @brief Defines parameter name and value, and stores them in
287/// maps for settng values from XML.
289{
290 public:
291
292 ParameterLists() { }
293
294 void set_xml_element_name(const std::string& name)
295 {
296 xml_element_name = name;
297 }
298
299 /// @brief Set the name, default value and the parameter required flag.
300 void set_parameter(const std::string& name, const bool value, bool required, Parameter<bool>& param)
301 {
302 param.set(name, required, value);
303 params_map[name] = &param;
304 }
305
306 void set_parameter(const std::string& name, const double value, bool required, Parameter<double>& param)
307 {
308 param.set(name, required, value);
309 params_map[name] = &param;
310 }
311
312 void set_parameter(const std::string& name, std::initializer_list<double> value, bool required, VectorParameter<double>& param)
313 {
314 param.set(name, required, value);
315 params_map[name] = &param;
316 }
317
318 void set_parameter(const std::string& name, std::initializer_list<int> value, bool required, VectorParameter<int>& param)
319 {
320 param.set(name, required, value);
321 params_map[name] = &param;
322 }
323
324 void set_parameter(const std::string& name, std::initializer_list<std::string> value, bool required,
326 {
327 param.set(name, required, value);
328 params_map[name] = &param;
329 }
330
331 void set_parameter(const std::string& name, const int value, bool required, Parameter<int>& param, std::vector<int> range = {})
332 {
333 param.set(name, required, value);
334 params_map[name] = &param;
335 }
336
337 void set_parameter(const std::string& name, const std::string& value, bool required, Parameter<std::string>& param)
338 {
339 param.set(name, required, value);
340 params_map[name] = &param;
341 }
342
343 /// @brief Set the value of a paramter from a string.
344 void set_parameter_value(const std::string& name, const std::string& value)
345 {
346 if (params_map.count(name) == 0) {
347 throw std::runtime_error("Unknown " + xml_element_name + " XML element '" + name + "'.");
348 }
349
350 std::visit([value](auto&& p) { p->set(value); }, params_map[name]);
351 }
352
353 /// @brief Check if any required parameters have not been set.
355 {
356 bool unset_found = false;
357
358 for (auto& [ key, param ] : params_map) {
359 if (std::visit([](auto&& p) {
360 return !p->check_required_set();
361 }, param)) {
362 throw std::runtime_error(xml_element_name + " XML element '" + key + "' has not been set.");
363 }
364 }
365 }
366
367 /// @brief Get the defined parameters as a map of strings.
368 std::map<std::string,std::string> get_parameter_list()
369 {
370 std::map<std::string,std::string> params;
371
372 for (auto& [ key, param ] : params_map) {
373 std::visit([&params](auto&& p) {
374 params[p->name()] = p->svalue();
375 }, param);
376 }
377
378 return params;
379 }
380
381 /// @brief Print the parameters.
383 {
384 for (auto& [ key, param ] : params_map) {
385 std::cout << key << ": ";
386 std::visit([](auto& p) {
387 std::cout << p->name_ << std::endl;
388 std::cout << p->svalue() << std::endl;
389 }, param);
390 }
391 }
392
393 /// @brief Map used for storing parameters by name / Parameter template union.
394 std::map<std::string, std::variant<Parameter<bool>*, Parameter<double>*, Parameter<int>*,
397
398 std::string xml_element_name = "";
399};
400
401//////////////////////////////////////////////////////////
402// ConstitutiveModelParameters //
403//////////////////////////////////////////////////////////
404
405// The following classes are used to store parameters for
406// various constitutive models.
407
409{
410 public:
412 bool defined() const { return value_set; };
413 void set_values(tinyxml2::XMLElement* con_model_params);
414 void print_parameters();
420 bool value_set = false;
421};
422
424{
425 public:
427 bool defined() const { return value_set; };
428 void set_values(tinyxml2::XMLElement* con_model_params);
429 void print_parameters();
434 bool value_set = false;
435};
436
437//---------------------
438// HolzapfelParameters
439//---------------------
441{
442 public:
444 bool defined() const { return value_set; };
445 void set_values(tinyxml2::XMLElement* con_model_params);
446 void print_parameters();
447
457
458 bool value_set = false;
459};
460
462{
463 public:
465 bool defined() const { return value_set; };
466 void set_values(tinyxml2::XMLElement* con_model_params);
467 void print_parameters();
472 Parameter<double> kappa;
473 bool value_set = false;
474};
475
477{
478 public:
480 bool defined() const { return value_set; };
481 void set_values(tinyxml2::XMLElement* con_model_params);
482 void print_parameters();
485 bool value_set = false;
486};
487
489{
490 public:
492 void set_values(tinyxml2::XMLElement* modl_params);
493 void print_parameters();
494 bool value_set = false;
495};
496
498{
499 public:
501 void set_values(tinyxml2::XMLElement* modl_params);
502 void print_parameters();
503 bool value_set = false;
504};
505
506/// @brief The ConstitutiveModelParameters class store parameters
507/// for various constitutive models.
509{
510 public:
512 void print_parameters();
514 bool defined() const { return value_set; };
515 void set_values(tinyxml2::XMLElement* modl_params);
516 static const std::string xml_element_name_;
517
518 // Model types supported.
519 static const std::string GUCCIONE_MODEL;
520 static const std::string HGO_MODEL;
521 static const std::string HOLZAPFEL_OGDEN_MODEL;
522 static const std::string HOLZAPFEL_OGDEN_MA_MODEL;
523 static const std::string LEE_SACKS;
524 static const std::string NEOHOOKEAN_MODEL;
525 static const std::string STVENANT_KIRCHHOFF_MODEL;
526 static const std::map<std::string, std::string> constitutive_model_types;
527
528 // Constitutive model type.
530
531 GuccioneParameters guccione;
532 HolzapfelParameters holzapfel;
533 HolzapfelGasserOgdenParameters holzapfel_gasser_ogden;
534 LeeSacksParameters lee_sacks;
535 MooneyRivlinParameters mooney_rivlin;
536 NeoHookeanParameters neo_hookean;
537 StVenantKirchhoffParameters stvenant_kirchhoff;
538
539 bool value_set = false;
540};
541
542/// @brief Couple to reduced-order models.
544{
545 public:
547
548 static const std::string xml_element_name_;
549
550 bool defined() const { return value_set; };
551 void set_values(tinyxml2::XMLElement* xml_elem);
552 void print_parameters();
553
554 // attribute.
556
557 Parameter<std::string> file_name_for_0D_3D_communication;
558 Parameter<std::string> file_name_for_saving_unknowns;
559 Parameter<int> number_of_unknowns;
560 Parameter<int> number_of_user_defined_outputs;
561 Parameter<std::string> unknowns_initialization_file_path;
562
563 Parameter<std::string> zerod_code_file_path;
564
565 bool value_set = false;
566};
567
568/// @brief Coupling to GenBC.
570{
571 public:
573
574 static const std::string xml_element_name_;
575
576 bool defined() const { return value_set; };
577 void set_values(tinyxml2::XMLElement* xml_elem);
578
579 // attributes.
581
582 // String parameters.
583 Parameter<std::string> zerod_code_file_path;
584
585 bool value_set = false;
586};
587
588//-----------------------
589// CoupleSvZeroDParameters
590//-----------------------
591// Coupling to svZeroD.
592//
594{
595 public:
597
598 static const std::string xml_element_name_;
599
600 bool defined() const { return value_set; };
601 void set_values(tinyxml2::XMLElement* xml_elem);
602
603 // attributes.
605
606 bool value_set = false;
607};
608/// @brief Body force over a mesh using the "Add_BF" command.
609///
610/// \code {.xml}
611/// <Add_BF mesh="msh" >
612/// <Type> volumetric </Type>
613/// <Time_dependence> general </Time_dependence>
614/// <Temporal_and_spatial_values_file_path> bforce.dat </Temporal_and_spatial_values_file_path>
615/// </Add_BF>
616/// \endcode
618{
619 public:
621 void print_parameters();
622 void set_values(tinyxml2::XMLElement* xml_elem);
623 static const std::string xml_element_name_;
624
625 // Attributes.
626 Parameter<std::string> mesh_name;
627
628 // Boolean parameters.
629 Parameter<bool> ramp_function;
630
631 // Double parameters.
632 Parameter<double> value;
633
634 // String parameters.
635 Parameter<std::string> fourier_coefficients_file_path;
636 Parameter<std::string> spatial_values_file_path;
637 Parameter<std::string> temporal_and_spatial_values_file_path;
638 Parameter<std::string> temporal_values_file_path;
639 Parameter<std::string> time_dependence;
641};
642
643/// @brief RCR values for Neumann BC type.
644///
645/// \code {.xml}
646/// <RCR_values>
647/// <Proximal_resistance> 121.0 </Proximal_resistance>
648/// <Capacitance> 1.5e-5 </Capacitance>
649/// <Distal_resistance> 1212.0 </Distal_resistance>
650/// </RCR_values>
651/// \endcode
653{
654 public:
656
657 static const std::string xml_element_name_;
658
659 void set_values(tinyxml2::XMLElement* xml_elem);
660 void print_parameters();
661
662 Parameter<double> capacitance;
663 Parameter<double> distal_pressure;
664 Parameter<double> distal_resistance;
665 Parameter<double> initial_pressure;
666 Parameter<double> proximal_resistance;
667
668 bool value_set = false;
669};
670
671/// @brief The BoundaryConditionParameters stores paramaters for various
672/// type of boundary conditions under the Add_BC XML element.
674{
675 public:
677 void print_parameters();
678 void set_values(tinyxml2::XMLElement* bc_params);
679 static const std::string xml_element_name_;
680
681 // RCR parameters sub-element.
683
684 // Add_BC name= attribute.
686
687 // Add_BC XML elements.
688 //
689 Parameter<bool> apply_along_normal_direction;
690 Parameter<std::string> bct_file_path;
691
692 Parameter<double> damping;
693 Parameter<double> distal_pressure;
694 VectorParameter<int> effective_direction;
695 Parameter<bool> follower_pressure_load;
696 Parameter<std::string> fourier_coefficients_file_path;
697
698 Parameter<bool> impose_flux;
699 Parameter<bool> impose_on_state_variable_integral;
700 Parameter<std::string> initial_displacements_file_path;
701
702 Parameter<double> penalty_parameter;
703 Parameter<double> penalty_parameter_normal;
704 Parameter<double> penalty_parameter_tangential;
705 Parameter<std::string> prestress_file_path;
707 Parameter<bool> ramp_function;
708
709 Parameter<std::string> cst_shell_bc_type;
710 Parameter<std::string> spatial_profile_file_path;
711 Parameter<std::string> spatial_values_file_path;
712 Parameter<double> stiffness;
713
714 Parameter<std::string> temporal_and_spatial_values_file_path;
715 Parameter<std::string> temporal_values_file_path;
716 Parameter<std::string> time_dependence;
717 Parameter<std::string> traction_values_file_path;
718 Parameter<double> traction_multiplier;
720
721 Parameter<bool> undeforming_neu_face;
722 Parameter<double> value;
723 Parameter<bool> weakly_applied;
724 Parameter<bool> zero_out_perimeter;
725};
726
727/// @brief The OutputParameters class stores parameters for the
728/// Output XML element under Add_equation.
729///
730/// \code {.xml}
731/// <Output type="Volume_integral" >
732/// <Temperature> true </Temperature>
733/// </Output>
734/// \endcode
736{
737 public:
739
740 static const std::string xml_element_name_;
741
742 void print_parameters();
743 void set_values(tinyxml2::XMLElement* xml_elem);
744 bool get_output_value(const std::string& name);
745 std::string get_alias_value(const std::string& name);
746
748
749 // List of output names.
750 std::vector<Parameter<bool>> output_list;
751
752 // List of alias output names.
753 std::vector<Parameter<std::string>> alias_list;
754};
755
756/// @brief The PrecomputedSolutionParameters class stores parameters for the
757/// 'Precomputed_solution' XML element used to read in the data from a precomputed solution
758/// for the simulation state
759/// \code {.xml}
760/// <Precomputed_solution>
761/// <Project_from_face> lumen_wall </Project_from_face>
762/// </Precomputed_solution>
763/// \endcode
764
766{
767 public:
769
770 void set_values(tinyxml2::XMLElement* xml_elem);
771
772 static const std::string xml_element_name_;
773
774 Parameter<std::string> field_name;
775 Parameter<std::string> file_path;
776 Parameter<double> time_step;
777 Parameter<bool> use_precomputed_solution;
778};
779
780/// @brief The ProjectionParameters class stores parameters for the
781/// 'Add_projection' XML element used for fluid-structure interaction
782/// simulations.
783/// \code {.xml}
784/// <Add_projection name="wall_inner" >
785/// <Project_from_face> lumen_wall </Project_from_face>
786/// </Add_projection>
787/// \endcode
789{
790 public:
792
793 void set_values(tinyxml2::XMLElement* xml_elem);
794
795 static const std::string xml_element_name_;
796
798
799 Parameter<std::string> project_from_face;
800 Parameter<double> projection_tolerance;
801};
802
803/// @brief The VariableWallPropsParameters class stores parameters for
804/// variable wall properties for the CMM equation.
806{
807 public:
809 static const std::string xml_element_name_;
810 bool defined() const { return value_set; };
811 void set_values(tinyxml2::XMLElement* xml_elemnt);
812
813 Parameter<std::string> mesh_name;
814 Parameter<std::string> wall_properties_file_path;
815 bool value_set = false;
816};
817
818
819//////////////////////////////////////////////////////////
820// FluidViscosity //
821//////////////////////////////////////////////////////////
822
823// The following classes are used to store parameters for
824// various fluid viscosity models.
825
827{
828 public:
830 void print_parameters();
831 void set_values(tinyxml2::XMLElement* equation_params);
832 Parameter<double> constant_value;
833};
834
836{
837 public:
839 void print_parameters();
840 void set_values(tinyxml2::XMLElement* xml_elem);
841
842 Parameter<double> limiting_high_shear_rate_viscosity;
843 Parameter<double> limiting_low_shear_rate_viscosity;
844 Parameter<double> power_law_index;
845 Parameter<double> shear_rate_tensor_multipler;
846 Parameter<double> shear_rate_tensor_exponent;
847};
848
850{
851 public:
853 void print_parameters();
854 void set_values(tinyxml2::XMLElement* xml_elem);
855 Parameter<double> asymptotic_viscosity;
856 Parameter<double> yield_stress;
857 Parameter<double> low_shear_rate_threshold;
858};
859
861{
862 public:
864
865 static const std::string xml_element_name_;
866
867 static const std::string CONSTANT_MODEL;
868 static const std::string CARREAU_YASUDA_MODEL;
869 static const std::string CASSONS_MODEL;
870 static const std::set<std::string> model_names;
871
872 void print_parameters();
873 void set_values(tinyxml2::XMLElement* xml_elem);
874
876
877 FluidViscosityNewtonianParameters newtonian_model;
878 FluidViscosityCarreauYasudaParameters carreau_yasuda_model;
880};
881
882//////////////////////////////////////////////////////////
883// SolidViscosity //
884//////////////////////////////////////////////////////////
885
886// The following classes are used to store parameters for
887// various solid viscosity models.
888
890{
891 public:
893 void print_parameters();
894 void set_values(tinyxml2::XMLElement* equation_params);
895 Parameter<double> constant_value;
896};
897
899{
900 public:
902 void print_parameters();
903 void set_values(tinyxml2::XMLElement* equation_params);
904 Parameter<double> constant_value;
905};
906
908{
909 public:
911
912 static const std::string xml_element_name_;
913
914 static const std::string NEWTONIAN_MODEL;
915 static const std::string POTENTIAL_MODEL;
916 static const std::set<std::string> model_names;
917
918 void print_parameters();
919 void set_values(tinyxml2::XMLElement* xml_elem);
920
922
923 SolidViscosityNewtonianParameters newtonian_model;
924 SolidViscosityPotentialParameters potential_model;
925};
926
927
928/// @brief The LinearAlgebraParameters class stores parameters for
929/// the 'Linear_algebra' XML element.
931{
932 public:
933 static const std::string xml_element_name_;
936 void print_parameters();
937 void set_values(tinyxml2::XMLElement* fsi_file);
938 bool defined() const { return values_set_; };
939
940 bool values_set_ = false;
942
943 Parameter<std::string> assembly;
944 Parameter<std::string> configuration_file;
945 Parameter<std::string> preconditioner;
946};
947
948/// @brief The LinearSolverParameters class stores parameters for
949/// the 'LS' XML element.
951{
952 public:
954
955 void print_parameters();
956 void set_values(tinyxml2::XMLElement* fsi_file);
957
958 static const std::string xml_element_name_;
959
961
962 Parameter<double> absolute_tolerance;
963 Parameter<int> krylov_space_dimension;
964
965 Parameter<int> max_iterations;
966 Parameter<int> ns_cg_max_iterations;
967 Parameter<double> ns_cg_tolerance;
968 Parameter<int> ns_gm_max_iterations;
969 Parameter<double> ns_gm_tolerance;
970
971 //Parameter<std::string> preconditioner;
972
973 Parameter<double> tolerance;
974
975 LinearAlgebraParameters linear_algebra;
976};
977
978/// @brief The StimulusParameters class stores parameters for
979/// 'Stimulus' XML element used to parameters for
980/// pacemaker cells.
981///
982/// \code {.xml}
983/// <Stimulus type="Istim" >
984/// <Amplitude> -52.0 </Amplitude>
985/// <Start_time> 0.0 </Start_time>
986/// <Duration> 1.0 </Duration>
987/// <Cycle_length> 10000.0 </Cycle_length>
988/// </Stimulus>
989/// \endcode
991{
992 public:
994
995 static const std::string xml_element_name_;
996
997 bool defined() const { return value_set; };
998 void print_parameters();
999 void set_values(tinyxml2::XMLElement* xml_elem);
1000
1002
1003 Parameter<double> amplitude;
1004 Parameter<double> cycle_length;
1005 Parameter<double> duration;
1006 Parameter<double> start_time;
1007
1008 bool value_set = false;
1009};
1010
1012{
1013 public:
1015
1016 static const std::string xml_element_name_;
1017
1018 bool defined() const { return value_set; };
1019 void print_parameters();
1020 void set_values(tinyxml2::XMLElement* xml_elem);
1021
1022 Parameter<std::string> x_coords_file_path;
1023 Parameter<std::string> y_coords_file_path;
1024 Parameter<std::string> z_coords_file_path;
1025
1026 bool value_set = false;
1027};
1028
1029/// @brief The FiberReinforcementStressParameters class stores fiber
1030/// reinforcement stress parameters for the 'Fiber_reinforcement_stress`
1031/// XML element.
1032///
1033/// \code {.xml}
1034/// <Fiber_reinforcement_stress type="Unsteady" >
1035/// <Temporal_values_file_path> fib_stress.dat </Temporal_values_file_path>
1036/// <Ramp_function> true </Ramp_function>
1037/// </Fiber_reinforcement_stress>
1038/// \endcode
1040{
1041 public:
1043
1044 static const std::string xml_element_name_;
1045
1046 bool defined() const { return value_set; };
1047 void print_parameters();
1048 void set_values(tinyxml2::XMLElement* xml_elem);
1049
1051
1052 Parameter<bool> ramp_function;
1053 Parameter<std::string> temporal_values_file_path;
1054 Parameter<double> value;
1055
1056 bool value_set = false;
1057};
1058
1059/// @brief The DomainParameters class stores parameters for the XML
1060/// 'Domain' element to specify properties for solving equations.
1061///
1062/// \code {.xml}
1063/// <Domain id="1" >
1064/// <Equation> fluid </Equation>
1065/// <Density> 1.06 </Density>
1066/// <Viscosity model="Constant" >
1067/// <Value> 0.04 </Value>
1068/// </Viscosity>
1069/// <Backflow_stabilization_coefficient> 0.2 </Backflow_stabilization_coefficient>
1070/// </Domain>
1071/// \endcode
1073{
1074 public:
1076
1077 static const std::string xml_element_name_;
1078
1079 void print_parameters();
1080 void set_values(tinyxml2::XMLElement* xml_elem);
1081
1082 // Parameters for sub-elements under the Domain element.
1083 ConstitutiveModelParameters constitutive_model;
1084 FiberReinforcementStressParameters fiber_reinforcement_stress;
1085 StimulusParameters stimulus;
1086 FluidViscosityParameters fluid_viscosity;
1087 SolidViscosityParameters solid_viscosity;
1088
1089 // Attributes.
1091
1092 Parameter<double> absolute_tolerance;
1093 VectorParameter<double> anisotropic_conductivity;
1094 Parameter<double> backflow_stabilization_coefficient;
1095
1096 Parameter<double> conductivity;
1097 //Parameter<std::string> constitutive_model_name;
1098 Parameter<double> continuity_stabilization_coefficient;
1099
1100 Parameter<double> density;
1101 Parameter<std::string> dilational_penalty_model;
1102
1103 Parameter<std::string> equation;
1104 Parameter<double> elasticity_modulus;
1105 Parameter<std::string> electrophysiology_model;
1106
1107 Parameter<double> feedback_parameter_for_stretch_activated_currents;
1108 Parameter<double> fluid_density;
1109 Parameter<double> force_x;
1110 Parameter<double> force_y;
1111 Parameter<double> force_z;
1112
1113 Parameter<double> isotropic_conductivity;
1114
1115 Parameter<double> mass_damping;
1116 Parameter<int> maximum_iterations;
1117 Parameter<double> momentum_stabilization_coefficient;
1118 Parameter<std::string> myocardial_zone;
1119
1120 Parameter<double> G_Na;
1121 Parameter<double> G_CaL;
1122 Parameter<double> G_Kr;
1123 Parameter<double> G_Ks;
1124 Parameter<double> G_to;
1125
1126 Parameter<double> tau_fi;
1127 Parameter<double> tau_si;
1128
1129 Parameter<std::string> ode_solver;
1130 Parameter<double> penalty_parameter;
1131 Parameter<double> poisson_ratio;
1132 Parameter<double> relative_tolerance;
1133
1134 Parameter<double> shell_thickness;
1135 Parameter<double> solid_density;
1136 Parameter<double> source_term;
1137 Parameter<double> time_step_for_integration;
1138
1139 // Inverse of Darcy permeability. Default value of 0.0 for Navier-Stokes and non-zero for Navier-Stokes-Brinkman
1140 Parameter<double> inverse_darcy_permeability;
1141};
1142
1143/// @brief The RemesherParameters class stores parameters for the
1144/// 'Remesher' XML element used for remeshing.
1145///
1146/// \code {.xml}
1147/// <Remesher type="Tetgen" >
1148/// <Max_edge_size name="lumen" value="0.7"> </Max_edge_size>
1149/// <Max_edge_size name="wall" value="0.5"> </Max_edge_size>
1150/// <Min_dihedral_angle> 10.0 </Min_dihedral_angle>
1151/// <Max_radius_ratio> 1.1 </Max_radius_ratio>
1152/// <Remesh_frequency> 1000 </Remesh_frequency>
1153/// <Frequency_for_copying_data> 1 </Frequency_for_copying_data>
1154/// </Remesher>
1155/// \endcode
1157{
1158 public:
1160
1161 static const std::string xml_element_name_;
1162 bool values_set_ = false;
1163
1164 bool defined() const { return values_set_; };
1165 void print_parameters();
1166 double get_edge_size(const std::string& name) const { return max_edge_sizes_.at(name); }
1167 bool has_edge_size(const std::string& name) const { return max_edge_sizes_.count(name) == 1; }
1168 void set_values(tinyxml2::XMLElement* mesh_elem);
1169
1170 // Values given in the 'Max_edge_size' element.
1171 std::map<std::string, double> max_edge_sizes_;
1172
1174 Parameter<double> min_dihedral_angle;
1175 Parameter<double> max_radius_ratio;
1176 Parameter<int> remesh_frequency;
1177 Parameter<int> frequency_for_copying_data;
1178};
1179
1180/// @brief The ContactParameters class stores parameters for the 'Contact''
1181/// XML element used to specify parameter values for contact
1182/// computations.
1184{
1185 public:
1187
1188 static const std::string xml_element_name_;
1189
1190 void print_parameters();
1191 void set_values(tinyxml2::XMLElement* xml_elem);
1192
1193 Parameter<double> closest_gap_to_activate_penalty;
1194
1195 Parameter<double> desired_separation;
1196
1197 Parameter<double> min_norm_of_face_normals;
1198
1200
1201 Parameter<double> penalty_constant;
1202};
1203
1204/// @brief The EquationParameters class stores parameters for the 'Add_equation'
1205/// XML element used to specify an equation to be solved (e.g. fluid).
1206///
1207/// \code {.xml}
1208/// <Add_equation type="FSI" >
1209/// <Coupled> true </Coupled>
1210/// <Min_iterations> 1 </Min_iterations>
1211/// <Max_iterations> 1 </Max_iterations>
1212/// .
1213/// .
1214/// .
1215/// </Add_equation>
1216/// \endcode
1218{
1219 public:
1221
1222 static const std::string xml_element_name_;
1223
1224 void print_parameters();
1225 void set_values(tinyxml2::XMLElement* xml_elem);
1226
1227 Parameter<double> backflow_stabilization_coefficient;
1228
1229 Parameter<double> conductivity;
1230 Parameter<double> continuity_stabilization_coefficient;
1231 Parameter<bool> coupled;
1232
1233 Parameter<double> density;
1234 Parameter<std::string> dilational_penalty_model;
1235
1236 Parameter<double> elasticity_modulus;
1237
1238 Parameter<std::string> initialize;
1239 Parameter<bool> initialize_rcr_from_flow;
1240
1241 Parameter<int> max_iterations;
1242 Parameter<int> min_iterations;
1243 Parameter<double> momentum_stabilization_coefficient;
1244
1245 Parameter<double> penalty_parameter;
1246 Parameter<double> poisson_ratio;
1247 Parameter<bool> prestress;
1248
1249 Parameter<double> source_term;
1250 Parameter<double> tolerance;
1251
1253 Parameter<bool> use_taylor_hood_type_basis;
1254
1255 // Inverse of Darcy permeability. Default value of 0.0 for Navier-Stokes and non-zero for Navier-Stokes-Brinkman
1256 Parameter<double> inverse_darcy_permeability;
1257
1258 // Sub-element parameters.
1259 //
1260 std::vector<BodyForceParameters*> body_forces;
1261
1262 std::vector<BoundaryConditionParameters*> boundary_conditions;
1263
1264 CoupleCplBCParameters couple_to_cplBC;
1265 CoupleGenBCParameters couple_to_genBC;
1266 CoupleSvZeroDParameters couple_to_svZeroD;
1267
1268 DomainParameters* default_domain = nullptr;
1269
1270 std::vector<DomainParameters*> domains;
1271
1272 LinearSolverParameters linear_solver;
1273
1274 std::vector<OutputParameters*> outputs;
1275
1276 RemesherParameters remesher;
1277
1278 VariableWallPropsParameters variable_wall_properties;
1279
1280 FluidViscosityParameters fluid_viscosity;
1281
1282 SolidViscosityParameters solid_viscosity;
1283
1284 ECGLeadsParameters ecg_leads;
1285};
1286
1287/// @brief The GeneralSimulationParameters class stores paramaters for the
1288/// 'GeneralSimulationParameters' XML element.
1289///
1290/// \code {.xml}
1291/// <GeneralSimulationParameters>
1292/// <Continue_previous_simulation> 0 </Continue_previous_simulation>
1293/// <Number_of_spatial_dimensions> 3 </Number_of_spatial_dimensions>
1294/// <Number_of_time_steps> 1 </Number_of_time_steps>
1295/// <Time_step_size> 1e-4 </Time_step_size>
1296/// <Spectral_radius_of_infinite_time_step> 0.50 </Spectral_radius_of_infinite_time_step>
1297/// <Searched_file_name_to_trigger_stop> STOP_SIM </Searched_file_name_to_trigger_stop>
1298/// <Save_results_to_VTK_format> true </Save_results_to_VTK_format>
1299/// <Name_prefix_of_saved_VTK_files> result </Name_prefix_of_saved_VTK_files>
1300/// <Increment_in_saving_VTK_files> 1 </Increment_in_saving_VTK_files>
1301/// <Start_saving_after_time_step> 1 </Start_saving_after_time_step>
1302/// <Increment_in_saving_restart_files> 1 </Increment_in_saving_restart_files>
1303/// <Convert_BIN_to_VTK_format> 0 </Convert_BIN_to_VTK_format>
1304/// <Verbose> 1 </Verbose>
1305/// <Warning> 0 </Warning>
1306/// <Debug> 0 </Debug>
1307/// <Simulation_requires_remeshing> true </Simulation_requires_remeshing>
1308/// </GeneralSimulationParameters>
1309/// \endcode
1311{
1312 public:
1314
1315 void print_parameters();
1316 void set_values(tinyxml2::XMLElement* xml_element);
1317
1318 std::string xml_element_name;
1319
1320 Parameter<bool> check_ien_order;
1321 Parameter<bool> continue_previous_simulation;
1322 Parameter<bool> convert_bin_to_vtk_format;
1323 Parameter<bool> debug;
1324 Parameter<bool> overwrite_restart_file;
1325 Parameter<bool> save_averaged_results;
1326 Parameter<bool> save_results_to_vtk_format;
1327 Parameter<bool> simulation_requires_remeshing;
1328 Parameter<bool> start_averaging_from_zero;
1329 Parameter<bool> verbose;
1330 Parameter<bool> warning;
1331
1332 Parameter<double> spectral_radius_of_infinite_time_step;
1333 Parameter<double> time_step_size;
1334
1335 Parameter<int> increment_in_saving_restart_files;
1336 Parameter<int> increment_in_saving_vtk_files;
1337 Parameter<int> number_of_spatial_dimensions;
1338 Parameter<int> number_of_initialization_time_steps;
1339 Parameter<int> start_saving_after_time_step;
1340 Parameter<int> starting_time_step;
1341 Parameter<int> number_of_time_steps;
1342
1343 Parameter<std::string> name_prefix_of_saved_vtk_files;
1344 Parameter<std::string> restart_file_name;
1345 Parameter<std::string> searched_file_name_to_trigger_stop;
1346 Parameter<std::string> save_results_in_folder;
1347 Parameter<std::string> simulation_initialization_file_path;
1348};
1349
1350/// @brief The FaceParameters class is used to store parameters for the
1351/// 'Add_face' XML element.
1353{
1354 public:
1356
1357 void print_parameters();
1358 void set_values(tinyxml2::XMLElement* xml_elem);
1359
1360 static const std::string xml_element_name_;
1361
1362 Parameter<std::string> end_nodes_face_file_path;
1363 Parameter<std::string> face_file_path;
1365
1366 Parameter<double> quadrature_modifier_TRI3;
1367};
1368
1369/// @brief The MeshParameters class is used to store paramaters for the
1370/// 'Add_mesh' XML element.
1371///
1372/// \code {.xml}
1373/// <Add_mesh name="lumen" >
1374/// <Mesh_file_path> mesh/lumen/mesh-complete.mesh.vtu </Mesh_file_path>
1375///
1376/// <Add_face name="lumen_inlet">
1377/// <Face_file_path> mesh/lumen/mesh-surfaces/lumen_inlet.vtp </Face_file_path>
1378/// </Add_face>
1379///
1380/// <Add_face name="lumen_outlet">
1381/// <Face_file_path> mesh/lumen/mesh-surfaces/lumen_outlet.vtp </Face_file_path>
1382/// </Add_face>
1383///
1384/// <Add_face name="lumen_wall">
1385/// <Face_file_path> mesh/lumen/mesh-surfaces/lumen_wall.vtp </Face_file_path>
1386/// </Add_face>
1387///
1388/// <Domain> 0 </Domain>
1389///
1390/// </Add_mesh>
1391/// \endcode
1393{
1394 public:
1396
1397 static const std::string xml_element_name_;
1398
1399 void print_parameters();
1400 void set_values(tinyxml2::XMLElement* mesh_elem);
1401 std::string get_name() const { return name.value(); };
1402 std::string get_path() const { return mesh_file_path.value(); };
1403
1404 std::vector<FaceParameters*> face_parameters;
1405
1406 // Add_mesh name=
1408
1409 // Parameters under Add_mesh
1410 //
1411 Parameter<int> domain_id;
1412 Parameter<std::string> domain_file_path;
1413
1414 VectorParameter<std::string> fiber_direction_file_paths;
1415 //Parameter<std::string> fiber_direction_file_path;
1416 std::vector<VectorParameter<double>> fiber_directions;
1417 //VectorParameter<double> fiber_direction;
1418
1419 Parameter<std::string> initial_displacements_file_path;
1420 Parameter<std::string> initial_pressures_file_path;
1421 Parameter<bool> initialize_rcr_from_flow;
1422 Parameter<std::string> initial_velocities_file_path;
1423
1424 Parameter<std::string> mesh_file_path;
1425 Parameter<double> mesh_scale_factor;
1426 Parameter<std::string> prestress_file_path;
1427
1428 Parameter<bool> set_mesh_as_fibers;
1429 Parameter<bool> set_mesh_as_shell;
1430
1431 Parameter<double> quadrature_modifier_TET4;
1432};
1433
1434/// @brief The Parameters class stores parameter values read in from a solver input file.
1436
1437 public:
1438 Parameters();
1439
1440 static const std::set<std::string> constitutive_model_names;
1441 static const std::set<std::string> equation_names;
1442 static const std::string FSI_FILE;
1443
1444 void get_logging_levels(int& verbose, int& warning, int& debug);
1445 void print_parameters();
1446 void read_xml(std::string file_name);
1447
1448 void set_contact_values(tinyxml2::XMLElement* root_element);
1449 void set_equation_values(tinyxml2::XMLElement* root_element);
1450 void set_mesh_values(tinyxml2::XMLElement* root_element);
1451 void set_precomputed_solution_values(tinyxml2::XMLElement* root_element);
1452 void set_projection_values(tinyxml2::XMLElement* root_element);
1453
1454 // Objects representing each parameter section of XML file.
1455 ContactParameters contact_parameters;
1456 GeneralSimulationParameters general_simulation_parameters;
1457 std::vector<MeshParameters*> mesh_parameters;
1458 std::vector<EquationParameters*> equation_parameters;
1459 std::vector<ProjectionParameters*> projection_parameters;
1460 PrecomputedSolutionParameters precomputed_solution_parameters;
1461};
1462
1463#endif
1464
Body force over a mesh using the "Add_BF" command.
Definition Parameters.h:618
static const std::string xml_element_name_
Define the XML element name for boundary condition parameters.
Definition Parameters.h:623
The BoundaryConditionParameters stores paramaters for various type of boundary conditions under the A...
Definition Parameters.h:674
static const std::string xml_element_name_
Define the XML element name for equation boundary condition parameters.
Definition Parameters.h:679
RCR values for Neumann BC type.
Definition Parameters.h:653
BoundaryConditionRCRParameters()
RCR values for Neumann BC type.
Definition Parameters.cpp:329
The ConstitutiveModelParameters class store parameters for various constitutive models.
Definition Parameters.h:509
void check_constitutive_model(const Parameter< std::string > &eq_type)
Check if a constitutive model is valid for the given equation.
Definition Parameters.cpp:810
static const std::map< std::string, std::string > constitutive_model_types
Supported constitutive model types and their aliases.
Definition Parameters.h:491
static const std::string xml_element_name_
Process parameters for various constitutive models.
Definition Parameters.h:516
The ContactParameters class stores parameters for the 'Contact'' XML element used to specify paramete...
Definition Parameters.h:1184
static const std::string xml_element_name_
Process parameters for the 'Contact' XML element used to specify parameters for contact computation.
Definition Parameters.h:1188
Couple to reduced-order models.
Definition Parameters.h:544
static const std::string xml_element_name_
Couple to reduced-order models.
Definition Parameters.h:548
Coupling to GenBC.
Definition Parameters.h:570
static const std::string xml_element_name_
Coupling to GenBC.
Definition Parameters.h:574
Definition Parameters.h:594
The DomainParameters class stores parameters for the XML 'Domain' element to specify properties for s...
Definition Parameters.h:1073
static const std::string xml_element_name_
Define the XML element name for domain parameters.
Definition Parameters.h:1077
Definition Parameters.h:1012
static const std::string xml_element_name_
Define the XML element name for ECG leads parameters.
Definition Parameters.h:1016
The EquationParameters class stores parameters for the 'Add_equation' XML element used to specify an ...
Definition Parameters.h:1218
static const std::string xml_element_name_
Define the XML element name for equation parameters.
Definition Parameters.h:1222
The FaceParameters class is used to store parameters for the 'Add_face' XML element.
Definition Parameters.h:1353
static const std::string xml_element_name_
Process parameters for the 'Add_face' XML element.
Definition Parameters.h:1360
The FiberReinforcementStressParameters class stores fiber reinforcement stress parameters for the 'Fi...
Definition Parameters.h:1040
static const std::string xml_element_name_
Define the XML element name for fiber reinforcement stress parameters.
Definition Parameters.h:1044
Definition Parameters.h:836
Definition Parameters.h:850
Definition Parameters.h:827
Definition Parameters.h:861
static const std::string xml_element_name_
Process parameters for various fluid viscosity models.
Definition Parameters.h:865
The GeneralSimulationParameters class stores paramaters for the 'GeneralSimulationParameters' XML ele...
Definition Parameters.h:1311
GeneralSimulationParameters()
Process paramaters for the 'GeneralSimulationParameters' XML element.
Definition Parameters.cpp:1994
void set_values(tinyxml2::XMLElement *xml_element)
Set general parameters values from XML.
Definition Parameters.cpp:2053
Definition Parameters.h:424
Definition Parameters.h:462
Definition Parameters.h:441
Definition Parameters.h:409
The LinearAlgebraParameters class stores parameters for the 'Linear_algebra' XML element.
Definition Parameters.h:931
void check_input_parameters()
Check the validity of the input parameters.
Definition Parameters.cpp:2496
static const std::string xml_element_name_
Define the XML element name for equation output parameters.
Definition Parameters.h:933
The LinearSolverParameters class stores parameters for the 'LS' XML element.
Definition Parameters.h:951
static const std::string xml_element_name_
Define the XML element name for equation output parameters.
Definition Parameters.h:958
The MeshParameters class is used to store paramaters for the 'Add_mesh' XML element.
Definition Parameters.h:1393
static const std::string xml_element_name_
Define the XML element name for mesh parameters.
Definition Parameters.h:1397
Definition Parameters.h:477
Definition Parameters.h:489
NeoHookeanParameters()
There are no parameters associated with a Neohookean model.
Definition Parameters.cpp:724
The OutputParameters class stores parameters for the Output XML element under Add_equation.
Definition Parameters.h:736
std::string get_alias_value(const std::string &name)
Get the value of an alias by name.
Definition Parameters.cpp:1037
bool get_output_value(const std::string &name)
Get the value of an output by name.
Definition Parameters.cpp:1049
static const std::string xml_element_name_
Define the XML element name for equation output parameters.
Definition Parameters.h:740
The Parameter class template is used to store a named paramater and its scalar value as a basic type:...
Definition Parameters.h:113
void set(const std::string &name, bool required, T value)
Set the parameter name and value, and if it is required.
Definition Parameters.h:144
void set(const std::string &str_value)
Set the parameter value from a string.
Definition Parameters.h:151
std::string svalue()
Get the value of a parameter as a string.
Definition Parameters.h:130
Defines parameter name and value, and stores them in maps for settng values from XML.
Definition Parameters.h:289
void check_required()
Check if any required parameters have not been set.
Definition Parameters.h:354
void set_parameter(const std::string &name, const bool value, bool required, Parameter< bool > &param)
Set the name, default value and the parameter required flag.
Definition Parameters.h:300
std::map< std::string, std::string > get_parameter_list()
Get the defined parameters as a map of strings.
Definition Parameters.h:368
void set_parameter_value(const std::string &name, const std::string &value)
Set the value of a paramter from a string.
Definition Parameters.h:344
std::map< std::string, std::variant< Parameter< bool > *, Parameter< double > *, Parameter< int > *, Parameter< std::string > *, VectorParameter< double > *, VectorParameter< int > *, VectorParameter< std::string > * > > params_map
Map used for storing parameters by name / Parameter template union.
Definition Parameters.h:396
void print_parameter_list()
Print the parameters.
Definition Parameters.h:382
The Parameters class stores parameter values read in from a solver input file.
Definition Parameters.h:1435
void read_xml(std::string file_name)
Set the simulation parameter values given in an XML format file.
Definition Parameters.cpp:148
The PrecomputedSolutionParameters class stores parameters for the 'Precomputed_solution' XML element ...
Definition Parameters.h:766
The ProjectionParameters class stores parameters for the 'Add_projection' XML element used for fluid-...
Definition Parameters.h:789
static const std::string xml_element_name_
Define the XML element name for mesh parameters.
Definition Parameters.h:795
The RemesherParameters class stores parameters for the 'Remesher' XML element used for remeshing.
Definition Parameters.h:1157
static const std::string xml_element_name_
Define the XML element name for mesh parameters.
Definition Parameters.h:1161
Definition Parameters.h:890
Definition Parameters.h:908
static const std::string xml_element_name_
Process parameters for various solid viscosity models.
Definition Parameters.h:912
Definition Parameters.h:899
Definition Parameters.h:498
StVenantKirchhoffParameters()
There are no parameters associated with a StVenantKirchhoff model.
Definition Parameters.cpp:738
The StimulusParameters class stores parameters for 'Stimulus' XML element used to parameters for pace...
Definition Parameters.h:991
static const std::string xml_element_name_
Define the XML element name for equation output parameters.
Definition Parameters.h:995
The VariableWallPropsParameters class stores parameters for variable wall properties for the CMM equa...
Definition Parameters.h:806
static const std::string xml_element_name_
The VariableWallPropsParameters class stores parameters for variable wall properties for the CMM equa...
Definition Parameters.h:809
The VectorParameter class template is used to store a named paramater and its vector of values as a b...
Definition Parameters.h:192
void set(const std::string &str_value)
Set the parameter value from a string.
Definition Parameters.h:246
void set(const std::string &name, bool required, const std::vector< T > &value)
Set the parameter name and value, and if it is required.
Definition Parameters.h:238
std::string svalue()
Get the string representation of the parameter value.
Definition Parameters.h:212