19 quadrature_(*(data->mesh)),
20 slave_ac_(data->mh_dh)
25 for(
uint row_dim=0; row_dim<4; row_dim ++)
26 for(
uint col_dim=0; col_dim<4; col_dim ++) {
27 arma::vec row_avg = arma::vec(row_dim+1);
28 row_avg.fill(1.0 / (row_dim+1));
29 arma::vec col_avg = arma::vec(col_dim+1);
30 col_avg.fill(1.0 / (col_dim+1));
31 arma::mat avg = row_avg * col_avg.t();
51 for(
unsigned int i_side=0; i_side < ele_ac.
n_sides(); i_side++ ) {
63 double bc_pressure =
data_->bc_pressure.value(b_ele.
centre(), b_ele);
107 if (master_ac.
dim() > 2)
return;
109 if (isec_list.size() == 0)
return;
115 double m_sigma =
data_->sigma.value( ele_centre, ele);
116 double m_conductivity =
data_->conductivity.value( ele_centre, ele);
117 double m_crossection =
data_->cross_section.value( ele_centre, ele );
119 double master_sigma = 2*m_sigma*m_conductivity *
136 double cs_sqr_avg = 0.0;
137 double isec_sum = 0.0;
139 for(; i < isec_list.size(); ++i) {
143 if (! non_zero)
continue;
148 cs_sqr_avg += cs*cs*isec_measure;
149 isec_sum += isec_measure;
154 if( fabs(isec_sum - ele.
measure()) > 1E-5) {
156 for(
auto & isec : isec_list) {
172 master_sigma = master_sigma * (cs_sqr_avg / isec_sum)
181 if (i < isec_list.size()) {
184 for(; i < isec_list.size(); ++i) {
188 isec_sum += isec_measure;
194 master_sigma = 100 * m_conductivity/ m_crossection / isec_sum;
208 double s = -scale * row_ele.delta * col_ele.delta;
214 for(
uint i=0; i< row_ele.n_dirichlet; i++)
238 arma::vec pressure(n_cols);
239 arma::vec add_velocity(n_rows);
240 double * solution =
data_->lin_sys->get_solution_array();
241 for(
uint icol=0; icol < n_cols; icol++ ) pressure[icol] = solution[col_ele.
dofs[icol]];
244 for(
uint irow=0; irow < n_rows; irow++ ) solution[row_ele.
vel_dofs[irow]] += add_velocity[irow] ;
249 for(
unsigned int i_side=0; i_side < ele_ac.
n_sides(); i_side++ ) {
259 dofs[shift + i_side] = -
dofs[shift + i_side];
260 double bc_pressure =
data_->bc_pressure.value(b_ele.
centre(), b_ele);