DiscretizeBoundaryConditions
DiscretizeBoundaryConditions[bcdata,mdata,sd,dep]
discretizes the part with dependence dep of the boundary condition data bcdata based on method data mdata and solution data sd to generate a DiscretizedBoundaryConditionData object.
Details and Options
- DiscretizeBoundaryConditions discretizes partial differential equation boundary conditions.
- DiscretizeBoundaryConditions returns a DiscretizedBoundaryConditionData object.
- The boundary condition data bcdata is a BoundaryConditionData object generated by InitializeBoundaryConditions.
- The method data mdata is a PDE method data object, such as FEMMethodData, generated through InitializePDEMethodData.
- The dependence dep can be one of the following:
-
"Discrete" linear coefficients depending on discrete variables "IndexedDiscrete" linear coefficients depending on indexed discrete variables "Parametric" linear coefficients depending on parameters but not on time "Stationary" linear coefficients depending on spatial independent variables but not on time or parameters "Transient" - linear coefficients depending on time
- DiscretizeBoundaryConditions[bcs,mdata,sd] is equivalent to DiscretizeBoundaryConditions[bcs,mdata,sd,"Stationary"].
- The "Space" component of vd and sd should be set to the spatial variables and the spatial mesh represented as an NumericalRegion object, respectively.
- The "DependentVariables" component of vd should be set to the list of unknown function names without arguments.
- For time-dependent problems, the "Time" component of vd and sd should be set to the temporal variable and the current integration time, respectively.
- For time-dependent problems with discrete or indexed discrete variables that only change at discrete times during the time integration, the "Discrete" and/or "IndexedDiscrete" component of vd and sd should be set to the discrete variables and the initial discrete values, respectively.
- For problems with parameters that do not change during the solution process, the "Parameters" component of vd and sd should be set to the parametric variables and the initial parametric values, respectively.
- The following option can be given:
-
"PartialBoundaryAssembly" Automatic which parts of the boundary to assemble
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
Load the finite element package:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-j4klzi
Set up a NumericalRegion:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-nx6wf8

Set up variable and solution data:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-b1fv3m
Set up boundary condition data:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-7wkrax

Discretize initialized boundary conditions based on method data and solution data:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-jegsg1

Scope (1)Survey of the scope of standard use cases
Options (1)Common values & functionality for each option
"PartialBoundaryAssembly" (1)
To partially discretize boundary conditions, the boundary mesh elements and point mesh elements need to be split into the same number of groups:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-dj4gez
Visualize the mesh. The blue and green edge elements each form a boundary element group, and so do the orange and red point elements:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-5te75h

Set up a NumericalRegion, variable and solution data, and method data:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-ck6q7s
Initialize a DirichletCondition on x=0 and a NeumannValue on x=1:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-o0g3ti
Partially discretize the boundary condition over the boundary element groups:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-banj0f
Initialize and discretize a PDE:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-ulh8du
Extract the system matrices and deploy each of the partially assembled boundary conditions:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-t95583
For comparison, discretize the boundary conditions over the entire boundary:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-gwqci1
Verify that the load vector and stiffness matrix contribution add up:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-oqyh1x


https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-2fypdl

Verify that the system matrices are the same:

https://wolfram.com/xid/0jpx2mn91qcetu472bq65qpjsm53rn-l9olq5

Wolfram Research (2014), DiscretizeBoundaryConditions, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html.
Text
Wolfram Research (2014), DiscretizeBoundaryConditions, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html.
Wolfram Research (2014), DiscretizeBoundaryConditions, Wolfram Language function, https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html.
CMS
Wolfram Language. 2014. "DiscretizeBoundaryConditions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html.
Wolfram Language. 2014. "DiscretizeBoundaryConditions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html.
APA
Wolfram Language. (2014). DiscretizeBoundaryConditions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html
Wolfram Language. (2014). DiscretizeBoundaryConditions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html
BibTeX
@misc{reference.wolfram_2025_discretizeboundaryconditions, author="Wolfram Research", title="{DiscretizeBoundaryConditions}", year="2014", howpublished="\url{https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html}", note=[Accessed: 25-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_discretizeboundaryconditions, organization={Wolfram Research}, title={DiscretizeBoundaryConditions}, year={2014}, url={https://reference.wolfram.com/language/FEMDocumentation/ref/DiscretizeBoundaryConditions.html}, note=[Accessed: 25-May-2025
]}