Home > demos > acgc > acgcf.m

acgcf

PURPOSE ^

pde for AC with global coupling

SYNOPSIS ^

function [c,a,f,b]=acgcf(p,u,lam)

DESCRIPTION ^

 pde for AC with global coupling 
 first check if eta,nu belong to the current grid

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [c,a,f,b]=acgcf(p,u,lam)  
0002 % pde for AC with global coupling
0003 % first check if eta,nu belong to the current grid
0004 global eta nu; try se=size(eta,2); catch; eta=[]; se=0; end
0005 if(se~=size(u,1)) % eta not yet set, or mesh is refined
0006   C=n2triamat(p.points,p.tria); ta=triar(p.points,p.tria); 
0007   eta=ta*C;bc=p.bcf(p,u,lam);
0008   [M,nu]=assempde(bc,p.points,p.edges,p.tria,0,0,1);
0009 end
0010 um=eta*u; u=pdeintrp(p.points,p.tria,u); c=p.d; a=0; b=0;
0011 f=p.c1*u+p.c2*u.^2+p.c3*u.^3+p.c5*u.^5+lam*um; 
0012

Generated on Wed 15-Aug-2012 12:53:02 by m2html © 2005