Locate active initial conditions
returns the active initial condition assignment
ic = findInitialConditions(
ic for the
initial conditions in the specified region.
Find the Active Initial Conditions
This example shows find the active initial conditions 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 initial conditions on each pair of regions.
setInitialConditions(model,12,"Face",[1,2]); setInitialConditions(model,13,"Face",[1,3]); setInitialConditions(model,23,"Face",[2,3]);
Check the initial conditions specification for region 1.
ics = model.InitialConditions; ic = findInitialConditions(ics,"Face",1)
ic = GeometricInitialConditions with properties: RegionType: 'face' RegionID: [1 3] InitialValue: 13 InitialDerivative: 
ics — Model initial conditions
InitialConditions property of a PDE model
Model initial conditions, specified as the
InitialConditions property of a PDE model. Initial
conditions can be complex numbers.
RegionType — Geometric region type
"Edge" for a 2-D model |
"Face" for a 2-D model or 3-D model |
"Cell" for a 3-D model
Geometric region type, specified as
"Edge" for a 2-D
"Face" for a 2-D model or 3-D model, or
"Cell" for a 3-D model.
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
ic — Initial condition assignment
GeometricInitialConditions object |
Initial condition assignment, returned as a GeometricInitialConditions Properties or NodalInitialConditions Properties object.
Introduced in R2016a