escript  Revision_
NodeMapping.h
Go to the documentation of this file.
00001 
00002 /*****************************************************************************
00003 *
00004 * Copyright (c) 2003-2014 by University of Queensland
00005 * http://www.uq.edu.au
00006 *
00007 * Primary Business: Queensland, Australia
00008 * Licensed under the Open Software License version 3.0
00009 * http://www.opensource.org/licenses/osl-3.0.php
00010 *
00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
00012 * Development 2012-2013 by School of Earth Sciences
00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
00014 *
00015 *****************************************************************************/
00016 
00017 /*                                                                                                                     */
00018 /* NodeMapping provides a mapping from the local nodes typically to the degrees of freedom,                            */
00019 /*    the reduced degrees of freedom or the reduced node set                                                           */
00020 /*                                                                                                                     */
00021 
00022 #ifndef INC_DUDLEY_NODEMAPPING
00023 #define INC_DUDLEY_NODEMAPPING
00024 
00025 #include "esysUtils/Esys_MPI.h"
00026 
00027 struct Dudley_NodeMapping {
00028     dim_t numNodes;     /* number of FEM nodes */
00029     index_t *target;        /* target[i] defines the target if FEM  node i =0,...,numNodes */
00030     index_t unused;     /* target[i]=unused defines that no target is defined for FEM  node i */
00031     dim_t numTargets;       /* number of targets */
00032     index_t *map;       /* maps the target nodes back to the FEM nodes: target[map[i]]=i */
00033     dim_t reference_counter;
00034 };
00035 typedef struct Dudley_NodeMapping Dudley_NodeMapping;
00036 
00037 Dudley_NodeMapping *Dudley_NodeMapping_alloc(dim_t numNodes, index_t *target, index_t unused);
00038 void Dudley_NodeMapping_free(Dudley_NodeMapping *);
00039 Dudley_NodeMapping *Dudley_NodeMapping_getReference(Dudley_NodeMapping *in);
00040 
00041 #endif