title: Protecting element of array?
body: <p>I'm currently trying to optimise a program I've written in C++. It's a finite element method simulation of arbitrary electrostatics systems, using user defined boundary conditions.</p>
  
  <p>It works, but in order to keep the boundary conditions - which can be arbitrary shapes - constant I am rewriting those elements at the start of each loop.</p>
  
  <p>In the interest of - possibly - improving computation time and code conciseness, I'd like to set those elements once and have them protected. All I've managed to find so far is how to initialise an entire const array, not individual protected elements.</p>
  
  <p>Is this possible in C++, or are there any libraries that would allow this to be done?</p>