


MICROMESH_COORDS Computes node coordinates for a micro sampling domain
MICROCOORDINATES = MICROMESH_COORDS(NMICRO, CENTER, DELTA)
Computes the coordinates of the nodes for the micro sampling domain
meshed using rectangles.
NMICRO is the number of degrees of freedom per space dimension in the
micro domain
CENTER contains the coordinates of the center of the sampling domain.
These usually are the barycenters for macro triangles or the quadrature nodes
for macro parallelograms.
DELTA is the width or height of the square sampling domain.
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 [MicroCoordinates]=micromesh_coords(NMicro, center, delta) 0002 %MICROMESH_COORDS Computes node coordinates for a micro sampling domain 0003 % MICROCOORDINATES = MICROMESH_COORDS(NMICRO, CENTER, DELTA) 0004 % Computes the coordinates of the nodes for the micro sampling domain 0005 % meshed using rectangles. 0006 % 0007 % NMICRO is the number of degrees of freedom per space dimension in the 0008 % micro domain 0009 % 0010 % CENTER contains the coordinates of the center of the sampling domain. 0011 % These usually are the barycenters for macro triangles or the quadrature nodes 0012 % for macro parallelograms. 0013 % 0014 % DELTA is the width or height of the square sampling domain. 0015 % 0016 % 0017 % This function should not be modified. 0018 % 0019 % 0020 % The code is available at http://anmc.epfl.ch/ and described in 0021 % further detail in 0022 % 0023 % A. Abdulle and A. Nonnenmacher 0024 % "A short and versatile finite element multiscale code for 0025 % homogenization problems" 0026 % Computer Methods in Applied Mechanics and Engineering, 0027 % http://dx.doi.org/10.1016/j.cma.2009.03.019 0028 % 0029 % Please cite this article in any publication describing research 0030 % performed using the software. 0031 % 0032 % 0033 % Email : assyr.abdulle@epfl.ch and achim.nonnenmacher@epfl.ch 0034 % Last updated : 04/29/2009 with MATLAB 7.4 0035 % 0036 % FE_HMM2D is Copyright (C) 2009 A. Abdulle and A. Nonnenmacher. 0037 % The software is provided free for non-commercial use unter the terms of 0038 % the GNU General Public License. See "copyright.m" for full details. 0039 0040 % 0041 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0042 0043 0044 % divide each dimension into N equidistant nodes 0045 x=linspace(center(1)-.5*delta, center(1)+.5*delta, NMicro); 0046 y=linspace(center(2)-.5*delta, center(2)+.5*delta, NMicro); 0047 0048 % build 2d-grid 0049 [xx,yy] = meshgrid(x,y); 0050 % and reshape so we get one matrix with the coordinates 0051 MicroCoordinates = [xx(:) yy(:)]; 0052 0053 end