tools/physicalModeling/mesh2faust/vega/libraries/volumetricMesh/generateInterpolationMatrix.h
raw symbols SCIP| 1 | /************************************************************************* |
| 2 | * * |
| 3 | * Vega FEM Simulation Library Version 3.1 * |
| 4 | * * |
| 5 | * "volumetricMesh" library , Copyright (C) 2007 CMU, 2009 MIT, 2016 USC * |
| 6 | * All rights reserved. * |
| 7 | * * |
| 8 | * Code author: Jernej Barbic * |
| 9 | * http://www.jernejbarbic.com/code * |
| 10 | * * |
| 11 | * Research: Jernej Barbic, Fun Shing Sin, Daniel Schroeder, * |
| 12 | * Doug L. James, Jovan Popovic * |
| 13 | * * |
| 14 | * Funding: National Science Foundation, Link Foundation, * |
| 15 | * Singapore-MIT GAMBIT Game Lab, * |
| 16 | * Zumberge Research and Innovation Fund at USC * |
| 17 | * * |
| 18 | * This library is free software; you can redistribute it and/or * |
| 19 | * modify it under the terms of the BSD-style license that is * |
| 20 | * included with this library in the file LICENSE.txt * |
| 21 | * * |
| 22 | * This library is distributed in the hope that it will be useful, * |
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file * |
| 25 | * LICENSE.TXT for more details. * |
| 26 | * * |
| 27 | *************************************************************************/ |
| 28 | |
| 29 | #ifndef _GENERATEINTERPOLATIONMATRIX_H_ |
| 30 | #define _GENERATEINTERPOLATIONMATRIX_H_ |
| 31 | |
| 32 | #include "sparseMatrix.h" |
| 33 | |
| 34 | // creates the sparse matrix A that interpolates a quantity from volumetric |
| 35 | // mesh vertices to an embedded triangle mesh: |
| 36 | // y = A * x |
| 37 | // y ... triangle mesh quantity |
| 38 | // x ... volumetric mesh quantity |
| 39 | |
| 40 | class GenerateInterpolationMatrix |
| 41 | { |
| 42 | public: |
| 43 | // If numSourceLocations is >= 0, matrix A will be right-padded with |
| 44 | // appropriate zero columns. Typically, numSourceLocations should be the |
| 45 | // number of volumetric mesh vertices. |
| 46 | // numTargetLocations, numElementVertices, vertices, weights, can be |
| 47 | // generated using the interpolation capabilities of the VolumetricMesh class |
| 48 | static void generate(int numTargetLocations, int numElementVertices, const int * vertices, const double * weights, SparseMatrix ** A, int numSourceLocations=-1); |
| 49 | }; |
| 50 | |
| 51 | #endif |
| 52 |