47 #include <Xyce_config.h>
54 #include "N_LAS_Vector.h"
55 #include "N_LAS_Matrix.h"
56 #include "Epetra_MapColoring.h"
72 const std::vector<int>& vnodeGIDVec,
73 Linear::Vector* cloneVector,
74 double scaledEndValue,
76 node_list_type_(NLT_VoltageNodes),
77 vnodeGIDVec_(vnodeGIDVec),
79 scaled_end_value_(scaledEndValue),
80 residualConductance_(resCond)
82 tmp_vector_ptr_ =
new Linear::Vector(*cloneVector);
94 GStepping(
const Teuchos::RCP<Epetra_MapColoring>& color_map,
95 Linear::Vector* cloneVector,
96 double scaledEndValue,
98 node_list_type_(NLT_AllVoltageUnknowns),
99 scaled_end_value_(scaledEndValue),
100 residualConductance_(resCond)
102 color_map_ = color_map;
103 tmp_vector_ptr_ =
new Linear::Vector(*cloneVector);
143 Linear::Vector * residualVector)
147 std::vector<int>::const_iterator i =
vnodeGIDVec_.begin();
148 std::vector<int>::const_iterator stop =
vnodeGIDVec_.end();
149 for ( ; i < stop; ++i)
152 (
const_cast<Linear::Vector*
>(solution))->getElementByGlobalIndex(*i);
154 residualVector->sumElementByGlobalIndex(*i, value);
163 (*residualVector)[i] +=
conductance_ * (
const_cast<Linear::Vector&
>(*solution))[i];
184 std::vector<int>::const_iterator i =
vnodeGIDVec_.begin();
185 std::vector<int>::const_iterator stop =
vnodeGIDVec_.end();
186 for ( ; i < stop; ++i)
void setProgressVariable(double time_step_size)
Set the progress variable (time step size for pseudo transient).
Pure virtual class to augment a linear system.
double scaled_end_value_
low end of the exponential term.
const T & value(const ParameterBase &entity, const Descriptor &descriptor)
Returns the value of the parameter for the entity.
GStepping(const std::vector< int > &vnodeGIDVec, Xyce::Linear::Vector *cloneVector, double endValue, double residCond=0)
Ctor for the voltage nodes as a GID list.
void augmentResidual(const Xyce::Linear::Vector *solution, Xyce::Linear::Vector *residual_vector)
Augments the Residual.
double conductance_
Conductance.
void augmentJacobian(Xyce::Linear::Matrix *jacobian)
Augments the Jacobian.
double residualConductance_
residual value of the conductance. Should almost always be zero
const std::vector< int > vnodeGIDVec_
List of voltage node GIDs.
NodeListType node_list_type_
Type of list we are using.
Teuchos::RCP< Epetra_MapColoring > color_map_
Color 0 are the voltage unknowns.
Xyce::Linear::Vector * tmp_vector_ptr_
Temporary vector used to store diagonal.