FEI
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
base
snl_fei_LinearSystem_General.hpp
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 {
27
class
LinearSystem_General
:
public
fei::LinearSystem
,
28
private
fei::Logger
{
29
public
:
31
LinearSystem_General
(
fei::SharedPtr<fei::MatrixGraph>
& matrixGraph);
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
103
int
enforceEssentialBC_LinSysCore();
104
105
void
enforceEssentialBC_step_1(
fei::CSVec
& essBCs);
106
107
void
enforceEssentialBC_step_2(
fei::CSVec
& essBCs);
108
109
int
getMatrixRow(
fei::Matrix
* matrix,
int
row,
110
std::vector<double>& coefs,
111
std::vector<int>& indices);
112
113
MPI_Comm comm_;
114
115
fei::CSVec
* essBCvalues_;
116
fei::CSVec
* allEssBCs_;
117
118
bool
resolveConflictRequested_;
119
bool
bcs_trump_slaves_;
120
bool
explicitBCenforcement_;
121
bool
BCenforcement_no_column_mod_;
122
123
int
localProc_;
124
int
numProcs_;
125
126
int
firstLocalOffset_;
127
int
lastLocalOffset_;
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_
fei::CSVec
Definition
fei_CSVec.hpp:24
fei::LinearSystem
Definition
fei_LinearSystem.hpp:26
fei::Logger
Definition
fei_Logger.hpp:19
fei::Matrix
Definition
fei_Matrix.hpp:30
fei::ParameterSet
Definition
fei_ParameterSet.hpp:46
fei::SharedPtr
Definition
fei_SharedPtr.hpp:65
fei::Vector
Definition
fei_Vector.hpp:57
snl_fei::LinearSystem_General::loadComplete
int loadComplete(bool applyBCs=true, bool globalAssemble=true)
Definition
snl_fei_LinearSystem_General.cpp:200
snl_fei::LinearSystem_General::LinearSystem_General
LinearSystem_General(fei::SharedPtr< fei::MatrixGraph > &matrixGraph)
Definition
snl_fei_LinearSystem_General.cpp:36
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::setBCValuesOnVector
int setBCValuesOnVector(fei::Vector *vector)
Definition
snl_fei_LinearSystem_General.cpp:321
snl_fei::LinearSystem_General::eqnIsEssentialBC
bool eqnIsEssentialBC(int globalEqnIndex) const
Definition
snl_fei_LinearSystem_General.cpp:339
snl_fei::LinearSystem_General::getConstrainedEqns
void getConstrainedEqns(std::vector< int > &crEqns) const
Definition
snl_fei_LinearSystem_General.cpp:368
snl_fei::LinearSystem_General::parameters
int parameters(int numParams, const char *const *paramStrings)
Definition
snl_fei_LinearSystem_General.cpp:73
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
snl_fei::LinearSystem_General::loadPenaltyConstraint
int loadPenaltyConstraint(int constraintID, const double *weights, double penaltyValue, double rhsValue)
Definition
snl_fei_LinearSystem_General.cpp:898
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::~LinearSystem_General
virtual ~LinearSystem_General()
Definition
snl_fei_LinearSystem_General.cpp:67
fei
Definition
fei_ArrayUtils.hpp:16
Generated by
1.17.0