40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
module;
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <mfem.hpp>
|
|
|
|
export module mean_field:operators.prepared_hdiv_mass;
|
|
export import :fem;
|
|
export import :mapping.domain_mapper;
|
|
|
|
export namespace mean_field::operators {
|
|
class PreparedMappedHDivMassOperator final : public mfem::Operator {
|
|
public:
|
|
PreparedMappedHDivMassOperator(
|
|
const fem::FEM &f,
|
|
const mapping::DomainMapperStateless &domain_mapper
|
|
);
|
|
|
|
void Prepare(const mfem::Vector &displacement_true);
|
|
void Mult(
|
|
const mfem::Vector &gravity_gradient_true,
|
|
mfem::Vector &action
|
|
) const override;
|
|
|
|
[[nodiscard]] bool IsPrepared() const noexcept;
|
|
[[nodiscard]] std::uint64_t GetPreparationCount() const noexcept;
|
|
|
|
private:
|
|
const fem::FEM &m_fem;
|
|
const mapping::DomainMapperStateless &m_domain_mapper;
|
|
|
|
mfem::Array<int> m_stellar_marker;
|
|
mfem::Array<int> m_vacuum_marker;
|
|
|
|
std::unique_ptr<mfem::MatrixCoefficient> m_stellar_mass_coefficient;
|
|
std::unique_ptr<mfem::MatrixCoefficient> m_vacuum_mass_coefficient;
|
|
std::unique_ptr<mfem::ParBilinearForm> m_mass_form;
|
|
std::uint64_t m_preparation_count{0};
|
|
bool m_is_prepared{false};
|
|
};
|
|
} // namespace mean_field::operators
|