GetNumberOfActiveElements

PURPOSE ^

GETNUMBEROFACTIVEELEMENTS - get the number of active elements

SYNOPSIS ^

function [n1,n2]=GetNumberOfActiveElements(elements)

DESCRIPTION ^

GETNUMBEROFACTIVEELEMENTS - get the number of active elements

   Go through all elements, and if we find one with special characteristics, 
   like the MacAyeal's accelerated element, then we need to updat nel. 

   Usage:
      [n1,n2]=GetNumberOfActiveElements(elements)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [n1,n2]=GetNumberOfActiveElements(elements)
0002 %GETNUMBEROFACTIVEELEMENTS - get the number of active elements
0003 %
0004 %   Go through all elements, and if we find one with special characteristics,
0005 %   like the MacAyeal's accelerated element, then we need to updat nel.
0006 %
0007 %   Usage:
0008 %      [n1,n2]=GetNumberOfActiveElements(elements)
0009 
0010 for n=length(elements):-1:1, %start from the end, where we usually put the special elements.
0011 
0012     if strcmp(elements(n).element.type,'acceleratedtriaelem'),
0013         %we have an accelerated triaelem, stop the loop, and return  n1 n2
0014         n1=n; 
0015         n2=n;
0016         return;
0017     end
0018 end
0019 
0020 %If we are here, no special elements, return n1=1, n2=length(elements)
0021 n1=1;
0022 n2=length(elements);

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003