49 namespace AbstractLinAlgPack {
64 this->initialize(dim,fact_struc,fact_nonzeros);
74 const char msg_err[] =
"DirectSparseSolverImp::BasisMatrixImp::initialize(...): Error!";
81 fact_nonzeros_ = fact_nonzeros;
82 vec_space_.initialize(dim);
90 vec_space_.initialize(0);
96 return fact_nonzeros_;
123 MatrixNonsing::mat_mns_mut_ptr_t
126 namespace rcp = MemMngPack;
129 bm->
initialize(dim_,fact_struc_,fact_nonzeros_);
155 namespace mmp = MemMngPack;
158 const char msg_err[] =
"DirectSparseSolverImp::analyze_and_factor(...): Error!";
171 bool alloc_new_fact_struc =
false;
172 if( bm_fact_struc.total_count() == 1 )
173 fact_struc = bm_fact_struc;
174 else if( this_fact_struc.total_count() == 1 )
175 fact_struc = this_fact_struc;
176 else if( bm_fact_struc.get() == this_fact_struc.get() && bm_fact_struc.total_count() == 2 )
177 fact_struc = bm_fact_struc;
179 alloc_new_fact_struc =
true;
180 if( alloc_new_fact_struc )
186 fact_nonzeros = bm_fact_nonzeros;
191 A,fact_struc.get(),fact_nonzeros.
get(),row_perm,col_perm,rank,
out
194 basis_matrix_imp.
initialize(*rank,fact_struc,fact_nonzeros);
207 namespace mmp = MemMngPack;
210 const char msg_err[] =
"DirectSparseSolverImp::analyze_and_factor(...): Error!";
221 fact_struc_in.get() == NULL && this_fact_struc.get() == NULL
225 if( fact_struc_in.get() != NULL )
226 fact_struc = fact_struc_in;
228 fact_struc = this_fact_struc;
233 fact_nonzeros = bm_fact_nonzeros;
239 basis_matrix_imp.
initialize(rank_,fact_struc,fact_nonzeros);
BasisMatrixImp()
Default initializers to uninitialized.
const BasisMatrix::fact_struc_ptr_t & get_fact_struc() const
Abstract class for objects that represent the factorized matrix and can be used to solve for differen...
virtual const fact_struc_ptr_t & get_fact_struc() const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual const fact_nonzeros_ptr_t & get_fact_nonzeros() const
Return a reference to a smart pointer to the object that represents the factorization nonzeros...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual const Teuchos::RCP< FactorizationStructure > create_fact_struc() const =0
Create a new, uninitialized FactorizationStructure object.
virtual const Teuchos::RCP< FactorizationNonzeros > create_fact_nonzeros() const =0
Create a new, uninitialized FactorizationNonzeros object.
void factor(const AbstractLinAlgPack::MatrixConvertToSparse &A, BasisMatrix *basis_matrix, const BasisMatrix::fact_struc_ptr_t &fact_struc, std::ostream *out)
RTOp_index_type size_type
Abstract interface for objects that represent a space for mutable coordinate vectors.
virtual void imp_analyze_and_factor(const AbstractLinAlgPack::MatrixConvertToSparse &A, FactorizationStructure *fact_struc, FactorizationNonzeros *fact_nonzeros, DenseLinAlgPack::IVector *row_perm, DenseLinAlgPack::IVector *col_perm, size_type *rank, std::ostream *out=NULL)=0
Called to implement the analyze_and_factor() without having to worry about memory mangagment details...
T_To & dyn_cast(T_From &from)
Mix-in interface for extracing explicit elements from a sparse matrix in one of several Fortran compa...
virtual void initialize(size_type dim, const fact_struc_ptr_t &fact_struc, const fact_nonzeros_ptr_t &fact_nonzeros)
Initialize given initialized factorization structure and factorization nonzeros objects.
Teuchos::RCP< FactorizationStructure > fact_struc_ptr_t
void analyze_and_factor(const AbstractLinAlgPack::MatrixConvertToSparse &A, DenseLinAlgPack::IVector *row_perm, DenseLinAlgPack::IVector *col_perm, size_type *rank, BasisMatrix *basis_matrix, std::ostream *out)
void set_uninitialized()
Make uninitialized.
FactorizationStructure * fact_struc
Implementation node subclass that combines factorization structure and factorization nonzeros into a ...
virtual void imp_factor(const AbstractLinAlgPack::MatrixConvertToSparse &A, const FactorizationStructure &fact_struc, FactorizationNonzeros *fact_nonzeros, std::ostream *out=NULL)=0
Called to implement the analyze_and_factor() without having to worry about memory mangagment details...
const VectorSpace & space_rows() const
const VectorSpace & space_cols() const
mat_mns_mut_ptr_t clone_mns()