FEI Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
snl_fei_LinearSystem_FEData.hpp
Go to the documentation of this file.
1 /*--------------------------------------------------------------------*/
2 /* Copyright 2005 Sandia Corporation. */
3 /* Under the terms of Contract DE-AC04-94AL85000, there is a */
4 /* non-exclusive license for use of this work by or on behalf */
5 /* of the U.S. Government. Export of this program may require */
6 /* a license from the United States Government. */
7 /*--------------------------------------------------------------------*/
8 
9 #ifndef _snl_fei_LinearSystem_FEData_hpp_
10 #define _snl_fei_LinearSystem_FEData_hpp_
11 
12 #include <fei_macros.hpp>
13 #include <fei_mpi.h>
14 #include <fei_utils.hpp>
15 #include <fei_LinearSystem.hpp>
16 #include <fei_Vector.hpp>
17 #include <fei_Matrix.hpp>
18 #include <fei_fwd.hpp>
19 
20 namespace fei {
21  class DirichletBCManager;
22 }
23 
24 namespace snl_fei {
28  public:
32 
34  virtual ~LinearSystem_FEData();
35 
37  int loadLagrangeConstraint(int constraintID,
38  const double *weights,
39  double rhsValue);
40 
42  int loadPenaltyConstraint(int constraintID,
43  const double *weights,
44  double penaltyValue,
45  double rhsValue);
46 
50  int loadComplete(bool applyBCs=true,
51  bool globalAssemble=true);
52 
55 
62  int parameters(int numParams,
63  const char* const* paramStrings)
64  { return( feData_->parameters(numParams, (char**)paramStrings) ); }
65 
67  int parameters(const fei::ParameterSet& params)
68  {
69  int numParams = 0;
70  const char** paramStrings = NULL;
71  std::vector<std::string> stdstrings;
73  fei::utils::strings_to_char_ptrs(stdstrings, numParams, paramStrings);
74 
75  int err = parameters(numParams, paramStrings);
76 
77  delete [] paramStrings;
78 
79  return(err);
80  }
81 
83  int setBCValuesOnVector(fei::Vector* vector);
84 
86  void setLookup(Lookup* lookup)
87  { lookup_ = lookup; }
88 
90  bool eqnIsEssentialBC(int globalEqnIndex) const;
91 
93  void getEssentialBCs(std::vector<int>& bcEqns,
94  std::vector<double>& bcVals) const;
95 
97  void getConstrainedEqns(std::vector<int>& crEqns) const;
98 
99  private:
100  int implementBCs(bool applyBCs);
101 
110 
111  std::vector<char*> attributeNames_;
112  std::vector<void*> attributes_;
113  };//class LinearSystem_FEData
114 }//namespace snl_fei
115 
116 #endif // _snl_fei_LinearSystem_FEData_hpp_
LinearSystem_FEData(fei::SharedPtr< FiniteElementData > &fedata, fei::SharedPtr< fei::MatrixGraph > &matrixGraph)
int setBCValuesOnVector(fei::Vector *vector)
virtual int parameters(int numParams, char **params)=0
void strings_to_char_ptrs(std::vector< std::string > &stdstrings, int &numStrings, const char **&charPtrs)
Definition: fei_utils.cpp:178
void convert_ParameterSet_to_strings(const fei::ParameterSet *paramset, std::vector< std::string > &paramStrings)
Definition: fei_utils.cpp:270
void getConstrainedEqns(std::vector< int > &crEqns) const
bool eqnIsEssentialBC(int globalEqnIndex) const
fei::SharedPtr< fei::Vector > soln_
#define MPI_Comm
Definition: fei_mpi.h:56
int loadPenaltyConstraint(int constraintID, const double *weights, double penaltyValue, double rhsValue)
int loadLagrangeConstraint(int constraintID, const double *weights, double rhsValue)
int parameters(const fei::ParameterSet &params)
fei::SharedPtr< fei::Vector > rhs_
fei::SharedPtr< FiniteElementData > getFiniteElementData()
fei::SharedPtr< FiniteElementData > feData_
int parameters(int numParams, const char *const *paramStrings)
void getEssentialBCs(std::vector< int > &bcEqns, std::vector< double > &bcVals) const
fei::SharedPtr< fei::Matrix > matrix_
int loadComplete(bool applyBCs=true, bool globalAssemble=true)