18 #ifndef FIELD_ADD_POTENTIAL_IMPL_HH_ 19 #define FIELD_ADD_POTENTIAL_IMPL_HH_ 24 template <
int spacedim,
class Value>
29 grad_=potential.subvec(0,spacedim-1);
38 template <
int spacedim,
class Value>
44 for(
unsigned int row=0; row < this->
value_.n_rows(); row++)
45 for(
unsigned int col=0; col < this->
value_.n_cols(); col++)
46 this->
value_(row,col) += potential;
56 template <
int spacedim,
class Value>
62 for(
unsigned int i=0; i< point_list.size(); i++) {
64 Value envelope(value_list[i]);
66 for(
unsigned int row=0; row < this->
value_.n_rows(); row++)
67 for(
unsigned int col=0; col < this->
value_.n_cols(); col++)
68 envelope(row,col) += potential;
72 template <
int spacedim,
class Value>
80 template <
int spacedim,
class Value>
bool set_time(const TimeStep &time) override
arma::vec::fixed< spacedim > grad_
Potential gradient.
Helper struct stores data for initizalize descentants of FieldAlgorithmBase.
FieldAddPotential(const arma::vec::fixed< spacedim+1 > &potential_grad, const Input::AbstractRecord &rec, unsigned int n_comp=0)
Value::return_type r_value_
double zero_level_
Potential constant term.
virtual ~FieldAddPotential()
Value value_
Last value, prevents passing large values (vectors) by value.
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
#define OLD_ASSERT_EQUAL(a, b)
Class for representation SI units of Fields.
std::shared_ptr< FieldAlgorithmBase< spacedim, Value > > inner_field_
Field to which we add linear potential.
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm)
Representation of one time step..
Space< spacedim >::Point Point