FEI Package Browser (Single Doxygen Collection)  Version of the Day
snl_fei_LinearSystem_General.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_General_hpp_
10 #define _snl_fei_LinearSystem_General_hpp_
11 
12 #include <fei_macros.hpp>
13 #include <fei_mpi.h>
14 #include <fei_CSVec.hpp>
15 #include <fei_LinearSystem.hpp>
16 #include <fei_Matrix.hpp>
17 #include <fei_Vector.hpp>
18 #include <fei_fwd.hpp>
19 #include <fei_Logger.hpp>
20 
21 namespace fei {
22  class DirichletBCManager;
23 }
24 
25 namespace snl_fei {
28  private fei::Logger {
29  public:
32 
34  virtual ~LinearSystem_General();
35 
38  int loadEssentialBCs(int numIDs,
39  const int* IDs,
40  int idType,
41  int fieldID,
42  int offsetIntoField,
43  const double* prescribedValues);
44 
47  int loadEssentialBCs(int numIDs,
48  const int* IDs,
49  int idType,
50  int fieldID,
51  const int* offsetIntoField,
52  const double* prescribedValues);
53 
55  int loadLagrangeConstraint(int constraintID,
56  const double *weights,
57  double rhsValue);
58 
60  int loadPenaltyConstraint(int constraintID,
61  const double *weights,
62  double penaltyValue,
63  double rhsValue);
64 
68  int loadComplete(bool applyBCs=true,
69  bool globalAssemble=true);
70 
77  int parameters(int numParams,
78  const char* const* paramStrings);
79 
81  int parameters(const fei::ParameterSet& params);
82 
84  int setBCValuesOnVector(fei::Vector* vector);
85 
87  bool eqnIsEssentialBC(int globalEqnIndex) const;
88 
90  void getEssentialBCs(std::vector<int>& bcEqns,
91  std::vector<double>& bcVals) const;
92 
94  void getConstrainedEqns(std::vector<int>& crEqns) const;
95 
96  private:
97  void setName(const char* name);
98 
99  int fill_EssBCValues();
100 
101  int implementBCs(bool applyBCs);
102 
104 
106 
108 
109  int getMatrixRow(fei::Matrix* matrix, int row,
110  std::vector<double>& coefs,
111  std::vector<int>& indices);
112 
114 
117 
122 
125 
128 
129  std::string name_;
130  std::map<std::string, unsigned> named_loadcomplete_counter_;
131 
132  std::vector<int> iwork_;
133  std::vector<double> dwork_;
134  std::string dbgprefix_;
135  };//class LinearSystem_General
136 }//namespace snl_fei
137 
138 #endif // _snl_fei_LinearSystem_General_hpp_
snl_fei::LinearSystem_General::LinearSystem_General
LinearSystem_General(fei::SharedPtr< fei::MatrixGraph > &matrixGraph)
Definition: snl_fei_LinearSystem_General.cpp:36
snl_fei::LinearSystem_General::getConstrainedEqns
void getConstrainedEqns(std::vector< int > &crEqns) const
Definition: snl_fei_LinearSystem_General.cpp:368
snl_fei::LinearSystem_General::implementBCs
int implementBCs(bool applyBCs)
Definition: snl_fei_LinearSystem_General.cpp:448
snl_fei::LinearSystem_General::loadEssentialBCs
int loadEssentialBCs(int numIDs, const int *IDs, int idType, int fieldID, int offsetIntoField, const double *prescribedValues)
Definition: snl_fei_LinearSystem_General.cpp:162
fei::Vector
Definition: fei_Vector.hpp:57
snl_fei
Definition: fei_MatrixGraph_Impl2.cpp:46
snl_fei::LinearSystem_General::setBCValuesOnVector
int setBCValuesOnVector(fei::Vector *vector)
Definition: snl_fei_LinearSystem_General.cpp:321
snl_fei::LinearSystem_General::fill_EssBCValues
int fill_EssBCValues()
snl_fei::LinearSystem_General::comm_
MPI_Comm comm_
Definition: snl_fei_LinearSystem_General.hpp:113
snl_fei::LinearSystem_General::firstLocalOffset_
int firstLocalOffset_
Definition: snl_fei_LinearSystem_General.hpp:126
snl_fei::LinearSystem_General::~LinearSystem_General
virtual ~LinearSystem_General()
Definition: snl_fei_LinearSystem_General.cpp:67
snl_fei::LinearSystem_General::numProcs_
int numProcs_
Definition: snl_fei_LinearSystem_General.hpp:124
snl_fei::LinearSystem_General::BCenforcement_no_column_mod_
bool BCenforcement_no_column_mod_
Definition: snl_fei_LinearSystem_General.hpp:121
fei::SharedPtr< fei::MatrixGraph >
fei_CSVec.hpp
fei_macros.hpp
fei_fwd.hpp
fei_Vector.hpp
fei::Logger
Definition: fei_Logger.hpp:19
fei::LinearSystem
Definition: fei_LinearSystem.hpp:26
fei::ParameterSet
Definition: fei_ParameterSet.hpp:46
snl_fei::LinearSystem_General::bcs_trump_slaves_
bool bcs_trump_slaves_
Definition: snl_fei_LinearSystem_General.hpp:119
snl_fei::LinearSystem_General::resolveConflictRequested_
bool resolveConflictRequested_
Definition: snl_fei_LinearSystem_General.hpp:118
snl_fei::LinearSystem_General::dwork_
std::vector< double > dwork_
Definition: snl_fei_LinearSystem_General.hpp:133
snl_fei::LinearSystem_General::dbgprefix_
std::string dbgprefix_
Definition: snl_fei_LinearSystem_General.hpp:134
snl_fei::LinearSystem_General::getMatrixRow
int getMatrixRow(fei::Matrix *matrix, int row, std::vector< double > &coefs, std::vector< int > &indices)
Definition: snl_fei_LinearSystem_General.cpp:824
snl_fei::LinearSystem_General::setName
void setName(const char *name)
Definition: snl_fei_LinearSystem_General.cpp:144
snl_fei::LinearSystem_General::iwork_
std::vector< int > iwork_
Definition: snl_fei_LinearSystem_General.hpp:132
fei_mpi.h
snl_fei::LinearSystem_General::name_
std::string name_
Definition: snl_fei_LinearSystem_General.hpp:129
snl_fei::LinearSystem_General::loadLagrangeConstraint
int loadLagrangeConstraint(int constraintID, const double *weights, double rhsValue)
Definition: snl_fei_LinearSystem_General.cpp:849
snl_fei::LinearSystem_General::essBCvalues_
fei::CSVec * essBCvalues_
Definition: snl_fei_LinearSystem_General.hpp:115
snl_fei::LinearSystem_General::enforceEssentialBC_step_1
void enforceEssentialBC_step_1(fei::CSVec &essBCs)
Definition: snl_fei_LinearSystem_General.cpp:598
snl_fei::LinearSystem_General::parameters
int parameters(int numParams, const char *const *paramStrings)
Definition: snl_fei_LinearSystem_General.cpp:73
snl_fei::LinearSystem_General::allEssBCs_
fei::CSVec * allEssBCs_
Definition: snl_fei_LinearSystem_General.hpp:116
fei_Logger.hpp
snl_fei::LinearSystem_General::eqnIsEssentialBC
bool eqnIsEssentialBC(int globalEqnIndex) const
Definition: snl_fei_LinearSystem_General.cpp:339
fei_Matrix.hpp
snl_fei::LinearSystem_General::enforceEssentialBC_step_2
void enforceEssentialBC_step_2(fei::CSVec &essBCs)
Definition: snl_fei_LinearSystem_General.cpp:689
snl_fei::LinearSystem_General::getEssentialBCs
void getEssentialBCs(std::vector< int > &bcEqns, std::vector< double > &bcVals) const
Definition: snl_fei_LinearSystem_General.cpp:349
snl_fei::LinearSystem_General::lastLocalOffset_
int lastLocalOffset_
Definition: snl_fei_LinearSystem_General.hpp:127
snl_fei::LinearSystem_General::loadPenaltyConstraint
int loadPenaltyConstraint(int constraintID, const double *weights, double penaltyValue, double rhsValue)
Definition: snl_fei_LinearSystem_General.cpp:898
fei
Definition: fei_ArrayUtils.hpp:16
fei::Matrix
Definition: fei_Matrix.hpp:30
snl_fei::LinearSystem_General
Definition: snl_fei_LinearSystem_General.hpp:27
MPI_Comm
#define MPI_Comm
Definition: fei_mpi.h:56
fei_LinearSystem.hpp
snl_fei::LinearSystem_General::enforceEssentialBC_LinSysCore
int enforceEssentialBC_LinSysCore()
Definition: snl_fei_LinearSystem_General.cpp:501
snl_fei::LinearSystem_General::named_loadcomplete_counter_
std::map< std::string, unsigned > named_loadcomplete_counter_
Definition: snl_fei_LinearSystem_General.hpp:130
snl_fei::LinearSystem_General::localProc_
int localProc_
Definition: snl_fei_LinearSystem_General.hpp:123
fei::CSVec
Definition: fei_CSVec.hpp:24
snl_fei::LinearSystem_General::loadComplete
int loadComplete(bool applyBCs=true, bool globalAssemble=true)
Definition: snl_fei_LinearSystem_General.cpp:200
snl_fei::LinearSystem_General::explicitBCenforcement_
bool explicitBCenforcement_
Definition: snl_fei_LinearSystem_General.hpp:120