Accessing the intermediate solution from within bcfun when using bvp4c

I am using bvp4c to solve for the displacement of a cantilevered beam supported by truss. (See picture) In order to accurately capture the boundary condition at the strut-beam interface I require the mesh that bvp4c is using. Obviously I know what the initial mesh is as I have given bvp4c an initial estimate (xi and solinit) however for this particular problem bvp4c has a tendency to refine the mesh inside the bvp4c function and I need this to be available every time bvp4c calls the 'bcfun' function. Any help would be much appreciated.
Just to be clear, I would like to be able to do something like this:
function res=bcfun(ya,yb)
current_mesh=current_sol.x;
ya(1,1)=f(current_mesh)
ya(2,1)=f(current_mesh)
res=[...
ya(1,1) ; ...
ya(2,1) ; ...
etc ; ...
];
end

Answers (0)

Products

Tags

Asked:

on 5 Nov 2015

Edited:

on 6 Nov 2015

Community Treasure Hunt

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

Start Hunting!