21 #ifndef _aspect_material_model_interface_h 22 #define _aspect_material_model_interface_h 28 #include <deal.II/base/point.h> 29 #include <deal.II/base/quadrature.h> 30 #include <deal.II/base/symmetric_tensor.h> 31 #include <deal.II/base/parameter_handler.h> 32 #include <deal.II/dofs/dof_handler.h> 33 #include <deal.II/dofs/dof_accessor.h> 34 #include <deal.II/fe/mapping.h> 35 #include <deal.II/fe/fe_values.h> 36 #include <deal.II/fe/component_mask.h> 37 #include <deal.II/numerics/data_postprocessor.h> 38 #include <deal.II/base/signaling_nan.h> 53 namespace MaterialModel
61 namespace NonlinearDependence
104 return Dependence(static_cast<int>(d1) | static_cast<int>(d2));
174 namespace MaterialProperties
223 return Property(static_cast<int>(d1) | static_cast<int>(d2));
259 const unsigned int n_comp);
278 const bool compute_strain_rate =
true);
301 const typename DoFHandler<dim>::active_cell_iterator &cell,
304 const bool compute_strain_rate =
true);
342 void reinit(
const FEValuesBase<dim,dim> &fe_values,
343 const typename DoFHandler<dim>::active_cell_iterator &cell,
346 const bool compute_strain_rate =
true);
352 unsigned int n_evaluation_points()
const;
449 template <
class AdditionalInputType>
450 AdditionalInputType *get_additional_input();
456 template <
class AdditionalInputType>
457 const AdditionalInputType *get_additional_input()
const;
494 const unsigned int n_comp);
531 unsigned int n_evaluation_points()
const;
632 template <
class AdditionalOutputType>
633 AdditionalOutputType *get_additional_output();
638 template <
class AdditionalOutputType>
639 const AdditionalOutputType *get_additional_output()
const;
664 namespace MaterialAveraging
742 const typename DoFHandler<dim>::active_cell_iterator &cell,
743 const Quadrature<dim> &quadrature_formula,
744 const Mapping<dim> &mapping,
754 const FullMatrix<double> &projection_matrix,
755 const FullMatrix<double> &expansion_matrix,
756 std::vector<double> &values_out);
804 const FEValuesBase<dim> &fe_values,
846 const FullMatrix<double> &,
847 const FullMatrix<double> &)
898 const unsigned int n_points);
909 const std::vector<std::string> &
get_names()
const;
915 virtual std::vector<double> get_nth_output(
const unsigned int idx)
const;
918 const FullMatrix<double> &,
919 const FullMatrix<double> &)
override 930 const std::vector<std::string>
names;
945 std::vector<double> get_nth_output(
const unsigned int idx)
const override;
952 std::vector<double>
vs;
959 std::vector<double>
vp;
988 const unsigned int n_comp);
990 std::vector<double> get_nth_output(
const unsigned int idx)
const override;
1041 const unsigned int n_comp);
1043 std::vector<double> get_nth_output(
const unsigned int idx)
const override;
1074 std::vector<double> get_nth_output(
const unsigned int idx)
const override;
1097 : rhs_u(n_points), rhs_p(n_points), rhs_melt_pc(n_points)
1104 const FullMatrix<double> &,
1105 const FullMatrix<double> &)
override 1159 std::vector<double> get_nth_output(
const unsigned int idx)
const override;
1181 : elastic_force(n_points, numbers::signaling_nan<SymmetricTensor<2,dim>>())
1182 , viscoelastic_strain_rate(n_points, numbers::signaling_nan<SymmetricTensor<2,dim>>())
1189 const FullMatrix<double> &,
1190 const FullMatrix<double> &)
override 1227 : enthalpies_of_fusion(n_points, numbers::signaling_nan<double>())
1234 const FullMatrix<double> &,
1235 const FullMatrix<double> &)
override 1298 get_model_dependence ()
const;
1309 virtual bool is_compressible ()
const = 0;
1343 const FEValuesBase<dim> &fe_values,
1383 const std::string &description,
1384 void (*declare_parameters_function) (ParameterHandler &),
1398 std::unique_ptr<Interface<dim>>
1414 std::unique_ptr<Interface<dim>>
1458 template <
class AdditionalInputType>
1461 for (
unsigned int i=0; i<additional_inputs.size(); ++i)
1463 AdditionalInputType *result =
dynamic_cast<AdditionalInputType *
> (additional_inputs[i].get());
1472 template <
class AdditionalInputType>
1475 for (
unsigned int i=0; i<additional_inputs.size(); ++i)
1477 const AdditionalInputType *result =
dynamic_cast<const AdditionalInputType *
> (additional_inputs[i].get());
1486 template <
class AdditionalOutputType>
1491 AdditionalOutputType *result =
dynamic_cast<AdditionalOutputType *
> (
additional_outputs[i].get());
1500 template <
class AdditionalOutputType>
1505 const AdditionalOutputType *result =
dynamic_cast<const AdditionalOutputType *
> (
additional_outputs[i].get());
1516 Assert(this->
additional_outputs.empty(), ExcMessage(
"Destination of move needs to be empty!"));
1528 #define ASPECT_REGISTER_MATERIAL_MODEL(classname,name,description) \ 1529 template class classname<2>; \ 1530 template class classname<3>; \ 1531 namespace ASPECT_REGISTER_MATERIAL_MODEL_ ## classname \ 1533 aspect::internal::Plugins::RegisterHelper<aspect::MaterialModel::Interface<2>,classname<2>> \ 1534 dummy_ ## classname ## _2d (&aspect::MaterialModel::register_material_model<2>, \ 1535 name, description); \ 1536 aspect::internal::Plugins::RegisterHelper<aspect::MaterialModel::Interface<3>,classname<3>> \ 1537 dummy_ ## classname ## _3d (&aspect::MaterialModel::register_material_model<3>, \ 1538 name, description); \ void write_plugin_graph(std::ostream &output_stream)
AveragingOperation get_averaging_operation_for_viscosity(const AveragingOperation operation)
std::vector< double > entropy_derivative_pressure
std::vector< Tensor< 1, dim > > rhs_u
std::vector< double > compressibilities
std::vector< double > entropy_derivative_temperature
void average_property(const AveragingOperation operation, const FullMatrix< double > &projection_matrix, const FullMatrix< double > &expansion_matrix, std::vector< double > &values_out)
std::vector< double > rhs_melt_pc
std::vector< double > specific_heat
::TrilinosWrappers::MPI::BlockVector BlockVector
std::vector< double > thermal_expansion_coefficients
virtual void average(const MaterialAveraging::AveragingOperation, const FullMatrix< double > &, const FullMatrix< double > &)
std::vector< std::vector< double > > prescribed_field_outputs
void register_material_model(const std::string &name, const std::string &description, void(*declare_parameters_function)(ParameterHandler &), std::unique_ptr< Interface< dim >>(*factory_function)())
std::vector< std::unique_ptr< AdditionalMaterialOutputs< dim > > > additional_outputs
std::vector< double > thermal_conductivities
ElasticOutputs(const unsigned int n_points)
std::vector< std::vector< double > > reaction_rates
void declare_parameters(ParameterHandler &prm)
bool identifies_single_variable(const Dependence dependence)
void average(const MaterialAveraging::AveragingOperation, const FullMatrix< double > &, const FullMatrix< double > &) override
std::vector< std::vector< double > > reaction_terms
AdditionalOutputType * get_additional_output()
const std::vector< std::string > names
Property operator|=(Property &d1, const Property d2)
std::vector< double > densities
std::vector< double > rhs_p
void average(const MaterialAveraging::AveragingOperation operation, const FullMatrix< double > &, const FullMatrix< double > &) override
EnthalpyOutputs(const unsigned int n_points)
AveragingOperation parse_averaging_operation_name(const std::string &s)
Property operator|(const Property d1, const Property d2)
Dependence compressibility
AdditionalMaterialOutputsStokesRHS(const unsigned int n_points)
std::vector< double > dilation
void move_additional_outputs_from(MaterialModelOutputs< dim > &other)
std::vector< double > enthalpies_of_fusion
std::string get_averaging_operation_names()
std::vector< SymmetricTensor< 2, dim > > elastic_force
std::vector< std::vector< double > > output_values
void average(const MaterialAveraging::AveragingOperation operation, const FullMatrix< double > &, const FullMatrix< double > &) override
std::vector< double > viscosities
std::vector< double > prescribed_temperature_outputs
NonlinearDependence::ModelDependence model_dependence
std::unique_ptr< Interface< dim > > create_material_model(const std::string &model_name)
void average(const AveragingOperation operation, const typename DoFHandler< dim >::active_cell_iterator &cell, const Quadrature< dim > &quadrature_formula, const Mapping< dim > &mapping, const MaterialProperties::Property &requested_properties, MaterialModelOutputs< dim > &values_out)
Dependence thermal_conductivity
std::string get_valid_model_names_pattern()
std::vector< SymmetricTensor< 2, dim > > viscoelastic_strain_rate
void average(const MaterialAveraging::AveragingOperation, const FullMatrix< double > &, const FullMatrix< double > &) override