From a09e68b5040e893f884828de465092891bb8ef76 Mon Sep 17 00:00:00 2001 From: Edward Palmer Date: Fri, 21 Jun 2024 14:27:11 +0000 Subject: [PATCH] Puts Subdomain and Coefficients back into namespaces. --- include/auxkernels/MFEMAuxSolver.h | 2 +- include/auxkernels/MFEMJouleHeatingAux.h | 4 ++-- include/auxsolvers/auxsolver_base.h | 3 ++- include/auxsolvers/auxsolvers.h | 2 +- include/auxsolvers/coefficient_aux.h | 3 ++- include/auxsolvers/coupled_coefficient_aux.h | 3 ++- include/auxsolvers/curl_aux.h | 3 ++- include/auxsolvers/flux_monitor_aux.h | 3 ++- include/auxsolvers/l2_error_vector_aux.h | 3 ++- include/auxsolvers/scaled_vector_gridfunction_aux.h | 3 ++- include/auxsolvers/vector_coefficient_aux.h | 3 ++- .../auxsolvers/vector_gridfunction_cross_product_aux.h | 3 ++- include/auxsolvers/vector_gridfunction_dot_product_aux.h | 3 ++- include/coefficients/MFEMParsedCoefficientHelper.h | 3 ++- include/coefficients/coefficients.h | 5 ++++- include/equation_systems/equation_system.h | 2 +- include/formulations/av_formulation.h | 2 +- include/formulations/dual_formulation.h | 2 +- include/formulations/hcurl_formulation.h | 2 +- include/kernels/curl_curl_kernel.h | 2 +- include/kernels/diffusion_kernel.h | 2 +- include/kernels/kernel_base.h | 2 +- include/kernels/mixed_vector_gradient_kernel.h | 2 +- include/kernels/vector_fe_mass_kernel.h | 2 +- include/kernels/vector_fe_weak_divergence_kernel.h | 2 +- include/kernels/weak_curl_curl_kernel.h | 2 +- include/kernels/weak_curl_kernel.h | 2 +- include/materials/MFEMMaterial.h | 2 +- include/problem/MFEMProblem.h | 2 +- include/problem_builders/problem_builder_base.h | 4 ++-- include/sources/closed_coil.h | 4 ++-- include/sources/div_free_source.h | 2 +- include/sources/open_coil.h | 2 +- include/sources/scalar_potential_source.h | 2 +- include/sources/source_base.h | 2 +- include/sources/sources.h | 2 +- src/auxkernels/MFEMJouleHeatingAux.C | 2 +- src/auxsolvers/auxsolvers.C | 3 ++- src/auxsolvers/coefficient_aux.C | 3 ++- src/auxsolvers/coupled_coefficient_aux.C | 3 ++- src/auxsolvers/curl_aux.C | 3 ++- src/auxsolvers/flux_monitor_aux.C | 3 ++- src/auxsolvers/l2_error_vector_aux.C | 2 +- src/auxsolvers/scaled_vector_gridfunction_aux.C | 2 +- src/auxsolvers/vector_coefficient_aux.C | 2 +- src/auxsolvers/vector_gridfunction_cross_product_aux.C | 2 +- src/auxsolvers/vector_gridfunction_dot_product_aux.C | 2 +- src/coefficients/MFEMParsedCoefficientHelper.C | 2 +- src/coefficients/coefficients.C | 7 ++++++- src/equation_systems/equation_system.C | 2 +- src/formulations/a_formulation.C | 2 +- src/formulations/av_formulation.C | 4 ++-- src/formulations/complex_maxwell_formulation.C | 2 +- src/formulations/dual_formulation.C | 4 ++-- src/formulations/e_formulation.C | 2 +- src/formulations/eb_dual_formulation.C | 2 +- src/formulations/h_formulation.C | 2 +- src/formulations/hcurl_formulation.C | 4 ++-- src/formulations/magnetostatic_formulation.C | 2 +- src/formulations/statics_formulation.C | 2 +- src/kernels/curl_curl_kernel.C | 2 +- src/kernels/diffusion_kernel.C | 2 +- src/kernels/mixed_vector_gradient_kernel.C | 2 +- src/kernels/vector_fe_mass_kernel.C | 2 +- src/kernels/vector_fe_weak_divergence_kernel.C | 2 +- src/kernels/weak_curl_curl_kernel.C | 2 +- src/kernels/weak_curl_kernel.C | 2 +- src/problem/MFEMProblem.C | 2 +- src/problem_builders/problem_builder_base.C | 2 +- src/sources/closed_coil.C | 8 ++++---- src/sources/div_free_source.C | 2 +- src/sources/open_coil.C | 6 +++--- src/sources/scalar_potential_source.C | 2 +- src/sources/sources.C | 2 +- 74 files changed, 109 insertions(+), 85 deletions(-) diff --git a/include/auxkernels/MFEMAuxSolver.h b/include/auxkernels/MFEMAuxSolver.h index 805db339..6200edcb 100644 --- a/include/auxkernels/MFEMAuxSolver.h +++ b/include/auxkernels/MFEMAuxSolver.h @@ -18,7 +18,7 @@ class MFEMAuxSolver : public GeneralUserObject inline virtual std::shared_ptr getAuxSolver() const { return _auxsolver; } - virtual void storeCoefficients(Coefficients & coefficients) {} + virtual void storeCoefficients(platypus::Coefficients & coefficients) {} protected: std::shared_ptr _auxsolver{nullptr}; diff --git a/include/auxkernels/MFEMJouleHeatingAux.h b/include/auxkernels/MFEMJouleHeatingAux.h index 72801607..561fd204 100644 --- a/include/auxkernels/MFEMJouleHeatingAux.h +++ b/include/auxkernels/MFEMJouleHeatingAux.h @@ -18,7 +18,7 @@ class JouleHeatingCoefficient : public platypus::CoupledCoefficient { } - void Init(const platypus::GridFunctions & variables, Coefficients & coefficients) + void Init(const platypus::GridFunctions & variables, platypus::Coefficients & coefficients) { // To ensure conductivity on subdomains is converted into global coefficient // Hephaestus update for coefficients initialisation could address this @@ -71,7 +71,7 @@ class MFEMJouleHeatingAux : public MFEMAuxSolver return joule_heating_aux; } - virtual void storeCoefficients(Coefficients & coefficients) override; + virtual void storeCoefficients(platypus::Coefficients & coefficients) override; protected: platypus::InputParameters joule_heating_params; diff --git a/include/auxsolvers/auxsolver_base.h b/include/auxsolvers/auxsolver_base.h index 33fa1a16..e03e09ae 100644 --- a/include/auxsolvers/auxsolver_base.h +++ b/include/auxsolvers/auxsolver_base.h @@ -20,7 +20,8 @@ class AuxSolver // NB: require virtual destructor to avoid leaks. virtual ~AuxSolver() = default; - virtual void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) = 0; + virtual void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) = 0; virtual void Solve(double t = 0.0) = 0; diff --git a/include/auxsolvers/auxsolvers.h b/include/auxsolvers/auxsolvers.h index 27b56622..d0b907ef 100644 --- a/include/auxsolvers/auxsolvers.h +++ b/include/auxsolvers/auxsolvers.h @@ -21,7 +21,7 @@ class AuxSolvers : public platypus::NamedFieldsMap private: public: std::vector, std::string>> _aux_queue; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients); + void Init(const platypus::GridFunctions & gridfunctions, platypus::Coefficients & coefficients); void Solve(double t = 0.0); }; diff --git a/include/auxsolvers/coefficient_aux.h b/include/auxsolvers/coefficient_aux.h index 3b84ac9c..d2feb7fd 100644 --- a/include/auxsolvers/coefficient_aux.h +++ b/include/auxsolvers/coefficient_aux.h @@ -15,7 +15,8 @@ class CoefficientAux : public AuxSolver ~CoefficientAux() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; virtual void BuildBilinearForm(); virtual void BuildLinearForm(); diff --git a/include/auxsolvers/coupled_coefficient_aux.h b/include/auxsolvers/coupled_coefficient_aux.h index 61bc5c9c..366312b3 100644 --- a/include/auxsolvers/coupled_coefficient_aux.h +++ b/include/auxsolvers/coupled_coefficient_aux.h @@ -20,7 +20,8 @@ class CoupledCoefficient : public mfem::Coefficient, public AuxSolver ~CoupledCoefficient() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; double Eval(mfem::ElementTransformation & T, const mfem::IntegrationPoint & ip) override; diff --git a/include/auxsolvers/curl_aux.h b/include/auxsolvers/curl_aux.h index 0dc806cc..e3e396ac 100644 --- a/include/auxsolvers/curl_aux.h +++ b/include/auxsolvers/curl_aux.h @@ -12,7 +12,8 @@ class CurlAuxSolver : public AuxSolver ~CurlAuxSolver() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; void Solve(double t = 0.0) override; diff --git a/include/auxsolvers/flux_monitor_aux.h b/include/auxsolvers/flux_monitor_aux.h index 2830023f..54346601 100644 --- a/include/auxsolvers/flux_monitor_aux.h +++ b/include/auxsolvers/flux_monitor_aux.h @@ -20,7 +20,8 @@ class FluxMonitorAux : public AuxSolver ~FluxMonitorAux() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; void Solve(double t = 0.0) override; diff --git a/include/auxsolvers/l2_error_vector_aux.h b/include/auxsolvers/l2_error_vector_aux.h index 918a2aef..92e8cf55 100644 --- a/include/auxsolvers/l2_error_vector_aux.h +++ b/include/auxsolvers/l2_error_vector_aux.h @@ -16,7 +16,8 @@ class L2ErrorVectorPostprocessor : public AuxSolver ~L2ErrorVectorPostprocessor() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; void Solve(double t = 0.0) override; diff --git a/include/auxsolvers/scaled_vector_gridfunction_aux.h b/include/auxsolvers/scaled_vector_gridfunction_aux.h index 128eed66..fd6b2aa8 100644 --- a/include/auxsolvers/scaled_vector_gridfunction_aux.h +++ b/include/auxsolvers/scaled_vector_gridfunction_aux.h @@ -21,7 +21,8 @@ class ScaledVectorGridFunctionAux : public AuxSolver ~ScaledVectorGridFunctionAux() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; virtual void BuildBilinearForm(); virtual void BuildMixedBilinearForm(); void Solve(double t = 0.0) override; diff --git a/include/auxsolvers/vector_coefficient_aux.h b/include/auxsolvers/vector_coefficient_aux.h index 4698f056..d155989c 100644 --- a/include/auxsolvers/vector_coefficient_aux.h +++ b/include/auxsolvers/vector_coefficient_aux.h @@ -14,7 +14,8 @@ class VectorCoefficientAux : public AuxSolver ~VectorCoefficientAux() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; virtual void BuildBilinearForm(); virtual void BuildLinearForm(); diff --git a/include/auxsolvers/vector_gridfunction_cross_product_aux.h b/include/auxsolvers/vector_gridfunction_cross_product_aux.h index fa7404e5..1b625b33 100644 --- a/include/auxsolvers/vector_gridfunction_cross_product_aux.h +++ b/include/auxsolvers/vector_gridfunction_cross_product_aux.h @@ -46,7 +46,8 @@ class VectorGridFunctionCrossProductAux : public VectorCoefficientAux std::string u_gf_name, std::string v_gf_name); - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; }; } // namespace platypus diff --git a/include/auxsolvers/vector_gridfunction_dot_product_aux.h b/include/auxsolvers/vector_gridfunction_dot_product_aux.h index 3e87fdd9..fb97798c 100644 --- a/include/auxsolvers/vector_gridfunction_dot_product_aux.h +++ b/include/auxsolvers/vector_gridfunction_dot_product_aux.h @@ -61,7 +61,8 @@ class VectorGridFunctionDotProductAux : public CoefficientAux ~VectorGridFunctionDotProductAux() override = default; - void Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) override; }; } // namespace platypus diff --git a/include/coefficients/MFEMParsedCoefficientHelper.h b/include/coefficients/MFEMParsedCoefficientHelper.h index 24563c25..1a03db6e 100644 --- a/include/coefficients/MFEMParsedCoefficientHelper.h +++ b/include/coefficients/MFEMParsedCoefficientHelper.h @@ -52,7 +52,8 @@ class MFEMParsedCoefficientHelper : public MFEMCoefficient, const std::vector & constant_expressions, const std::vector & _mfem_coefficient_names, const std::vector & _mfem_gridfunction_names); - void Init(const platypus::GridFunctions & variables, Coefficients & coefficients) override; + void Init(const platypus::GridFunctions & variables, + platypus::Coefficients & coefficients) override; double Eval(mfem::ElementTransformation & trans, const mfem::IntegrationPoint & ip) override; diff --git a/include/coefficients/coefficients.h b/include/coefficients/coefficients.h index 4813909a..c13072e8 100644 --- a/include/coefficients/coefficients.h +++ b/include/coefficients/coefficients.h @@ -6,6 +6,8 @@ #include #include +namespace platypus +{ double prodFunc(double a, double b); double fracFunc(double a, double b); @@ -20,7 +22,7 @@ class Subdomain platypus::NamedFieldsMap _vector_coefficients; }; -// Coefficients - stores all scalar and vector coefficients +// platypus::Coefficients - stores all scalar and vector coefficients //--SetTime //--scalars //--vectors @@ -43,3 +45,4 @@ class Coefficients platypus::NamedFieldsMap _vectors; std::vector _subdomains; }; +} // namespace platypus \ No newline at end of file diff --git a/include/equation_systems/equation_system.h b/include/equation_systems/equation_system.h index 62437cb8..7784051f 100644 --- a/include/equation_systems/equation_system.h +++ b/include/equation_systems/equation_system.h @@ -67,7 +67,7 @@ class EquationSystem : public mfem::Operator virtual void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients); + platypus::Coefficients & coefficients); virtual void BuildLinearForms(platypus::BCMap & bc_map, platypus::Sources & sources); virtual void BuildBilinearForms(); virtual void BuildMixedBilinearForms(); diff --git a/include/formulations/av_formulation.h b/include/formulations/av_formulation.h index 25b60ed0..eb34f1e7 100644 --- a/include/formulations/av_formulation.h +++ b/include/formulations/av_formulation.h @@ -42,7 +42,7 @@ class AVEquationSystem : public TimeDependentEquationSystem void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void AddKernels() override; std::string _a_name, _v_name, _coupled_variable_name, _alpha_coef_name, _beta_coef_name, diff --git a/include/formulations/dual_formulation.h b/include/formulations/dual_formulation.h index 05e6cb2d..185f8d85 100644 --- a/include/formulations/dual_formulation.h +++ b/include/formulations/dual_formulation.h @@ -42,7 +42,7 @@ class WeakCurlEquationSystem : public TimeDependentEquationSystem void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void AddKernels() override; std::string _h_curl_var_name, _h_div_var_name, _alpha_coef_name, _beta_coef_name, diff --git a/include/formulations/hcurl_formulation.h b/include/formulations/hcurl_formulation.h index da5dc8b7..ca3a7214 100644 --- a/include/formulations/hcurl_formulation.h +++ b/include/formulations/hcurl_formulation.h @@ -40,7 +40,7 @@ class CurlCurlEquationSystem : public TimeDependentEquationSystem void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void AddKernels() override; std::string _h_curl_var_name, _alpha_coef_name, _beta_coef_name, _dtalpha_coef_name; diff --git a/include/kernels/curl_curl_kernel.h b/include/kernels/curl_curl_kernel.h index 59c34a21..c9102761 100644 --- a/include/kernels/curl_curl_kernel.h +++ b/include/kernels/curl_curl_kernel.h @@ -17,7 +17,7 @@ class CurlCurlKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParBilinearForm * blf) override; std::string _coef_name; mfem::Coefficient * _coef{nullptr}; diff --git a/include/kernels/diffusion_kernel.h b/include/kernels/diffusion_kernel.h index b2dec2e8..6d21e722 100644 --- a/include/kernels/diffusion_kernel.h +++ b/include/kernels/diffusion_kernel.h @@ -17,7 +17,7 @@ class DiffusionKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParBilinearForm * blf) override; std::string _coef_name; diff --git a/include/kernels/kernel_base.h b/include/kernels/kernel_base.h index 68246576..41773a91 100644 --- a/include/kernels/kernel_base.h +++ b/include/kernels/kernel_base.h @@ -18,7 +18,7 @@ class Kernel virtual void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { } diff --git a/include/kernels/mixed_vector_gradient_kernel.h b/include/kernels/mixed_vector_gradient_kernel.h index 86355fb2..bb8e5d48 100644 --- a/include/kernels/mixed_vector_gradient_kernel.h +++ b/include/kernels/mixed_vector_gradient_kernel.h @@ -17,7 +17,7 @@ class MixedVectorGradientKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParMixedBilinearForm * mblf) override; std::string _coef_name; mfem::Coefficient * _coef{nullptr}; diff --git a/include/kernels/vector_fe_mass_kernel.h b/include/kernels/vector_fe_mass_kernel.h index 0b679b8b..a30bae56 100644 --- a/include/kernels/vector_fe_mass_kernel.h +++ b/include/kernels/vector_fe_mass_kernel.h @@ -17,7 +17,7 @@ class VectorFEMassKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParBilinearForm * blf) override; std::string _coef_name; mfem::Coefficient * _coef{nullptr}; diff --git a/include/kernels/vector_fe_weak_divergence_kernel.h b/include/kernels/vector_fe_weak_divergence_kernel.h index c75f37d7..e824c664 100644 --- a/include/kernels/vector_fe_weak_divergence_kernel.h +++ b/include/kernels/vector_fe_weak_divergence_kernel.h @@ -17,7 +17,7 @@ class VectorFEWeakDivergenceKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParMixedBilinearForm * mblf) override; std::string _coef_name; mfem::Coefficient * _coef{nullptr}; diff --git a/include/kernels/weak_curl_curl_kernel.h b/include/kernels/weak_curl_curl_kernel.h index bf379e16..91102e39 100644 --- a/include/kernels/weak_curl_curl_kernel.h +++ b/include/kernels/weak_curl_curl_kernel.h @@ -17,7 +17,7 @@ class WeakCurlCurlKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParLinearForm * lf) override; std::string _coupled_gf_name; diff --git a/include/kernels/weak_curl_kernel.h b/include/kernels/weak_curl_kernel.h index 8f869d23..c146e233 100644 --- a/include/kernels/weak_curl_kernel.h +++ b/include/kernels/weak_curl_kernel.h @@ -17,7 +17,7 @@ class WeakCurlKernel : public Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParLinearForm * lf) override; std::string _hcurl_gf_name, _hdiv_gf_name; diff --git a/include/materials/MFEMMaterial.h b/include/materials/MFEMMaterial.h index 14c49fde..d4a3e5c5 100644 --- a/include/materials/MFEMMaterial.h +++ b/include/materials/MFEMMaterial.h @@ -16,7 +16,7 @@ class MFEMMaterial : public GeneralUserObject virtual void initialize() override {} virtual void finalize() override {} - virtual void storeCoefficients(Subdomain & subdomain) {} + virtual void storeCoefficients(platypus::Subdomain & subdomain) {} std::vector blocks; }; diff --git a/include/problem/MFEMProblem.h b/include/problem/MFEMProblem.h index e5d96002..55b93d98 100644 --- a/include/problem/MFEMProblem.h +++ b/include/problem/MFEMProblem.h @@ -173,7 +173,7 @@ class MFEMProblem : public ExternalProblem std::string _formulation_name; int _order; - Coefficients _coefficients; + platypus::Coefficients _coefficients; platypus::InputParameters _solver_options; platypus::Outputs _outputs; platypus::InputParameters _exec_params; diff --git a/include/problem_builders/problem_builder_base.h b/include/problem_builders/problem_builder_base.h index 3515222c..b2f4e97c 100644 --- a/include/problem_builders/problem_builder_base.h +++ b/include/problem_builders/problem_builder_base.h @@ -20,7 +20,7 @@ class Problem std::shared_ptr _pmesh{nullptr}; platypus::BCMap _bc_map; - Coefficients _coefficients; + platypus::Coefficients _coefficients; platypus::AuxSolvers _preprocessors; platypus::AuxSolvers _postprocessors; platypus::Sources _sources; @@ -76,7 +76,7 @@ class ProblemBuilder void SetSolverOptions(platypus::InputParameters & solver_options); void SetJacobianPreconditioner(std::shared_ptr preconditioner); void SetJacobianSolver(std::shared_ptr solver); - void SetCoefficients(Coefficients & coefficients); + void SetCoefficients(platypus::Coefficients & coefficients); void AddFESpace(std::string fespace_name, std::string fec_name, diff --git a/include/sources/closed_coil.h b/include/sources/closed_coil.h index 68bec486..7989e354 100644 --- a/include/sources/closed_coil.h +++ b/include/sources/closed_coil.h @@ -35,7 +35,7 @@ class ClosedCoilSolver : public platypus::Source void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParLinearForm * lf) override; void SubtractSource(mfem::ParGridFunction * gf) override; @@ -85,7 +85,7 @@ class ClosedCoilSolver : public platypus::Source std::shared_ptr _itotal{nullptr}; std::vector _old_dom_attrs; platypus::InputParameters _solver_options; - Coefficients _ccs_coefs; + platypus::Coefficients _ccs_coefs; // Here, we are solving for -(σ∇Va,∇ψ) = (σ∇Vt,∇ψ), where ∇Vt is grad_phi_t (within its relevant // mesh), ∇Va is grad_phi_aux, and their sum ∇Vt+∇Va is the full grad_phi, which is, up to an diff --git a/include/sources/div_free_source.h b/include/sources/div_free_source.h index b5fc128f..6315c9f5 100644 --- a/include/sources/div_free_source.h +++ b/include/sources/div_free_source.h @@ -21,7 +21,7 @@ class DivFreeSource : public platypus::Source void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParLinearForm * lf) override; void SubtractSource(mfem::ParGridFunction * gf) override; void BuildHCurlMass(); diff --git a/include/sources/open_coil.h b/include/sources/open_coil.h index ae1235ca..8f147a0f 100644 --- a/include/sources/open_coil.h +++ b/include/sources/open_coil.h @@ -48,7 +48,7 @@ class OpenCoilSolver : public platypus::Source void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParLinearForm * lf) override; void SubtractSource(mfem::ParGridFunction * gf) override {}; diff --git a/include/sources/scalar_potential_source.h b/include/sources/scalar_potential_source.h index fd04fbe3..fe2ef06f 100644 --- a/include/sources/scalar_potential_source.h +++ b/include/sources/scalar_potential_source.h @@ -21,7 +21,7 @@ class ScalarPotentialSource : public platypus::Source void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override; + platypus::Coefficients & coefficients) override; void Apply(mfem::ParLinearForm * lf) override; void SubtractSource(mfem::ParGridFunction * gf) override; void BuildH1Diffusion(mfem::Coefficient * Sigma); diff --git a/include/sources/source_base.h b/include/sources/source_base.h index 47a6c3e5..f236d67d 100644 --- a/include/sources/source_base.h +++ b/include/sources/source_base.h @@ -20,7 +20,7 @@ class Source : public platypus::Kernel void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) override + platypus::Coefficients & coefficients) override { } diff --git a/include/sources/sources.h b/include/sources/sources.h index c71366fe..3694a582 100644 --- a/include/sources/sources.h +++ b/include/sources/sources.h @@ -14,7 +14,7 @@ class Sources : public platypus::NamedFieldsMap void Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients); + platypus::Coefficients & coefficients); void Apply(mfem::ParLinearForm * lf); void SubtractSources(mfem::ParGridFunction * gf); }; diff --git a/src/auxkernels/MFEMJouleHeatingAux.C b/src/auxkernels/MFEMJouleHeatingAux.C index 160e4582..243722de 100644 --- a/src/auxkernels/MFEMJouleHeatingAux.C +++ b/src/auxkernels/MFEMJouleHeatingAux.C @@ -20,7 +20,7 @@ MFEMJouleHeatingAux::MFEMJouleHeatingAux(const InputParameters & parameters) } void -MFEMJouleHeatingAux::storeCoefficients(Coefficients & coefficients) +MFEMJouleHeatingAux::storeCoefficients(platypus::Coefficients & coefficients) { coefficients._scalars.Register("JouleHeating", joule_heating_aux); } diff --git a/src/auxsolvers/auxsolvers.C b/src/auxsolvers/auxsolvers.C index d58b1a5b..e0aafd30 100644 --- a/src/auxsolvers/auxsolvers.C +++ b/src/auxsolvers/auxsolvers.C @@ -4,7 +4,8 @@ namespace platypus { void -AuxSolvers::Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) +AuxSolvers::Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) { for (const auto & [name, auxsolver] : *this) { diff --git a/src/auxsolvers/coefficient_aux.C b/src/auxsolvers/coefficient_aux.C index 265ace96..52437882 100644 --- a/src/auxsolvers/coefficient_aux.C +++ b/src/auxsolvers/coefficient_aux.C @@ -15,7 +15,8 @@ CoefficientAux::CoefficientAux(std::string gf_name, } void -CoefficientAux::Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) +CoefficientAux::Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) { _gf = gridfunctions.Get(_gf_name); _coef = coefficients._scalars.Get(_coef_name); diff --git a/src/auxsolvers/coupled_coefficient_aux.C b/src/auxsolvers/coupled_coefficient_aux.C index f9fad01d..c09b555b 100644 --- a/src/auxsolvers/coupled_coefficient_aux.C +++ b/src/auxsolvers/coupled_coefficient_aux.C @@ -9,7 +9,8 @@ CoupledCoefficient::CoupledCoefficient(const platypus::InputParameters & params) } void -CoupledCoefficient::Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) +CoupledCoefficient::Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) { _gf = gridfunctions.Get(_coupled_var_name); } diff --git a/src/auxsolvers/curl_aux.C b/src/auxsolvers/curl_aux.C index 3ef436ab..c4db5ee2 100644 --- a/src/auxsolvers/curl_aux.C +++ b/src/auxsolvers/curl_aux.C @@ -11,7 +11,8 @@ CurlAuxSolver::CurlAuxSolver(std::string input_gf_name, std::string curl_gf_name } void -CurlAuxSolver::Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) +CurlAuxSolver::Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) { _u = gridfunctions.Get(_input_gf_name); _curl_u = gridfunctions.Get(_curl_gf_name); diff --git a/src/auxsolvers/flux_monitor_aux.C b/src/auxsolvers/flux_monitor_aux.C index 1596e0dc..987a7618 100644 --- a/src/auxsolvers/flux_monitor_aux.C +++ b/src/auxsolvers/flux_monitor_aux.C @@ -79,7 +79,8 @@ FluxMonitorAux::FluxMonitorAux(std::string var_name, int face_attr, std::string } void -FluxMonitorAux::Init(const platypus::GridFunctions & gridfunctions, Coefficients & coefficients) +FluxMonitorAux::Init(const platypus::GridFunctions & gridfunctions, + platypus::Coefficients & coefficients) { _gf = gridfunctions.Get(_var_name); if (coefficients._scalars.Has(_coef_name)) diff --git a/src/auxsolvers/l2_error_vector_aux.C b/src/auxsolvers/l2_error_vector_aux.C index 006ac22d..e2d8c8a4 100644 --- a/src/auxsolvers/l2_error_vector_aux.C +++ b/src/auxsolvers/l2_error_vector_aux.C @@ -11,7 +11,7 @@ L2ErrorVectorPostprocessor::L2ErrorVectorPostprocessor(const platypus::InputPara void L2ErrorVectorPostprocessor::Init(const platypus::GridFunctions & gridfunctions, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _gf = gridfunctions.Get(_var_name); _vec_coeff = coefficients._vectors.Get(_vec_coef_name); diff --git a/src/auxsolvers/scaled_vector_gridfunction_aux.C b/src/auxsolvers/scaled_vector_gridfunction_aux.C index d80d3eb5..b66c916c 100644 --- a/src/auxsolvers/scaled_vector_gridfunction_aux.C +++ b/src/auxsolvers/scaled_vector_gridfunction_aux.C @@ -32,7 +32,7 @@ ScaledVectorGridFunctionAux::ScaledVectorGridFunctionAux(std::string input_gf_na void ScaledVectorGridFunctionAux::Init(const platypus::GridFunctions & gridfunctions, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _input_gf = gridfunctions.Get(_input_gf_name); _scaled_gf = gridfunctions.Get(_scaled_gf_name); diff --git a/src/auxsolvers/vector_coefficient_aux.C b/src/auxsolvers/vector_coefficient_aux.C index 5f7bfa21..ce238210 100644 --- a/src/auxsolvers/vector_coefficient_aux.C +++ b/src/auxsolvers/vector_coefficient_aux.C @@ -16,7 +16,7 @@ VectorCoefficientAux::VectorCoefficientAux(std::string gf_name, void VectorCoefficientAux::Init(const platypus::GridFunctions & gridfunctions, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _gf = gridfunctions.Get(_gf_name); _vec_coef = coefficients._vectors.Get(_vec_coef_name); diff --git a/src/auxsolvers/vector_gridfunction_cross_product_aux.C b/src/auxsolvers/vector_gridfunction_cross_product_aux.C index ac722362..397ab2c2 100644 --- a/src/auxsolvers/vector_gridfunction_cross_product_aux.C +++ b/src/auxsolvers/vector_gridfunction_cross_product_aux.C @@ -39,7 +39,7 @@ VectorGridFunctionCrossProductAux::VectorGridFunctionCrossProductAux( void VectorGridFunctionCrossProductAux::Init(const platypus::GridFunctions & gridfunctions, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _u_gf = gridfunctions.Get(_u_gf_name); _v_gf = gridfunctions.Get(_v_gf_name); diff --git a/src/auxsolvers/vector_gridfunction_dot_product_aux.C b/src/auxsolvers/vector_gridfunction_dot_product_aux.C index 036bd782..7a9af98b 100644 --- a/src/auxsolvers/vector_gridfunction_dot_product_aux.C +++ b/src/auxsolvers/vector_gridfunction_dot_product_aux.C @@ -53,7 +53,7 @@ VectorGridFunctionDotProductAux::VectorGridFunctionDotProductAux( void VectorGridFunctionDotProductAux::Init(const platypus::GridFunctions & gridfunctions, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { if (_scaling_coef_name.empty()) { diff --git a/src/coefficients/MFEMParsedCoefficientHelper.C b/src/coefficients/MFEMParsedCoefficientHelper.C index 983692bd..e13dc45f 100644 --- a/src/coefficients/MFEMParsedCoefficientHelper.C +++ b/src/coefficients/MFEMParsedCoefficientHelper.C @@ -117,7 +117,7 @@ MFEMParsedCoefficientHelper::functionsOptimize() void MFEMParsedCoefficientHelper::Init(const platypus::GridFunctions & variables, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { auto nmfem_gfs = _gridfunction_names.size(); for (MooseIndex(_gridfunction_names) i = 0; i < nmfem_gfs; ++i) diff --git a/src/coefficients/coefficients.C b/src/coefficients/coefficients.C index f5b48a0f..43ecfded 100644 --- a/src/coefficients/coefficients.C +++ b/src/coefficients/coefficients.C @@ -1,6 +1,9 @@ #include "coefficients.h" #include +namespace platypus +{ + double prodFunc(double a, double b) { @@ -103,4 +106,6 @@ Coefficients::AddGlobalCoefficientsFromSubdomains() std::make_shared(3, subdomain_ids, subdomain_coefs)); } } -} \ No newline at end of file +} + +} // namespace platypus. \ No newline at end of file diff --git a/src/equation_systems/equation_system.C b/src/equation_systems/equation_system.C index ac57a714..216d8fe7 100644 --- a/src/equation_systems/equation_system.C +++ b/src/equation_systems/equation_system.C @@ -225,7 +225,7 @@ void EquationSystem::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { // Add optional kernels to the EquationSystem diff --git a/src/formulations/a_formulation.C b/src/formulations/a_formulation.C index 20aec4fe..305c21bd 100644 --- a/src/formulations/a_formulation.C +++ b/src/formulations/a_formulation.C @@ -128,7 +128,7 @@ AFormulation::RegisterJouleHeatingDensityAux(const std::string & p_field_name, void AFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_magnetic_permeability_name)) { MFEM_ABORT(_magnetic_permeability_name + " coefficient not found."); diff --git a/src/formulations/av_formulation.C b/src/formulations/av_formulation.C index d65df429..10f9958c 100644 --- a/src/formulations/av_formulation.C +++ b/src/formulations/av_formulation.C @@ -100,7 +100,7 @@ AVFormulation::RegisterGridFunctions() void AVFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_inv_alpha_coef_name)) { MFEM_ABORT(_inv_alpha_coef_name + " coefficient not found."); @@ -131,7 +131,7 @@ void AVEquationSystem::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { coefficients._scalars.Register( _dtalpha_coef_name, diff --git a/src/formulations/complex_maxwell_formulation.C b/src/formulations/complex_maxwell_formulation.C index be5b145f..b293ac9f 100644 --- a/src/formulations/complex_maxwell_formulation.C +++ b/src/formulations/complex_maxwell_formulation.C @@ -68,7 +68,7 @@ ComplexMaxwellFormulation::RegisterGridFunctions() void ComplexMaxwellFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_frequency_coef_name)) { diff --git a/src/formulations/dual_formulation.C b/src/formulations/dual_formulation.C index ff04c5a8..02632703 100644 --- a/src/formulations/dual_formulation.C +++ b/src/formulations/dual_formulation.C @@ -128,7 +128,7 @@ DualFormulation::RegisterGridFunctions() void DualFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_alpha_coef_name)) { @@ -153,7 +153,7 @@ void WeakCurlEquationSystem::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { coefficients._scalars.Register( _dtalpha_coef_name, diff --git a/src/formulations/e_formulation.C b/src/formulations/e_formulation.C index e9c13cbc..98667651 100644 --- a/src/formulations/e_formulation.C +++ b/src/formulations/e_formulation.C @@ -31,7 +31,7 @@ EFormulation::EFormulation(const std::string & magnetic_reluctivity_name, void EFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_magnetic_permeability_name)) { MFEM_ABORT(_magnetic_permeability_name + " coefficient not found."); diff --git a/src/formulations/eb_dual_formulation.C b/src/formulations/eb_dual_formulation.C index 2481840f..03a0d6d4 100644 --- a/src/formulations/eb_dual_formulation.C +++ b/src/formulations/eb_dual_formulation.C @@ -76,7 +76,7 @@ EBDualFormulation::RegisterJouleHeatingDensityAux(const std::string & p_field_na void EBDualFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_magnetic_permeability_name)) { MFEM_ABORT(_magnetic_permeability_name + " coefficient not found."); diff --git a/src/formulations/h_formulation.C b/src/formulations/h_formulation.C index 16db96f0..75d048c0 100644 --- a/src/formulations/h_formulation.C +++ b/src/formulations/h_formulation.C @@ -116,7 +116,7 @@ HFormulation::RegisterJouleHeatingDensityAux(const std::string & p_field_name, void HFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_electric_conductivity_name)) { MFEM_ABORT(_electric_conductivity_name + " coefficient not found."); diff --git a/src/formulations/hcurl_formulation.C b/src/formulations/hcurl_formulation.C index e9aca0b1..fbdfe5f3 100644 --- a/src/formulations/hcurl_formulation.C +++ b/src/formulations/hcurl_formulation.C @@ -118,7 +118,7 @@ void CurlCurlEquationSystem::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { coefficients._scalars.Register( _dtalpha_coef_name, @@ -153,7 +153,7 @@ CurlCurlEquationSystem::AddKernels() void HCurlFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_alpha_coef_name)) { MFEM_ABORT(_alpha_coef_name + " coefficient not found."); diff --git a/src/formulations/magnetostatic_formulation.C b/src/formulations/magnetostatic_formulation.C index 0360a907..a921161b 100644 --- a/src/formulations/magnetostatic_formulation.C +++ b/src/formulations/magnetostatic_formulation.C @@ -71,7 +71,7 @@ MagnetostaticFormulation::RegisterLorentzForceDensityAux(const std::string & f_f void MagnetostaticFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_magnetic_permeability_name)) { MFEM_ABORT(_magnetic_permeability_name + " coefficient not found."); diff --git a/src/formulations/statics_formulation.C b/src/formulations/statics_formulation.C index e96bd205..44f8ed8b 100644 --- a/src/formulations/statics_formulation.C +++ b/src/formulations/statics_formulation.C @@ -88,7 +88,7 @@ StaticsFormulation::RegisterGridFunctions() void StaticsFormulation::RegisterCoefficients() { - Coefficients & coefficients = GetProblem()->_coefficients; + platypus::Coefficients & coefficients = GetProblem()->_coefficients; if (!coefficients._scalars.Has(_alpha_coef_name)) { MFEM_ABORT(_alpha_coef_name + " coefficient not found."); diff --git a/src/kernels/curl_curl_kernel.C b/src/kernels/curl_curl_kernel.C index 2e05c1ee..ac9566f9 100644 --- a/src/kernels/curl_curl_kernel.C +++ b/src/kernels/curl_curl_kernel.C @@ -12,7 +12,7 @@ void CurlCurlKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _coef = coefficients._scalars.Get(_coef_name); } diff --git a/src/kernels/diffusion_kernel.C b/src/kernels/diffusion_kernel.C index db76121b..9749f7fc 100644 --- a/src/kernels/diffusion_kernel.C +++ b/src/kernels/diffusion_kernel.C @@ -12,7 +12,7 @@ void DiffusionKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _coef = coefficients._scalars.Get(_coef_name); } diff --git a/src/kernels/mixed_vector_gradient_kernel.C b/src/kernels/mixed_vector_gradient_kernel.C index 8ac5c3d0..f7eccc26 100644 --- a/src/kernels/mixed_vector_gradient_kernel.C +++ b/src/kernels/mixed_vector_gradient_kernel.C @@ -12,7 +12,7 @@ void MixedVectorGradientKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _coef = coefficients._scalars.Get(_coef_name); } diff --git a/src/kernels/vector_fe_mass_kernel.C b/src/kernels/vector_fe_mass_kernel.C index ccf64972..c57feca9 100644 --- a/src/kernels/vector_fe_mass_kernel.C +++ b/src/kernels/vector_fe_mass_kernel.C @@ -12,7 +12,7 @@ void VectorFEMassKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _coef = coefficients._scalars.Get(_coef_name); } diff --git a/src/kernels/vector_fe_weak_divergence_kernel.C b/src/kernels/vector_fe_weak_divergence_kernel.C index cfcbf623..97cbbdcc 100644 --- a/src/kernels/vector_fe_weak_divergence_kernel.C +++ b/src/kernels/vector_fe_weak_divergence_kernel.C @@ -12,7 +12,7 @@ void VectorFEWeakDivergenceKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _coef = coefficients._scalars.Get(_coef_name); } diff --git a/src/kernels/weak_curl_curl_kernel.C b/src/kernels/weak_curl_curl_kernel.C index 341becad..a15b44f4 100644 --- a/src/kernels/weak_curl_curl_kernel.C +++ b/src/kernels/weak_curl_curl_kernel.C @@ -14,7 +14,7 @@ void WeakCurlCurlKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _u = gridfunctions.Get(_coupled_gf_name); _coef = coefficients._scalars.Get(_coef_name); diff --git a/src/kernels/weak_curl_kernel.C b/src/kernels/weak_curl_kernel.C index 6f75db53..e25eebb8 100644 --- a/src/kernels/weak_curl_kernel.C +++ b/src/kernels/weak_curl_kernel.C @@ -15,7 +15,7 @@ void WeakCurlKernel::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _u = gridfunctions.Get(_hcurl_gf_name); _v = gridfunctions.Get(_hdiv_gf_name); diff --git a/src/problem/MFEMProblem.C b/src/problem/MFEMProblem.C index 34361880..ccb3c249 100644 --- a/src/problem/MFEMProblem.C +++ b/src/problem/MFEMProblem.C @@ -172,7 +172,7 @@ MFEMProblem::addMaterial(const std::string & kernel_name, for (unsigned int bid = 0; bid < mfem_material.blocks.size(); ++bid) { int block = std::stoi(mfem_material.blocks[bid]); - Subdomain mfem_subdomain(name, block); + platypus::Subdomain mfem_subdomain(name, block); mfem_material.storeCoefficients(mfem_subdomain); _coefficients._subdomains.push_back(mfem_subdomain); } diff --git a/src/problem_builders/problem_builder_base.C b/src/problem_builders/problem_builder_base.C index 07e9dceb..c40585bf 100644 --- a/src/problem_builders/problem_builder_base.C +++ b/src/problem_builders/problem_builder_base.C @@ -89,7 +89,7 @@ ProblemBuilder::SetJacobianSolver(std::shared_ptr jacobian_solver) } void -ProblemBuilder::SetCoefficients(Coefficients & coefficients) +ProblemBuilder::SetCoefficients(platypus::Coefficients & coefficients) { // logger.info("Setting Coefficients"); GetProblem()->_coefficients = coefficients; diff --git a/src/sources/closed_coil.C b/src/sources/closed_coil.C index a65ea34d..c8010f38 100644 --- a/src/sources/closed_coil.C +++ b/src/sources/closed_coil.C @@ -52,7 +52,7 @@ void ClosedCoilSolver::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { // Retrieving the parent FE space and mesh _h_curl_fe_space_parent = fespaces.Get(_hcurl_fespace_name); @@ -183,7 +183,7 @@ ClosedCoilSolver::Apply(mfem::ParLinearForm * lf) aux_gf.Register("source_electric_field", _source_electric_field); aux_gf.Register("source_current_density", _source_current_density); - Coefficients aux_coef; + platypus::Coefficients aux_coef; aux_coef._scalars.Register("electrical_conductivity", _sigma); platypus::ScaledVectorGridFunctionAux current_density_auxsolver( @@ -360,7 +360,7 @@ ClosedCoilSolver::AddWedgeToPWCoefs(std::vector & wedge_els) // First, define what in which of the old subdomains the wedge elements of the new subdomain lie std::vector subdomains = _ccs_coefs._subdomains; - Subdomain new_domain("wedge", _new_domain_attr); + platypus::Subdomain new_domain("wedge", _new_domain_attr); int wedge_old_att = -1; int ref_rank = -1; @@ -508,7 +508,7 @@ ClosedCoilSolver::SolveTransition() platypus::FESpaces fespaces; platypus::BCMap bc_maps; - Coefficients coefs; + platypus::Coefficients coefs; coefs._scalars.Register("electrical_conductivity", _sigma); platypus::GridFunctions gridfunctions; diff --git a/src/sources/div_free_source.C b/src/sources/div_free_source.C index 78939fc3..2a6bda1e 100644 --- a/src/sources/div_free_source.C +++ b/src/sources/div_free_source.C @@ -37,7 +37,7 @@ void DivFreeSource::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _h1_fe_space = fespaces.Get(_h1_fespace_name); _h_curl_fe_space = fespaces.Get(_hcurl_fespace_name); diff --git a/src/sources/open_coil.C b/src/sources/open_coil.C index 9f61a2a9..17d0904d 100644 --- a/src/sources/open_coil.C +++ b/src/sources/open_coil.C @@ -47,7 +47,7 @@ void OpenCoilSolver::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { if (!coefficients._scalars.Has(_i_coef_name)) { @@ -253,7 +253,7 @@ OpenCoilSolver::SPSCurrent() gridfunctions.Register("GradPhi", _grad_phi_child); gridfunctions.Register("V", _phi_child); - Coefficients coefs; + platypus::Coefficients coefs; coefs._scalars.Register("electric_conductivity", _sigma); platypus::ScalarPotentialSource sps( @@ -279,7 +279,7 @@ OpenCoilSolver::SPSCurrent() aux_gf.Register("grad_phi_child", _grad_phi_child); aux_gf.Register("source_current_density", _j_child); - Coefficients aux_coef; + platypus::Coefficients aux_coef; aux_coef._scalars.Register("electrical_conductivity", _sigma); platypus::ScaledVectorGridFunctionAux current_density_auxsolver( diff --git a/src/sources/scalar_potential_source.C b/src/sources/scalar_potential_source.C index bd323402..f0cb784c 100644 --- a/src/sources/scalar_potential_source.C +++ b/src/sources/scalar_potential_source.C @@ -27,7 +27,7 @@ void ScalarPotentialSource::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { _h1_fe_space = fespaces.Get(_h1_fespace_name); _h_curl_fe_space = fespaces.Get(_hcurl_fespace_name); diff --git a/src/sources/sources.C b/src/sources/sources.C index 5047f395..b6cb4ee7 100644 --- a/src/sources/sources.C +++ b/src/sources/sources.C @@ -7,7 +7,7 @@ void Sources::Init(platypus::GridFunctions & gridfunctions, const platypus::FESpaces & fespaces, platypus::BCMap & bc_map, - Coefficients & coefficients) + platypus::Coefficients & coefficients) { for (const auto & [name, source] : *this) {