Specifying 3D PDE Coefficients at Element Centroids

I am trying to specify my c, a, and f coefficients for a 3D problem by assembling row vectors for each. The row vectors are [1 x number of elements] (the coefficients are calculated at the element centroids). When I call...
u = assempde(pdem,c,a,f)
for this 3D problem I receive and error. However I know that for a similar 2D problem this approach works fine and gives me a nice looking solution u.
Is there any workaround for a 3D problem? My coefficients cannot be specified by the region and state arguments alone. I need additional arguments to define these coefficients.
Thanks!

Risposte (1)

For 3-D problems you must pass nonconstant coefficients in the requisite format, which involves writing a function that accepts the region and state inputs and returns the coefficient values.
If you must, you can interpolate your coefficient values from particular points that you know. See scatteredInterpolant.
Alan Weiss
MATLAB mathematical toolbox documentation

Richiesto:

il 7 Mar 2017

Risposto:

il 7 Mar 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by