When did a ship's forecastle and sterncastle stop serving a military purpose?
Short answerThey remained useful through the age of sail and faded as distinct fighting structures around the 1860s ironclad transition.
NotesA forecastle or sterncastle remained militarily useful as long as guns and fighting men could dominate the waist from its elevated deck. The change did not arrive at a single point during the age of sail. HMS Warrior provides a practical marker because the ironclad no longer carried those structures in the older form. That places the loss of their distinct military function around the 1860s and the transition to modern iron warships.