Commit 6ae5b9de authored by Simon Spannagel's avatar Simon Spannagel
Browse files

DetectorField: don't be unneccessarily restrictive

parent be90bc8a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ void Detector::set_model(std::shared_ptr<DetectorModel> model) {
    model_ = std::move(model);

    // Initialize the detector fields with the model:
    electric_field_.set_model(model_);
    weighting_potential_.set_model(model_);
    doping_profile_.set_model(model_);
    electric_field_.setModel(model_);
    weighting_potential_.setModel(model_);
    doping_profile_.setModel(model_);

    build_transform();
}
+2 −3
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ namespace allpix {
     * scaling or offset parameters.
     */
    template <typename T, size_t N = 3> class DetectorField {
        friend class Detector;

    public:
        /**
@@ -162,13 +161,13 @@ namespace allpix {
                         std::pair<double, double> thickness_domain,
                         FieldType type = FieldType::CUSTOM);

    private:
        /**
         * @brief Set the detector model this field is used for
         * @param model The detector model
         */
        void set_model(const std::shared_ptr<DetectorModel>& model) { model_ = model; }
        void setModel(const std::shared_ptr<DetectorModel>& model) { model_ = model; }

    private:
        /**
         * @brief Helper function to retrieve the return type from a calculated index of the field data vector
         * @param offset The calculated global index to start from