ASPECT
compositing.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2022 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef _aspect_material_model_compositing_h
22 #define _aspect_material_model_compositing_h
23 
26 
27 #include <map>
28 #include <vector>
29 
30 
31 namespace aspect
32 {
33  namespace MaterialModel
34  {
35  namespace Property
36  {
41  {
51  };
52  }
53 
61  template <int dim>
63  {
64  public:
68  void
69  initialize () override;
70 
74  void
75  evaluate (const typename Interface<dim>::MaterialModelInputs &in,
76  typename Interface<dim>::MaterialModelOutputs &out) const override;
77 
82  void
83  create_additional_named_outputs (typename Interface<dim>::MaterialModelOutputs &outputs) const override;
84 
88  static void
89  declare_parameters (ParameterHandler &prm);
90 
94  void
95  parse_parameters (ParameterHandler &prm) override;
96 
102  bool is_compressible () const override;
103 
104 
105 
106  private:
115  void
116  copy_required_properties(const unsigned int model_index,
117  const typename Interface<dim>::MaterialModelOutputs &base_output,
118  typename Interface<dim>::MaterialModelOutputs &out) const;
119 
124  std::map<Property::MaterialProperty, unsigned int> model_property_map;
125 
130  std::vector<std::string> model_names;
131  std::vector<std::unique_ptr<Interface<dim>>> models;
132  };
133  }
134 }
135 
136 #endif
std::vector< std::string > model_names
Definition: compositing.h:130
std::map< Property::MaterialProperty, unsigned int > model_property_map
Definition: compositing.h:124
void declare_parameters(ParameterHandler &prm)
std::vector< std::unique_ptr< Interface< dim > > > models
Definition: compositing.h:131