micro_constraints_dirichlet

PURPOSE ^

MICRO_CONSTRAINTS_DIRICHLET Computes micro Dirichlet boundary conditions matrix

SYNOPSIS ^

function [ConstraintMat, ConstraintRhs ]=micro_constraints_dirichlet(Constraints, MacroMap, MacroVertices,MicroElements, MicroCoordinates, refquadnode)

DESCRIPTION ^

MICRO_CONSTRAINTS_DIRICHLET   Computes micro Dirichlet boundary conditions matrix
   [CONSTRAINTMAT, CONSTRAINTRHS] = MICRO_CONSTRAINTS_DIRICHLET(...
             CONSTRAINTS, MACROMAP, MACROVERTICES, MICROELEMENTS, ...
             MICROCOORDINATES, REFQUADNODE) 
   computes a matrix and corresponding vector used to enforce Dirichlet 
   boundary conditions on the micro problem. To do this, in hmm_stima_quad
   and hmm_stima_tri, respectively the matrix A_Micro will be augmented by
   CONSTRAINTMAT and boundary conditions are enforced using Langrange
   multipliers.

   CONSTRAINTS contains information about the micro boundary problem. 
   See make_contraints.m for details.

   MACROMAP is the transformation matrix for the affine map to the 
   reference element.

   MACROVERTICES contains the node coordinates of the macro elements.

   MICROELEMENTS has dimension (NMicro-1)^2 x 4 and contain the node
   numbers of the triangulation of the micro sampling domain.

   MICROCOORDINATES contains the coordinates of the nodes
   of the triangulation of the micro sampling domain.

   REFQUADNODES contains the quadrature nodes in the reference square

   CONSTRAINTMAT contains the matrix that will be used to enforce boundary
   conditions via Lagrange multipliers. This matrix together with the
   matrix A_MICRO will be used for the augmented matrix in hmm_stima_quad
   and hmm_stima_tri, respectively.

   CONSTRAINTRHS contains the corresponding right hand side.


   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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ConstraintMat, ConstraintRhs ]=...
0002     micro_constraints_dirichlet(Constraints, MacroMap, MacroVertices,...
0003     MicroElements, MicroCoordinates, refquadnode)
0004 %MICRO_CONSTRAINTS_DIRICHLET   Computes micro Dirichlet boundary conditions matrix
0005 %   [CONSTRAINTMAT, CONSTRAINTRHS] = MICRO_CONSTRAINTS_DIRICHLET(...
0006 %             CONSTRAINTS, MACROMAP, MACROVERTICES, MICROELEMENTS, ...
0007 %             MICROCOORDINATES, REFQUADNODE)
0008 %   computes a matrix and corresponding vector used to enforce Dirichlet
0009 %   boundary conditions on the micro problem. To do this, in hmm_stima_quad
0010 %   and hmm_stima_tri, respectively the matrix A_Micro will be augmented by
0011 %   CONSTRAINTMAT and boundary conditions are enforced using Langrange
0012 %   multipliers.
0013 %
0014 %   CONSTRAINTS contains information about the micro boundary problem.
0015 %   See make_contraints.m for details.
0016 %
0017 %   MACROMAP is the transformation matrix for the affine map to the
0018 %   reference element.
0019 %
0020 %   MACROVERTICES contains the node coordinates of the macro elements.
0021 %
0022 %   MICROELEMENTS has dimension (NMicro-1)^2 x 4 and contain the node
0023 %   numbers of the triangulation of the micro sampling domain.
0024 %
0025 %   MICROCOORDINATES contains the coordinates of the nodes
0026 %   of the triangulation of the micro sampling domain.
0027 %
0028 %   REFQUADNODES contains the quadrature nodes in the reference square
0029 %
0030 %   CONSTRAINTMAT contains the matrix that will be used to enforce boundary
0031 %   conditions via Lagrange multipliers. This matrix together with the
0032 %   matrix A_MICRO will be used for the augmented matrix in hmm_stima_quad
0033 %   and hmm_stima_tri, respectively.
0034 %
0035 %   CONSTRAINTRHS contains the corresponding right hand side.
0036 %
0037 %
0038 %   This function should not be modified.
0039 %
0040 %
0041 %   The code is available at http://anmc.epfl.ch/ and described in
0042 %   further detail in
0043 %
0044 %   A. Abdulle and A. Nonnenmacher
0045 %   "A short and versatile finite element multiscale code for
0046 %   homogenization problems"
0047 %   Computer Methods in Applied Mechanics and Engineering,
0048 %   http://dx.doi.org/10.1016/j.cma.2009.03.019
0049 %
0050 %   Please cite this article in any publication describing research
0051 %   performed using the software.
0052 %
0053 %
0054 %   Email           : assyr.abdulle@epfl.ch and achim.nonnenmacher@epfl.ch
0055 %   Last updated    : 04/29/2009 with MATLAB 7.4
0056 %
0057 %   FE_HMM2D is Copyright (C) 2009 A. Abdulle and A. Nonnenmacher.
0058 %   The software is provided free for non-commercial use unter the terms of
0059 %   the GNU General Public License. See "copyright.m" for full details.
0060 
0061 %
0062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0063 
0064 
0065 % determine whether we have macro triangles or quadrilaterals
0066 MacroNodes=size(MacroVertices, 1);
0067 
0068 % Dirichlet Boundary conditions
0069 NoOfDirichletNodes=size(Constraints,2);
0070 ConstraintMat=sparse(1:NoOfDirichletNodes, ...
0071     Constraints, ones(NoOfDirichletNodes,1));
0072 
0073 % Micro-coordinates of the dirichlet-nodes
0074 x_nodes= MicroCoordinates(Constraints', :);
0075  
0076 % coordinates in the macro reference triangle corresponding to the
0077 % micro-nodes with dirichlet boundary conditions
0078 x_node_ref = (MacroMap\(x_nodes-repmat(MacroVertices(1,:), ...
0079     NoOfDirichletNodes,1))')';
0080 
0081 % corresponding rhs
0082 if (MacroNodes==3) % we have macro triangles
0083     ConstraintRhs=shapefunction_tri(x_node_ref);
0084 end
0085 if (MacroNodes==4) % we have macro quadrilaterals
0086     ConstraintRhs=shapefunction_quad_lin(x_node_ref, refquadnode);
0087 end
0088 
0089 end

Generated on Tue 21-Jul-2009 10:55:32 by m2html © 2003