FEI Version of the Day
fei_FiniteElementData.hpp
00001 /*
00002 // @HEADER
00003 // ************************************************************************
00004 //             FEI: Finite Element Interface to Linear Solvers
00005 //                  Copyright (2005) Sandia Corporation.
00006 //
00007 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the
00008 // U.S. Government retains certain rights in this software.
00009 //
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // 1. Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // 2. Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // 3. Neither the name of the Corporation nor the names of the
00022 // contributors may be used to endorse or promote products derived from
00023 // this software without specific prior written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Questions? Contact Alan Williams (william@sandia.gov) 
00038 //
00039 // ************************************************************************
00040 // @HEADER
00041 */
00042 
00043 #ifndef _fei_FiniteElementData_hpp_
00044 #define _fei_FiniteElementData_hpp_
00045 
00046 #include <fei_Lookup.hpp>
00047 
00075 class FiniteElementData {
00076  public:
00077 
00078   virtual ~FiniteElementData() {};
00079 
00085   virtual int parameters(int numParams, char** params) = 0;
00086 
00087 
00095   virtual int setLookup(Lookup& lookup) = 0;
00096 
00097 
00113   virtual int describeStructure(int numElemBlocks,
00114                                 const int* numElemsPerBlock,
00115                                 const int* numNodesPerElem,
00116                                 const int* elemMatrixSizePerBlock,
00117                                 int totalNumNodes,
00118                                 int numSharedNodes,
00119                                 int numMultCRs) = 0;
00120 
00133    virtual int setConnectivity(int elemBlockID,
00134                                int elemID,
00135                                int numNodes,
00136                                const int* nodeNumbers,
00137                                const int* numDofPerNode,
00138                                const int* dof_ids) = 0;
00139 
00151    virtual int setElemMatrix(int elemBlockID,
00152                              int elemID,
00153                              int numNodes,
00154                              const int* nodeNumbers,
00155                              const int* numDofPerNode,
00156                              const int* dof_ids,
00157                              const double *const * coefs) = 0;
00158 
00169    virtual int setElemVector(int elemBlockID,
00170                              int elemID,
00171                              int numNodes,
00172                              const int* nodeNumbers,
00173                              const int* numDofPerNode,
00174                              const int* dof_ids,
00175                              const double* coefs) = 0;
00176 
00183    virtual int setDirichletBCs(int numBCs,
00184                                const int* nodeNumbers,
00185                                const int* dof_ids,
00186                                const double* values) = 0;
00187 
00199    virtual int sumIntoMatrix(int numRowNodes,
00200                              const int* rowNodeNumbers,
00201                              const int* row_dof_ids,
00202                              const int* numColNodesPerRow,
00203                              const int* colNodeNumbers,
00204                              const int* col_dof_ids,
00205                              const double* coefs) = 0;
00206 
00207    virtual int sumIntoRHSVector(int numNodes,
00208                              const int* nodeNumbers,
00209                              const int* dof_ids,
00210                              const double* coefs) = 0;
00211 
00212    virtual int putIntoRHSVector(int numNodes,
00213                              const int* nodeNumbers,
00214                              const int* dof_ids,
00215                              const double* coefs) = 0;
00216 
00223    virtual int loadComplete() = 0;
00224 
00225 
00235    virtual int launchSolver(int& solveStatus, int& iterations) = 0;
00236 
00242    virtual int reset() = 0;
00243 
00247    virtual int deleteConstraints() = 0;
00248 
00254    virtual int getSolnEntry(int nodeNumber,
00255                             int dof_id,
00256                             double& value) = 0;
00257 
00260    virtual int getMultiplierSoln(int CRID, double& lagrangeMultiplier) = 0;
00261 
00273    virtual int putNodalFieldData(int fieldID,
00274                                  int fieldSize,
00275                                  int numNodes,
00276                                  const int* nodeNumbers,
00277                                  const double* coefs) = 0;
00278 
00281    virtual int setMultiplierCR(int CRID,
00282                                int numNodes,
00283                                const int* nodeNumbers,
00284                                const int* dof_ids,
00285                                const double* coefWeights,
00286                                double rhsValue) = 0;
00287 
00290    virtual int setPenaltyCR(int CRID,
00291                             int numNodes,
00292                             const int* nodeNumbers,
00293                             const int* dof_ids,
00294                             const double* coefWeights,
00295                             double penaltyValue,
00296                             double rhsValue) = 0;
00297 };
00298 
00299 #endif
00300 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends