findCoefficients
Locate active PDE coefficients
Description
returns the active coefficient assignment CA
= findCoefficients(coeffs
,RegionType
,RegionID
)CA
for the coefficients
in the specified region.
Examples
Find the Active Coefficients for a Region
Create a PDE model that has a few subdomains.
model = createpde(); geometryFromEdges(model,@lshapeg); pdegplot(model,"FaceLabels","on") ylim([-1.1,1.1]) axis equal
Set coefficients on each pair of regions.
specifyCoefficients(model,"m",0,"d",0,"c",12,"a",0,"f",1,"Face",[1,2]); specifyCoefficients(model,"m",0,"d",0,"c",13,"a",0,"f",2,"Face",[1,3]); specifyCoefficients(model,"m",0,"d",0,"c",23,"a",0,"f",3,"Face",[2,3]);
Check the coefficient specification for region 1.
coeffs = model.EquationCoefficients;
ca = findCoefficients(coeffs,"Face",1)
ca = CoefficientAssignment with properties: RegionType: 'face' RegionID: [1 3] m: 0 d: 0 c: 13 a: 0 f: 2
Input Arguments
coeffs
— Model coefficients
EquationCoefficients
property of a PDE model
Model coefficients, specified as the
EquationCoefficients
property of a PDE model.
Coefficients can be complex numbers.
Example: model.EquationCoefficients
RegionType
— Geometric region type
"Face"
for a 2-D model | "Cell"
for a 3-D model
Geometric region type, specified as "Face"
for a 2-D
model, or "Cell"
for a 3-D model.
Example: ca =
findCoefficients(coeffs,"Face",[1,3])
Data Types: char
| string
RegionID
— Region ID
vector of positive integers
Region ID, specified as a vector of positive integers. View the subdomain
labels for a 2-D model using
pdegplot(model,"FaceLabels","on")
. Currently, there
are no subdomains for 3-D models, so the only acceptable value for a 3-D
model is 1
.
Example: ca =
findCoefficients(coeffs,"Face",[1,3])
Data Types: double
Output Arguments
CA
— Coefficient assignment
CoefficientAssignment
object
Coefficient assignment, returned as a CoefficientAssignment Properties object.
Version History
Introduced in R2016a
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)