Line data Source code
1 : // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 : // SPDX-License-Identifier: Apache-2.0
3 :
4 : #ifndef PALACE_MODELS_SURFACE_IMPEDANCE_OPERATOR_HPP
5 : #define PALACE_MODELS_SURFACE_IMPEDANCE_OPERATOR_HPP
6 :
7 : #include <vector>
8 : #include <mfem.hpp>
9 :
10 : namespace palace
11 : {
12 :
13 : class IoData;
14 : class MaterialOperator;
15 : class MaterialPropertyCoefficient;
16 :
17 : //
18 : // A class handling impedance boundaries.
19 : //
20 0 : class SurfaceImpedanceOperator
21 : {
22 : private:
23 : // Reference to material property data (not owned).
24 : const MaterialOperator &mat_op;
25 :
26 : // Surface properties for impedance boundary attributes: surface resistance, capacitance,
27 : // and inductance.
28 0 : struct ImpedanceData
29 : {
30 : double Rs, Ls, Cs;
31 : mfem::Array<int> attr_list;
32 : };
33 : std::vector<ImpedanceData> boundaries;
34 :
35 : void SetUpBoundaryProperties(const IoData &iodata, const mfem::ParMesh &mesh);
36 : void PrintBoundaryInfo(const IoData &iodata, const mfem::ParMesh &mesh);
37 :
38 : public:
39 : SurfaceImpedanceOperator(const IoData &iodata, const MaterialOperator &mat_op,
40 : const mfem::ParMesh &mesh);
41 :
42 : // Returns array of surface impedance attributes.
43 : mfem::Array<int> GetAttrList() const;
44 : mfem::Array<int> GetRsAttrList() const;
45 : mfem::Array<int> GetLsAttrList() const;
46 : mfem::Array<int> GetCsAttrList() const;
47 :
48 : // Add contributions to system matrices from impedance boundaries with nonzero inductance,
49 : // resistance, and/or capacitance. For boundaries with more than R/L/C, impedances add in
50 : // parallel.
51 : void AddStiffnessBdrCoefficients(double coeff, MaterialPropertyCoefficient &fb);
52 : void AddDampingBdrCoefficients(double coeff, MaterialPropertyCoefficient &fb);
53 : void AddMassBdrCoefficients(double coeff, MaterialPropertyCoefficient &fb);
54 : };
55 :
56 : } // namespace palace
57 :
58 : #endif // PALACE_MODELS_SURFACE_IMPEDANCE_OPERATOR_HPP
|