8 : density_(std::make_shared<
Density>())
13 : density_(std::move(density))
22 const double rho_constant = constant_density && data.
da.size() > 0
27 for (
int q = 0; q < data.
da.size(); ++q)
34 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 9, 1> res(
size() *
size(), 1);
36 for (
int i = 0; i <
size(); ++i)
37 res(i *
size() + i) = tmp;
45 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 3, 1> result;
54 if (
auto thermal_density = std::dynamic_pointer_cast<ThermalMassDensity>(
density_))
62 std::map<std::string, ParamFunc> res;
63 if (
auto thermal_density = std::dynamic_pointer_cast<ThermalMassDensity>(
density_))
66 return thermal_density->rho(p, t, e);
69 return thermal_density->heat_capacity(p, t, e);
72 return this->
density()(uv, p, t, e);
78 return this->
density()(uv, p, t, e);
87 Eigen::Matrix<double, Eigen::Dynamic, 1, 0, 9, 1> res(
size() *
size(), 1);
93 double sum_all_entries = 0;
94 double sum_all_diag_entries = 0;
95 double sum_target_diag_entries = 0;
102 for (
int q = 0; q < data.
da.size(); ++q)
106 sum_all_entries += entry;
109 sum_all_diag_entries += entry;
112 sum_target_diag_entries += entry;
118 for (
int i = 0; i <
size(); ++i)
119 res(i *
size() + i) = sum_all_entries / sum_all_diag_entries * sum_target_diag_entries;
std::string specific_heat_capacity() const
std::string density() const
virtual bool is_constant() const
Each material entry is independent of coordinates, time and index.
std::vector< AssemblyValues > basis_values
quadrature::Quadrature quadrature
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 9, 1 > assemble(const LinearAssemblerData &data) const override
computes and returns local stiffness matrix (1x1) for bases i,j (where i,j is passed in through data)...
const ElementAssemblyValues & vals
stores the evaluation for that element
const QuadratureVector & da
contains both the quadrature weight and the change of metric in the integral
const int i
first local order
const int j
second local order
const Density & density() const
class that stores and compute density per point
void add_multimaterial(const int index, const json ¶ms, const Units &units, const io::ResourceIO &resources) override
inialize material parameter
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > compute_rhs(const AutodiffHessianPt &pt) const override
uses autodiff to compute the rhs for a fabricated solution in this case it just return pt....
virtual std::map< std::string, ParamFunc > parameters() const override
std::shared_ptr< Density > density_
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 9, 1 > assemble(const LinearAssemblerData &data) const override
computes and returns local stiffness matrix (1x1) for bases i,j (where i,j is passed in through data)...
Read-only interface to a hierarchical collection of simulation resources.
Eigen::Matrix< AutodiffScalarHessian, Eigen::Dynamic, 1, 0, 3, 1 > AutodiffHessianPt
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd