feat(preconditioner): major work on preconditioner system
first preconditioner MVP
This commit is contained in:
@@ -764,6 +764,11 @@ export namespace mean_field::field {
|
||||
|
||||
require_reduced_size(reduced);
|
||||
|
||||
if (is_identity()) {
|
||||
reduced = full;
|
||||
return;
|
||||
}
|
||||
|
||||
for (int reducedDof = 0; reducedDof < reduced_size(); ++reducedDof) {
|
||||
reduced(reducedDof) = full(m_reducedToTrue[reducedDof]);
|
||||
}
|
||||
@@ -798,6 +803,11 @@ export namespace mean_field::field {
|
||||
|
||||
require_full_size(full);
|
||||
|
||||
if (is_identity()) {
|
||||
full = reduced;
|
||||
return;
|
||||
}
|
||||
|
||||
full = 0.0;
|
||||
|
||||
scatter_into(reduced, full);
|
||||
@@ -828,6 +838,11 @@ export namespace mean_field::field {
|
||||
|
||||
require_full_size(full);
|
||||
|
||||
if (is_identity()) {
|
||||
full = reduced;
|
||||
return;
|
||||
}
|
||||
|
||||
for (int reducedDof = 0; reducedDof < reduced_size(); ++reducedDof) {
|
||||
full(m_reducedToTrue[reducedDof]) = reduced(reducedDof);
|
||||
}
|
||||
@@ -847,6 +862,11 @@ export namespace mean_field::field {
|
||||
|
||||
require_full_size(full);
|
||||
|
||||
if (is_identity()) {
|
||||
full.Add(scale, reduced);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int reducedDof = 0; reducedDof < reduced_size(); ++reducedDof) {
|
||||
full(m_reducedToTrue[reducedDof]) += scale * reduced(reducedDof);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ module;
|
||||
|
||||
export module mean_field:field.registry;
|
||||
|
||||
export import :dimensions.quantities;
|
||||
export import :field.base;
|
||||
export import :quadrature.policy;
|
||||
export import :utils.domain;
|
||||
@@ -25,6 +26,7 @@ export namespace mean_field::field {
|
||||
static constexpr std::string_view name = "density";
|
||||
static constexpr int scalarOrder = 2 + uniformPolynomialOrderIncrement;
|
||||
|
||||
using PhysicalQuantity = dimensions::quantity::Density;
|
||||
using Support = DomainSupport<utils::domain::Stellar>;
|
||||
|
||||
struct Scalar final : ScalarQ<FieldRelation::Independent, Disc<L2, scalarOrder>> {
|
||||
@@ -261,6 +263,7 @@ export namespace mean_field::field {
|
||||
static constexpr std::string_view name = "specific_enthalpy";
|
||||
static constexpr int scalarOrder = 3 + uniformPolynomialOrderIncrement;
|
||||
|
||||
using PhysicalQuantity = dimensions::quantity::SpecificEnthalpy;
|
||||
using Support = DomainSupport<utils::domain::Stellar>;
|
||||
|
||||
struct Scalar final : ScalarQ<FieldRelation::Independent, Disc<H1, scalarOrder>> {
|
||||
|
||||
Reference in New Issue
Block a user