ExcMessage ("Inhomogeneous constraint cannot be condensed "
"without any matrix specified."));
- const typename VectorType::value_type old_value = vec_ghosted(constraint_line->line);
+ const typename VectorType::value_type old_value = vec_ghosted(constraint_line->index);
for (size_type q=0; q!=constraint_line->entries.size(); ++q)
if (vec.in_local_range(constraint_line->entries[q].first) == true)
vec(constraint_line->entries[q].first)
for (std::vector<ConstraintLine>::const_iterator
constraint_line = lines.begin();
constraint_line!=lines.end(); ++constraint_line)
- if (vec.in_local_range(constraint_line->line) == true)
- vec(constraint_line->line) = 0.;
+ if (vec.in_local_range(constraint_line->index) == true)
+ vec(constraint_line->index) = 0.;
vec.compress(VectorOperation::insert);
}
numbers::invalid_size_type);
for (size_type c=0; c<lines.size(); ++c)
- distribute[lines[c].line] = c;
+ distribute[lines[c].index] = c;
const size_type n_rows = sparsity.n_rows();
for (size_type row=0; row<n_rows; ++row)
vec(lines[distribute[row]].entries[q].first)
+= (vec(row) * lines[distribute[row]].entries[q].second);
- vec(lines[distribute[row]].line) = 0.;
+ vec(lines[distribute[row]].index) = 0.;
}
}
}
numbers::invalid_size_type);
for (size_type c=0; c<lines.size(); ++c)
- distribute[lines[c].line] = c;
+ distribute[lines[c].index] = c;
const size_type n_rows = sparsity.n_rows();
for (size_type row=0; row<n_rows; ++row)
vec(lines[distribute[row]].entries[q].first)
+= (vec(row) * lines[distribute[row]].entries[q].second);
- vec(lines[distribute[row]].line) = 0.;
+ vec(lines[distribute[row]].index) = 0.;
}
}
}
// above. therefore, copy the content which is cheap
std::vector<size_type> constrained_lines(lines.size());
for (unsigned int i=0; i<lines.size(); ++i)
- constrained_lines[i] = lines[i].line;
+ constrained_lines[i] = lines[i].index;
internal::ConstraintMatrix::set_zero_all(constrained_lines, vec);
}
typedef std::vector<ConstraintLine>::const_iterator constraint_iterator;
for (constraint_iterator it = lines.begin();
it != lines.end(); ++it)
- if (vec_owned_elements.is_element(it->line))
+ if (vec_owned_elements.is_element(it->index))
for (unsigned int i=0; i<it->entries.size(); ++i)
if (!vec_owned_elements.is_element(it->entries[i].first))
needed_elements.add_index(it->entries[i].first);
for (constraint_iterator it = lines.begin();
it != lines.end(); ++it)
- if (vec_owned_elements.is_element(it->line))
+ if (vec_owned_elements.is_element(it->index))
{
typename VectorType::value_type
new_value = it->inhomogeneity;
ghosted_vector, it->entries[i].first)) *
it->entries[i].second);
AssertIsFinite(new_value);
- internal::ElementAccess<VectorType>::set(new_value, it->line, vec);
+ internal::ElementAccess<VectorType>::set(new_value, it->index, vec);
}
// now compress to communicate the entries that we added to
for (; next_constraint != lines.end(); ++next_constraint)
{
// fill entry in line
- // next_constraint.line by adding the
+ // next_constraint.index by adding the
// different contributions
typename VectorType::value_type
new_value = next_constraint->inhomogeneity;
vec, next_constraint->entries[i].first))*
next_constraint->entries[i].second);
AssertIsFinite(new_value);
- internal::ElementAccess<VectorType>::set(new_value, next_constraint->line,
+ internal::ElementAccess<VectorType>::set(new_value, next_constraint->index,
vec);
}
}
bool
ConstraintMatrix::ConstraintLine::operator < (const ConstraintLine &a) const
{
- return line < a.line;
+ return index < a.index;
}
bool
ConstraintMatrix::ConstraintLine::operator == (const ConstraintLine &a) const
{
- return line == a.line;
+ return index == a.index;
}
std::size_t
ConstraintMatrix::ConstraintLine::memory_consumption () const
{
- return (MemoryConsumption::memory_consumption (line) +
+ return (MemoryConsumption::memory_consumption (index) +
MemoryConsumption::memory_consumption (entries) +
MemoryConsumption::memory_consumption (inhomogeneity));
}
Assert (is_constrained(line), ExcLineInexistant(line));
ConstraintLine *line_ptr = &lines[lines_cache[calculate_line_index(line)]];
- Assert (line_ptr->line == line, ExcInternalError());
+ Assert (line_ptr->index == line, ExcInternalError());
// if in debug mode, check whether an entry for this column already
// exists and if its the same as the one entered at present
if (constraints.n_constraints() == 0)
return;
- Assert (filter.size() > constraints.lines.back().line,
+ Assert (filter.size() > constraints.lines.back().index,
ExcMessage ("Filter needs to be larger than constraint matrix size."));
for (std::vector<ConstraintLine>::const_iterator line=constraints.lines.begin();
line!=constraints.lines.end(); ++line)
- if (filter.is_element(line->line))
+ if (filter.is_element(line->index))
{
- const size_type row = filter.index_within_set (line->line);
+ const size_type row = filter.index_within_set (line->index);
add_line (row);
set_inhomogeneity (row, line->inhomogeneity);
for (size_type i=0; i<line->entries.size(); ++i)
size_type counter = 0;
for (std::vector<ConstraintLine>::const_iterator line=lines.begin();
line!=lines.end(); ++line, ++counter)
- new_lines[calculate_line_index(line->line)] = counter;
+ new_lines[calculate_line_index(line->index)] = counter;
std::swap (lines_cache, new_lines);
}
// in debug mode: check whether we really set the pointers correctly.
for (size_type i=0; i<lines_cache.size(); ++i)
if (lines_cache[i] != numbers::invalid_size_type)
- Assert (i == calculate_line_index(lines[lines_cache[i]].line),
+ Assert (i == calculate_line_index(lines[lines_cache[i]].index),
ExcInternalError());
// first, strip zero entries, as we have to do that only once
const size_type dof_index = line->entries[entry].first;
const double weight = line->entries[entry].second;
- Assert (dof_index != line->line,
+ Assert (dof_index != line->index,
ExcMessage ("Cycle in constraints detected!"));
const ConstraintLine *constrained_line =
&lines[lines_cache[calculate_line_index(dof_index)]];
- Assert (constrained_line->line == dof_index,
+ Assert (constrained_line->index == dof_index,
ExcInternalError());
// now we have to replace an entry by its expansion. we do
// make sure that entry->first is not the index of a line itself
const bool is_circle = is_constrained(entry->first);
Assert (is_circle == false,
- ExcDoFConstrainedToConstrainedDoF(line->line, entry->first));
+ ExcDoFConstrainedToConstrainedDoF(line->index, entry->first));
}
#endif
for (std::vector<ConstraintLine>::const_iterator line = lines.begin();
line != lines.end(); ++line)
{
- size_type local_line_no = calculate_line_index(line->line);
+ size_type local_line_no = calculate_line_index(line->index);
if (local_line_no >= lines_cache.size())
lines_cache.resize(local_line_no+1, numbers::invalid_size_type);
lines_cache[local_line_no] = index++;
for (std::vector<ConstraintLine>::const_iterator line = other_constraints.lines.begin();
line != other_constraints.lines.end(); ++line)
{
- const size_type local_line_no = calculate_line_index(line->line);
+ const size_type local_line_no = calculate_line_index(line->index);
if (local_line_no >= lines_cache.size())
{
lines_cache.resize(local_line_no+1, numbers::invalid_size_type);
{
case no_conflicts_allowed:
AssertThrow (false,
- ExcDoFIsConstrainedFromBothObjects (line->line));
+ ExcDoFIsConstrainedFromBothObjects (line->index));
break;
case left_object_wins:
// check that we set the pointers correctly
for (size_type i=0; i<lines_cache.size(); ++i)
if (lines_cache[i] != numbers::invalid_size_type)
- Assert (i == calculate_line_index(lines[lines_cache[i]].line),
+ Assert (i == calculate_line_index(lines[lines_cache[i]].index),
ExcInternalError());
}
for (std::vector<ConstraintLine>::iterator i = lines.begin();
i != lines.end(); ++i)
{
- i->line += offset;
+ i->index += offset;
for (ConstraintLine::Entries::iterator
j = i->entries.begin();
j != i->entries.end(); ++j)
// are still linked correctly
for (size_type i=0; i<lines_cache.size(); ++i)
Assert(lines_cache[i] == numbers::invalid_size_type ||
- calculate_line_index(lines[lines_cache[i]].line) == i,
+ calculate_line_index(lines[lines_cache[i]].index) == i,
ExcInternalError());
#endif
}
numbers::invalid_size_type);
for (size_type c=0; c<lines.size(); ++c)
- distribute[lines[c].line] = c;
+ distribute[lines[c].index] = c;
const size_type n_rows = sparsity.n_rows();
for (size_type row=0; row<n_rows; ++row)
numbers::invalid_size_type);
for (size_type c=0; c<lines.size(); ++c)
- distribute[lines[c].line] = c;
+ distribute[lines[c].index] = c;
const size_type n_rows = sparsity.n_rows();
for (size_type row=0; row<n_rows; ++row)
numbers::invalid_size_type);
for (size_type c=0; c<lines.size(); ++c)
- distribute[lines[c].line] = c;
+ distribute[lines[c].index] = c;
const size_type n_rows = sparsity.n_rows();
for (size_type row=0; row<n_rows; ++row)
numbers::invalid_size_type);
for (size_type c=0; c<lines.size(); ++c)
- distribute[lines[c].line] = static_cast<signed int>(c);
+ distribute[lines[c].index] = static_cast<signed int>(c);
const size_type n_rows = sparsity.n_rows();
for (size_type row=0; row<n_rows; ++row)
return false;
const ConstraintLine &p = lines[lines_cache[calculate_line_index(index)]];
- Assert (p.line == index, ExcInternalError());
+ Assert (p.index == index, ExcInternalError());
// return if an entry for this line was found and if it has only one
// entry equal to 1.0
if (is_constrained(index1) == true)
{
const ConstraintLine &p = lines[lines_cache[calculate_line_index(index1)]];
- Assert (p.line == index1, ExcInternalError());
+ Assert (p.index == index1, ExcInternalError());
// return if an entry for this line was found and if it has only one
// entry equal to 1.0 and that one is index2
else if (is_constrained(index2) == true)
{
const ConstraintLine &p = lines[lines_cache[calculate_line_index(index2)]];
- Assert (p.line == index2, ExcInternalError());
+ Assert (p.index == index2, ExcInternalError());
// return if an entry for this line was found and if it has only one
// entry equal to 1.0 and that one is index1
if (lines[i].entries.size() > 0)
{
for (size_type j=0; j<lines[i].entries.size(); ++j)
- out << " " << lines[i].line
+ out << " " << lines[i].index
<< " " << lines[i].entries[j].first
<< ": " << lines[i].entries[j].second << "\n";
// print out inhomogeneity.
if (lines[i].inhomogeneity != 0)
- out << " " << lines[i].line
+ out << " " << lines[i].index
<< ": " << lines[i].inhomogeneity << "\n";
}
else
// combination of other dofs
{
if (lines[i].inhomogeneity != 0)
- out << " " << lines[i].line
+ out << " " << lines[i].index
<< " = " << lines[i].inhomogeneity
<< "\n";
else
- out << " " << lines[i].line << " = 0\n";
+ out << " " << lines[i].index << " = 0\n";
}
}
// same concept as in the previous function
if (lines[i].entries.size() > 0)
for (size_type j=0; j<lines[i].entries.size(); ++j)
- out << " " << lines[i].line << "->" << lines[i].entries[j].first
+ out << " " << lines[i].index << "->" << lines[i].entries[j].first
<< "; // weight: "
<< lines[i].entries[j].second
<< "\n";
else
- out << " " << lines[i].line << "\n";
+ out << " " << lines[i].index << "\n";
}
out << "}" << std::endl;
}