Modeling the optical properties of excitons in linear and tubular J-aggregates