Code covered by the BSD License  

Highlights from
FELICITY

image thumbnail

FELICITY

by

 

21 Apr 2011 (Updated )

Finite ELement Implementation and Computational Interface Tool for You

Hdiv_Trans
% class for computing (symbolically) the Piola transform for H(div) functions.
% functions in this class are vector valued:
%           J = [\nabla_{x^hat} PHI(x^hat)]
%       vv(x) = (1/det(J)) J vv^hat(x^hat), where
%           x = PHI(x^hat), x^hat are ``local'' coordinates.
% Note: in principle, one can have tensor products of these H(div) functions.
% but we only care about how "one component" transforms.
% All quantities are computed with respect to x, e.g. \nabla_x vv(x), but are
% expressed in local coordinates, i.e. \nabla_x vv(PHI(x^hat))
classdef Hdiv_Trans < generic_trans
    properties %(SetAccess=private,GetAccess=private)
        GeoMap            % a Geometric_Trans object.
        vv                % this is a structure variable containing
                          %      the function, its derivatives, etc.
    end
    methods
        function obj = Hdiv_Trans(varargin)
            
            if (nargin ~= 2)
                disp('Requires 2 arguments!');
                disp('First  is the name of the function, f.');
                disp('Second is a Geometric_Trans object representing the local element map PHI.');
                error('Check the arguments!');
            end
            
            obj = obj@generic_trans(varargin{1}); % name of the function (string)
            obj.GeoMap = varargin{2};
            class_str = class(obj.GeoMap);
            if ~strcmp(class_str,'Geometric_Trans')
                error('GeoMap must be a Geometric_Trans object!');
            end
            % initialize the function
            obj = init_func(obj);
        end
    end
end

% END %

Contact us