FEI Package Browser (Single Doxygen Collection)
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
base
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
{
27
class
LinearSystem_FEData
:
public
fei::LinearSystem
{
28
public
:
30
LinearSystem_FEData
(
fei::SharedPtr<FiniteElementData>
& fedata,
31
fei::SharedPtr<fei::MatrixGraph>
& matrixGraph);
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
54
fei::SharedPtr<FiniteElementData>
getFiniteElementData
() {
return
(
feData_
); }
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;
72
fei::utils::convert_ParameterSet_to_strings
(¶ms, 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
102
MPI_Comm
comm_
;
103
int
localProc_
;
104
int
numProcs_
;
105
fei::SharedPtr<fei::Matrix>
matrix_
;
106
fei::SharedPtr<fei::Vector>
soln_
;
107
fei::SharedPtr<fei::Vector>
rhs_
;
108
fei::SharedPtr<FiniteElementData>
feData_
;
109
Lookup
*
lookup_
;
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_
Lookup
Definition
fei_Lookup.hpp:40
fei::DirichletBCManager
Definition
fei_DirichletBCManager.hpp:25
fei::LinearSystem
Definition
fei_LinearSystem.hpp:26
fei::ParameterSet
Definition
fei_ParameterSet.hpp:46
fei::SharedPtr
Definition
fei_SharedPtr.hpp:65
fei::Vector
Definition
fei_Vector.hpp:57
snl_fei::LinearSystem_FEData::rhs_
fei::SharedPtr< fei::Vector > rhs_
Definition
snl_fei_LinearSystem_FEData.hpp:107
snl_fei::LinearSystem_FEData::getConstrainedEqns
void getConstrainedEqns(std::vector< int > &crEqns) const
Definition
snl_fei_LinearSystem_FEData.cpp:66
snl_fei::LinearSystem_FEData::loadComplete
int loadComplete(bool applyBCs=true, bool globalAssemble=true)
Definition
snl_fei_LinearSystem_FEData.cpp:72
snl_fei::LinearSystem_FEData::attributeNames_
std::vector< char * > attributeNames_
Definition
snl_fei_LinearSystem_FEData.hpp:111
snl_fei::LinearSystem_FEData::parameters
int parameters(int numParams, const char *const *paramStrings)
Definition
snl_fei_LinearSystem_FEData.hpp:62
snl_fei::LinearSystem_FEData::loadPenaltyConstraint
int loadPenaltyConstraint(int constraintID, const double *weights, double penaltyValue, double rhsValue)
Definition
snl_fei_LinearSystem_FEData.cpp:173
snl_fei::LinearSystem_FEData::comm_
MPI_Comm comm_
Definition
snl_fei_LinearSystem_FEData.hpp:102
snl_fei::LinearSystem_FEData::setLookup
void setLookup(Lookup *lookup)
Definition
snl_fei_LinearSystem_FEData.hpp:86
snl_fei::LinearSystem_FEData::lookup_
Lookup * lookup_
Definition
snl_fei_LinearSystem_FEData.hpp:109
snl_fei::LinearSystem_FEData::setBCValuesOnVector
int setBCValuesOnVector(fei::Vector *vector)
Definition
snl_fei_LinearSystem_FEData.cpp:106
snl_fei::LinearSystem_FEData::~LinearSystem_FEData
virtual ~LinearSystem_FEData()
Definition
snl_fei_LinearSystem_FEData.cpp:47
snl_fei::LinearSystem_FEData::soln_
fei::SharedPtr< fei::Vector > soln_
Definition
snl_fei_LinearSystem_FEData.hpp:106
snl_fei::LinearSystem_FEData::numProcs_
int numProcs_
Definition
snl_fei_LinearSystem_FEData.hpp:104
snl_fei::LinearSystem_FEData::eqnIsEssentialBC
bool eqnIsEssentialBC(int globalEqnIndex) const
Definition
snl_fei_LinearSystem_FEData.cpp:52
snl_fei::LinearSystem_FEData::attributes_
std::vector< void * > attributes_
Definition
snl_fei_LinearSystem_FEData.hpp:112
snl_fei::LinearSystem_FEData::LinearSystem_FEData
LinearSystem_FEData(fei::SharedPtr< FiniteElementData > &fedata, fei::SharedPtr< fei::MatrixGraph > &matrixGraph)
Definition
snl_fei_LinearSystem_FEData.cpp:33
snl_fei::LinearSystem_FEData::matrix_
fei::SharedPtr< fei::Matrix > matrix_
Definition
snl_fei_LinearSystem_FEData.hpp:105
snl_fei::LinearSystem_FEData::loadLagrangeConstraint
int loadLagrangeConstraint(int constraintID, const double *weights, double rhsValue)
Definition
snl_fei_LinearSystem_FEData.cpp:164
snl_fei::LinearSystem_FEData::parameters
int parameters(const fei::ParameterSet ¶ms)
Definition
snl_fei_LinearSystem_FEData.hpp:67
snl_fei::LinearSystem_FEData::getFiniteElementData
fei::SharedPtr< FiniteElementData > getFiniteElementData()
Definition
snl_fei_LinearSystem_FEData.hpp:54
snl_fei::LinearSystem_FEData::localProc_
int localProc_
Definition
snl_fei_LinearSystem_FEData.hpp:103
snl_fei::LinearSystem_FEData::implementBCs
int implementBCs(bool applyBCs)
Definition
snl_fei_LinearSystem_FEData.cpp:112
snl_fei::LinearSystem_FEData::getEssentialBCs
void getEssentialBCs(std::vector< int > &bcEqns, std::vector< double > &bcVals) const
Definition
snl_fei_LinearSystem_FEData.cpp:59
snl_fei::LinearSystem_FEData::feData_
fei::SharedPtr< FiniteElementData > feData_
Definition
snl_fei_LinearSystem_FEData.hpp:108
fei_LinearSystem.hpp
fei_Matrix.hpp
fei_Vector.hpp
fei_fwd.hpp
fei_macros.hpp
fei_mpi.h
MPI_Comm
#define MPI_Comm
Definition
fei_mpi.h:56
fei_utils.hpp
fei::utils::convert_ParameterSet_to_strings
void convert_ParameterSet_to_strings(const fei::ParameterSet *paramset, std::vector< std::string > ¶mStrings)
Definition
fei_utils.cpp:270
fei::utils::strings_to_char_ptrs
void strings_to_char_ptrs(std::vector< std::string > &stdstrings, int &numStrings, const char **&charPtrs)
Definition
fei_utils.cpp:178
fei
Definition
fei_ArrayUtils.hpp:16
snl_fei
Definition
fei_MatrixGraph_Impl2.cpp:46
Generated by
1.17.0