Commit aaa4a55d authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[FIX] changed const position

parent f9ae864d
......@@ -47,6 +47,9 @@ if __name__ == '__main__':
ps.addProperty("torque", "walberla::mesa_pd::Vec3", defValue="real_t(0)", syncMode="NEVER")
ps.addProperty("oldTorque", "walberla::mesa_pd::Vec3", defValue="real_t(0)", syncMode="MIGRATION")
ps.addInclude("blockforest/BlockForest.h")
ps.addProperty("currentBlock", "blockforest::Block*", defValue="nullptr", syncMode="NEVER")
ps.addProperty("type", "uint_t", defValue="0", syncMode="COPY")
ps.addProperty("flags", "walberla::mesa_pd::data::particle_flags::FlagT", defValue="", syncMode="COPY")
......
......@@ -50,9 +50,9 @@ public:
virtual ~ParticleAccessor() = default;
{%- for prop in properties %}
const {{prop.type}}& get{{prop.name | capFirst}}(const size_t p_idx) const {return ps_->get{{prop.name | capFirst}}(p_idx);}
{{prop.type}} const & get{{prop.name | capFirst}}(const size_t p_idx) const {return ps_->get{{prop.name | capFirst}}(p_idx);}
{{prop.type}}& get{{prop.name | capFirst}}Ref(const size_t p_idx) {return ps_->get{{prop.name | capFirst}}Ref(p_idx);}
void set{{prop.name | capFirst}}(const size_t p_idx, const {{prop.type}}& v) { ps_->set{{prop.name | capFirst}}(p_idx, v);}
void set{{prop.name | capFirst}}(const size_t p_idx, {{prop.type}} const & v) { ps_->set{{prop.name | capFirst}}(p_idx, v);}
{% endfor %}
id_t getInvalidUid() const {return UniqueID<data::Particle>::invalidID();}
......@@ -101,8 +101,8 @@ public:
virtual ~SingleParticleAccessor() = default;
{%- for prop in properties %}
const {{prop.type}}& get{{prop.name | capFirst}}(const size_t /*p_idx*/) const {return {{prop.name}}_;}
void set{{prop.name | capFirst}}(const size_t /*p_idx*/, const {{prop.type}}& v) { {{prop.name}}_ = v;}
{{prop.type}} const & get{{prop.name | capFirst}}(const size_t /*p_idx*/) const {return {{prop.name}}_;}
void set{{prop.name | capFirst}}(const size_t /*p_idx*/, {{prop.type}} const & v) { {{prop.name}}_ = v;}
{{prop.type}}& get{{prop.name | capFirst}}Ref(const size_t /*p_idx*/) {return {{prop.name}}_;}
{% endfor %}
......
......@@ -76,9 +76,9 @@ public:
{%- endfor %}
{% for prop in properties %}
const {{prop.name}}_type& get{{prop.name | capFirst}}() const {return storage_.get{{prop.name | capFirst}}(i_);}
{{prop.name}}_type const & get{{prop.name | capFirst}}() const {return storage_.get{{prop.name | capFirst}}(i_);}
{{prop.name}}_type& get{{prop.name | capFirst}}Ref() {return storage_.get{{prop.name | capFirst}}Ref(i_);}
void set{{prop.name | capFirst}}(const {{prop.name}}_type& v) { storage_.set{{prop.name | capFirst}}(i_, v);}
void set{{prop.name | capFirst}}({{prop.name}}_type const & v) { storage_.set{{prop.name | capFirst}}(i_, v);}
{% endfor %}
size_t getIdx() const {return i_;}
......@@ -144,9 +144,9 @@ public:
{%- endfor %}
{% for prop in properties %}
const {{prop.name}}_type& get{{prop.name | capFirst}}(const size_t idx) const {return {{prop.name}}_[idx];}
{{prop.name}}_type const & get{{prop.name | capFirst}}(const size_t idx) const {return {{prop.name}}_[idx];}
{{prop.name}}_type& get{{prop.name | capFirst}}Ref(const size_t idx) {return {{prop.name}}_[idx];}
void set{{prop.name | capFirst}}(const size_t idx, const {{prop.name}}_type& v) { {{prop.name}}_[idx] = v; }
void set{{prop.name | capFirst}}(const size_t idx, {{prop.name}}_type const & v) { {{prop.name}}_[idx] = v; }
{% endfor %}
/**
......@@ -567,7 +567,7 @@ public:
using return_type = {{prop.type}};
{{prop.type}}& operator()(data::Particle& p) const {return p.get{{prop.name | capFirst}}Ref();}
{{prop.type}}& operator()(data::Particle&& p) const {return p.get{{prop.name | capFirst}}Ref();}
const {{prop.type}}& operator()(const data::Particle& p) const {return p.get{{prop.name | capFirst}}();}
{{prop.type}} const & operator()(const data::Particle& p) const {return p.get{{prop.name | capFirst}}();}
};
{%- endfor %}
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment