Magnetic dipolar ordering on geometrically frustrated brick-shaped lattices