SHAPEFUNCTION_QUAD Evaluates the linearized basis function on the reference square PHI = SHAPEFUNCTION_QUAD(Z, QUADNODE) Evaluates the linearized basis function phi(x) on the reference (macro) square, where the linearization is based on the point quadnode. Z is a 2 x 1 vector containing the x and y coordinates in the reference square. QUADNODE is a 2 x 1 vector containing the x and y coordinates of the quadrature node the linearization is based on in the reference square. PHI contains the evaluated function value. This function should not be modified. The code is available at http://anmc.epfl.ch/ and described in further detail in A. Abdulle and A. Nonnenmacher "A short and versatile finite element multiscale code for homogenization problems" Computer Methods in Applied Mechanics and Engineering, http://dx.doi.org/10.1016/j.cma.2009.03.019 Please cite this article in any publication describing research performed using the software. Email : assyr.abdulle@epfl.ch and achim.nonnenmacher@epfl.ch Last updated : 04/29/2009 with MATLAB 7.4 FE_HMM2D is Copyright (C) 2009 A. Abdulle and A. Nonnenmacher. The software is provided free for non-commercial use unter the terms of the GNU General Public License. See "copyright.m" for full details.
0001 function phi=shapefunction_quad_lin(z,quadnode) 0002 %SHAPEFUNCTION_QUAD Evaluates the linearized basis function on the reference square 0003 % PHI = SHAPEFUNCTION_QUAD(Z, QUADNODE) 0004 % Evaluates the linearized basis function phi(x) on the reference (macro) 0005 % square, where the linearization is based on the point quadnode. 0006 % 0007 % Z is a 2 x 1 vector containing the x and y coordinates in the reference 0008 % square. 0009 % 0010 % QUADNODE is a 2 x 1 vector containing the x and y coordinates of the 0011 % quadrature node the linearization is based on in the reference square. 0012 % 0013 % PHI contains the evaluated function value. 0014 % 0015 % 0016 % This function should not be modified. 0017 % 0018 % 0019 % The code is available at http://anmc.epfl.ch/ and described in 0020 % further detail in 0021 % 0022 % A. Abdulle and A. Nonnenmacher 0023 % "A short and versatile finite element multiscale code for 0024 % homogenization problems" 0025 % Computer Methods in Applied Mechanics and Engineering, 0026 % http://dx.doi.org/10.1016/j.cma.2009.03.019 0027 % 0028 % Please cite this article in any publication describing research 0029 % performed using the software. 0030 % 0031 % 0032 % Email : assyr.abdulle@epfl.ch and achim.nonnenmacher@epfl.ch 0033 % Last updated : 04/29/2009 with MATLAB 7.4 0034 % 0035 % FE_HMM2D is Copyright (C) 2009 A. Abdulle and A. Nonnenmacher. 0036 % The software is provided free for non-commercial use unter the terms of 0037 % the GNU General Public License. See "copyright.m" for full details. 0038 0039 % 0040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0041 0042 0043 % quadrature node, repeated 0044 quadnode_rep=repmat(quadnode', size(z,1), 1); 0045 x=quadnode_rep(:,1); y=quadnode_rep(:,2); 0046 0047 % quadrature node, single 0048 xq=quadnode(1); yq=quadnode(2); 0049 0050 % dx, dy for all the points 0051 dz=z-quadnode_rep; 0052 0053 phi(:,1)= (1-x).*(1-y)+ dz(:,1) *(yq-1) + dz(:,2)* (xq-1); 0054 phi(:,2)= x.*(1-y) + dz(:,1) *(1-yq) + dz(:,2)* ( -xq); 0055 phi(:,3)= x.*y + dz(:,1) *( yq) + dz(:,2)* ( xq); 0056 phi(:,4)= (1-x).*y + dz(:,1) *( -yq) + dz(:,2)* (1-xq); 0057 0058 end