ExportVariable::ExportVariable( const String& _name, const Matrix& _data, ExportType _type, ExportStruct _dataStruct, BooleanType _callItByValue, const String& _prefix ) { assignNode(new ExportVariableInternal(_name, matrixPtr(new Matrix( _data )), _type, _dataStruct, _callItByValue, _prefix)); }
ExportVariable::ExportVariable( const String& _name, uint _nRows, uint _nCols, ExportType _type, ExportStruct _dataStruct, BooleanType _callItByValue, const String& _prefix ) { Matrix m(_nRows, _nCols); m.setAll( undefinedEntry ); assignNode(new ExportVariableInternal(_name, matrixPtr(new Matrix( m )), _type, _dataStruct, _callItByValue, _prefix)); }
//template< typename Expr_convection, typename Expr_bc > void PreconditionerAS<space_type,coef_space_type>::update( sparse_matrix_ptrtype Pm, // A + g M sparse_matrix_ptrtype L, // e_r * grad grad sparse_matrix_ptrtype hatL, // 1/mu * grad grad sparse_matrix_ptrtype Q // e_r * id id ) { tic(); if(this->type() == AS) { // A = Pm backend()->diag(Pm,M_diagPm); M_diagPm->close(); /* * hat(L) = 1/mu * grad grad = 1/(mu*e_r) * L * bar(L) = diag( hat(L), hat(L), hat(L) ) * bar(Q) = diag( er*Q, er*Q, er*Q ) with Q = mass matrix on Qh3 * blockms.11.1 <=> bar(L) + g*bar(Q) y = s = Pt*r * blockms.11.2 <=> L z = t = trans(C)*r */ // Operator hat(L) + g Q sparse_matrix_ptrtype Lgq = hatL; Lgq->addMatrix(M_g,Q); M_lgqOp = op( Lgq, "blockms.11.1"); // Operator L M_lOp = op(L,"blockms.11.2"); } else if(this->type() == SIMPLE) { auto uu = M_Vh->element("uu"); auto f22 = form2(M_Vh, M_Vh); f22 = integrate(_range=elements(M_Vh->mesh()), _expr=inner(id(uu),idt(uu))); SimpleOp = op( f22.matrixPtr(),"blockms.11.1"); } toc( "PreconditionerAS::update", FLAGS_v > 0 ); }
ExportVariable::ExportVariable( const double _data ) { assignNode(new ExportVariableInternal("var", matrixPtr(new Matrix( _data )))); }