8 #ifndef FIELD_CONSTANT_IMPL_HH_
9 #define FIELD_CONSTANT_IMPL_HH_
19 template <
int spacedim,
class Value>
24 template <
int spacedim,
class Value>
33 "Value of the constant field.\n"
34 "For vector values, you can use scalar value to enter constant vector.\n"
35 "For square NxN-matrix values, you can use:\n"
36 "* vector of size N to enter diagonal matrix\n"
37 "* vector of size (N+1)*N/2 to enter symmetric matrix (upper triangle, row by row)\n"
38 "* scalar to enter multiple of the unit matrix." )
46 template <
int spacedim,
class Value>
52 template <
int spacedim,
class Value>
61 template <
int spacedim,
class Value>
63 this->value_.init_from_input( rec.
val<
typename Value::AccessType>(
"value") );
71 template <
int spacedim,
class Value>
74 return this->r_value_;
82 template <
int spacedim,
class Value>
88 for(
unsigned int i=0; i< point_list.size(); i++) {
89 ASSERT( Value(value_list[i]).n_rows()==this->value_.n_rows(),
90 "value_list[%d] has wrong number of rows: %d; should match number of components: %d\n",
91 i, Value(value_list[i]).n_rows(),this->value_.n_rows());
94 value_list[i]=this->r_value_;
100 template <
int spacedim,
class Value>
FieldConstant< spacedim, Value > & set_value(const typename Value::return_type &val)
virtual void init_from_input(const Input::Record &rec)
static Input::Type::Record get_input_type(Input::Type::AbstractRecord &a_type, const typename Value::ElementInputType *eit)
virtual void value_list(const std::vector< Point > &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list)
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm)
#define ASSERT_EQUAL(a, b)
FieldConstant(unsigned int n_comp=0)
Space< spacedim >::Point Point