OGS
|
Global vector based on Eigen vector.
Definition at line 24 of file EigenVector.h.
#include <EigenVector.h>
Public Types | |
using | RawVectorType = Eigen::VectorXd |
using | IndexType = Eigen::SparseMatrix<double>::Index |
Public Member Functions | |
EigenVector ()=default | |
EigenVector (IndexType length) | |
IndexType | size () const |
return a vector length | |
IndexType | getRangeEnd () const |
return an end index of the active data range | |
void | setZero () |
double const & | operator[] (IndexType rowId) const |
access entry | |
double & | operator[] (IndexType rowId) |
double | get (IndexType rowId) const |
get entry | |
std::vector< double > | get (std::vector< IndexType > const &indices) const |
get entries | |
void | set (IndexType rowId, double v) |
set entry | |
void | add (IndexType rowId, double v) |
add entry | |
template<class T_SUBVEC > | |
void | set (const std::vector< IndexType > &pos, const T_SUBVEC &sub_vec) |
set entries | |
template<class T_SUBVEC > | |
void | add (const std::vector< IndexType > &pos, const T_SUBVEC &sub_vec) |
add entries | |
void | copyValues (std::vector< double > &u) const |
void | write (const std::string &filename) const |
write this vector to a file for debugging | |
RawVectorType & | getRawVector () |
return a raw Eigen vector object | |
const RawVectorType & | getRawVector () const |
return a raw Eigen vector object | |
Static Public Member Functions | |
static constexpr IndexType | getRangeBegin () |
return a start index of the active data range | |
Private Attributes | |
RawVectorType | vec_ |
using MathLib::EigenVector::IndexType = Eigen::SparseMatrix<double>::Index |
Definition at line 32 of file EigenVector.h.
using MathLib::EigenVector::RawVectorType = Eigen::VectorXd |
Definition at line 27 of file EigenVector.h.
|
default |
|
inlineexplicit |
Constructor for initialization of the number of rows
length | number of rows |
Definition at line 39 of file EigenVector.h.
|
inline |
add entries
Definition at line 91 of file EigenVector.h.
References add().
|
inline |
add entry
Definition at line 76 of file EigenVector.h.
References MathLib::v, and vec_.
Referenced by add(), ProcessLib::BoundaryConditionAndSourceTerm::Python::BcAndStLocalAssemblerImpl< BcOrStData, ShapeFunction, LowerOrderShapeFunction, GlobalDim >::assemble(), ProcessLib::HCNonAdvectiveFreeComponentFlowBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::NeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::NormalTractionBoundaryCondition::NormalTractionBoundaryConditionLocalAssembler< ShapeFunctionDisplacement, GlobalDim >::assemble(), ProcessLib::RobinBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::VariableDependentNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::VectorMatrixAssembler::assemble(), ProcessLib::WellboreCompensateNeumannBoundaryConditionLocalAssembler< ShapeFunction, GlobalDim >::assemble(), ProcessLib::ComponentTransport::ComponentTransportLocalAssemblerInterface::assembleReactionEquation(), ProcessLib::VectorMatrixAssembler::assembleWithJacobian(), NumLib::LocalLinearLeastSquaresExtrapolator::extrapolateElement(), ProcessLib::AnchorTerm< GlobalDim >::integrate(), ProcessLib::NodalSourceTerm::integrate(), ProcessLib::VolumetricSourceTermLocalAssembler< ShapeFunction, GlobalDim >::integrate(), and ProcessLib::SmallDeformation::writeMaterialForces().
void MathLib::EigenVector::copyValues | ( | std::vector< double > & | u | ) | const |
Copy local entries to a vector.
u | a vector for the values of local entries. It will be resized to hold the current vector data. |
Definition at line 21 of file EigenVector.cpp.
References size(), MathLib::toVector(), MathLib::u, and vec_.
Referenced by ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::assembleWithJacobianConcreteProcess(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalProcess< DisplacementDim >::assembleWithJacobianConcreteProcess(), and copySolutionVector().
|
inline |
get entry
Definition at line 58 of file EigenVector.h.
References vec_.
Referenced by anonymous_namespace{ParallelVectorMatrixAssembler.cpp}::assembleWithJacobianOneElement(), ProcessLib::SmallDeformationNonlocal::SmallDeformationNonlocalLocalAssembler< ShapeFunction, DisplacementDim >::computeCrackIntegral(), ProcessLib::LocalAssemblerInterface::computeSecondaryVariable(), ProcessLib::PrimaryVariableConstraintDirichletBoundaryCondition::getEssentialBCValues(), NumLib::getNodalValue(), NumLib::getNonGhostNodalValue(), ProcessLib::AnchorTerm< GlobalDim >::integrate(), ProcessLib::TES::TESProcess::postIterationConcreteProcess(), ProcessLib::VectorMatrixAssembler::preAssemble(), ProcessLib::LocalAssemblerInterface::preTimestep(), and ProcessLib::SmallDeformation::writeMaterialForces().
|
inline |
get entries
Definition at line 61 of file EigenVector.h.
References vec_.
|
inlinestaticconstexpr |
return a start index of the active data range
Definition at line 45 of file EigenVector.h.
Referenced by getIndexForComponentInSolutionVector().
|
inline |
return an end index of the active data range
Definition at line 48 of file EigenVector.h.
References size().
Referenced by getIndexForComponentInSolutionVector().
|
inline |
return a raw Eigen vector object
Definition at line 111 of file EigenVector.h.
References vec_.
Referenced by MathLib::applyKnownSolution(), MathLib::EigenLinearSolver::solve(), MathLib::EigenLinearSolver::solve(), and MathLib::EigenLisLinearSolver::solve().
|
inline |
|
inline |
|
inline |
|
inline |
set entries
Definition at line 80 of file EigenVector.h.
References set().
|
inline |
set entry
Definition at line 73 of file EigenVector.h.
References MathLib::v, and vec_.
Referenced by set(), and ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::updateConstraints().
|
inline |
Definition at line 51 of file EigenVector.h.
References vec_.
Referenced by ProcessLib::AssemblyMixin< Process >::assembleWithJacobian(), ProcessLib::ComponentTransport::ComponentTransportProcess::solveReactionEquation(), and ProcessLib::PhaseField::PhaseFieldProcess< DisplacementDim >::updateConstraints().
|
inline |
return a vector length
Definition at line 42 of file EigenVector.h.
References vec_.
Referenced by copyValues(), and getRangeEnd().
void MathLib::EigenVector::write | ( | const std::string & | filename | ) | const |
write this vector to a file for debugging
Definition at line 28 of file EigenVector.cpp.
References vec_.
|
private |
Definition at line 117 of file EigenVector.h.
Referenced by add(), copyValues(), get(), get(), getRawVector(), getRawVector(), operator[](), operator[](), set(), setZero(), size(), and write().