diff --git a/src/model/phase_field/phasefield.cc b/src/model/phase_field/phasefield.cc index f4e7274ab..30bb8005e 100644 --- a/src/model/phase_field/phasefield.cc +++ b/src/model/phase_field/phasefield.cc @@ -1,301 +1,301 @@ /** * @file phasefield.cc * * @author Mohit Pundir * * @date creation: Fri Jun 19 2020 * @date last modification: Fri May 14 2021 * * @brief Implementation of the common part of the phasefield class * * * @section LICENSE * * Copyright (©) 2018-2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "phasefield.hh" #include "phase_field_model.hh" /* -------------------------------------------------------------------------- */ namespace akantu { /* -------------------------------------------------------------------------- */ PhaseField::PhaseField(PhaseFieldModel & model, const ID & id) : Parsable(ParserType::_phasefield, id), id(id), fem(model.getFEEngine()), model(model), spatial_dimension(this->model.getSpatialDimension()), - element_filter("element_filter", id), damage("damage", *this), - phi("phi", *this), strain("strain", *this), + g_c("g_c", *this), element_filter("element_filter", id), + damage("damage", *this), phi("phi", *this), strain("strain", *this), driving_force("driving_force", *this), damage_energy("damage_energy", *this), damage_energy_density("damage_energy_density", *this) { AKANTU_DEBUG_IN(); /// for each connectivity types allocate the element filer array of the /// material element_filter.initialize(model.getMesh(), _spatial_dimension = spatial_dimension, _element_kind = _ek_regular); this->initialize(); AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ PhaseField::PhaseField(PhaseFieldModel & model, UInt dim, const Mesh & mesh, FEEngine & fe_engine, const ID & id) : Parsable(ParserType::_phasefield, id), id(id), fem(fe_engine), model(model), spatial_dimension(this->model.getSpatialDimension()), - element_filter("element_filter", id), + g_c("g_c", *this), element_filter("element_filter", id), damage("damage", *this, dim, fe_engine, this->element_filter), phi("phi", *this, dim, fe_engine, this->element_filter), strain("strain", *this, dim, fe_engine, this->element_filter), driving_force("driving_force", *this, dim, fe_engine, this->element_filter), damage_energy("damage_energy", *this, dim, fe_engine, this->element_filter), damage_energy_density("damage_energy_density", *this, dim, fe_engine, this->element_filter) { AKANTU_DEBUG_IN(); /// for each connectivity types allocate the element filer array of the /// material element_filter.initialize(mesh, _spatial_dimension = spatial_dimension, _element_kind = _ek_regular); this->initialize(); AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ PhaseField::~PhaseField() = default; /* -------------------------------------------------------------------------- */ void PhaseField::initialize() { registerParam("name", name, std::string(), _pat_parsable | _pat_readable); registerParam("l0", l0, Real(0.), _pat_parsable | _pat_readable, "length scale parameter"); registerParam("gc", g_c, _pat_parsable | _pat_readable, "critical local fracture energy density"); registerParam("E", E, _pat_parsable | _pat_readable, "Young's modulus"); registerParam("nu", nu, _pat_parsable | _pat_readable, "Poisson ratio"); damage.initialize(1); phi.initialize(1); driving_force.initialize(1); g_c.initialize(1); strain.initialize(spatial_dimension * spatial_dimension); damage_energy_density.initialize(1); damage_energy.initialize(spatial_dimension * spatial_dimension); } /* -------------------------------------------------------------------------- */ void PhaseField::initPhaseField() { AKANTU_DEBUG_IN(); this->phi.initializeHistory(); this->resizeInternals(); updateInternalParameters(); AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void PhaseField::resizeInternals() { AKANTU_DEBUG_IN(); for (auto it = internal_vectors_real.begin(); it != internal_vectors_real.end(); ++it) { it->second->resize(); } for (auto it = internal_vectors_uint.begin(); it != internal_vectors_uint.end(); ++it) { it->second->resize(); } for (auto it = internal_vectors_bool.begin(); it != internal_vectors_bool.end(); ++it) { it->second->resize(); } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void PhaseField::updateInternalParameters() { this->lambda = this->nu * this->E / ((1 + this->nu) * (1 - 2 * this->nu)); this->mu = this->E / (2 * (1 + this->nu)); } /* -------------------------------------------------------------------------- */ void PhaseField::computeAllDrivingForces(GhostType ghost_type) { AKANTU_DEBUG_IN(); UInt spatial_dimension = model.getSpatialDimension(); for (const auto & type : element_filter.elementTypes(spatial_dimension, ghost_type)) { auto & elem_filter = element_filter(type, ghost_type); if (elem_filter.empty()) { continue; } computeDrivingForce(type, ghost_type); } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void PhaseField::assembleInternalForces(GhostType ghost_type) { AKANTU_DEBUG_IN(); Array & internal_force = model.getInternalForce(); for (auto type : element_filter.elementTypes(_ghost_type = ghost_type)) { auto & elem_filter = element_filter(type, ghost_type); if (elem_filter.empty()) { continue; } auto nb_element = elem_filter.size(); auto nb_nodes_per_element = Mesh::getNbNodesPerElement(type); auto nb_quadrature_points = fem.getNbIntegrationPoints(type, ghost_type); Array nt_driving_force(nb_quadrature_points, nb_nodes_per_element); fem.computeNtb(driving_force(type, ghost_type), nt_driving_force, type, ghost_type, elem_filter); Array int_nt_driving_force(nb_element, nb_nodes_per_element); fem.integrate(nt_driving_force, int_nt_driving_force, nb_nodes_per_element, type, ghost_type, elem_filter); model.getDOFManager().assembleElementalArrayLocalArray( int_nt_driving_force, internal_force, type, ghost_type, 1, elem_filter); } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void PhaseField::assembleStiffnessMatrix(GhostType ghost_type) { AKANTU_DEBUG_IN(); AKANTU_DEBUG_INFO("Assemble the new stiffness matrix"); for (auto type : element_filter.elementTypes(spatial_dimension, ghost_type)) { auto & elem_filter = element_filter(type, ghost_type); if (elem_filter.empty()) { AKANTU_DEBUG_OUT(); return; } auto nb_element = elem_filter.size(); auto nb_nodes_per_element = Mesh::getNbNodesPerElement(type); auto nb_quadrature_points = fem.getNbIntegrationPoints(type, ghost_type); auto nt_b_n = std::make_unique>( nb_element * nb_quadrature_points, nb_nodes_per_element * nb_nodes_per_element, "N^t*b*N"); auto bt_d_b = std::make_unique>( nb_element * nb_quadrature_points, nb_nodes_per_element * nb_nodes_per_element, "B^t*D*B"); // damage_energy_density_on_qpoints = gc/l0 + phi = scalar auto & damage_energy_density_vect = damage_energy_density(type, ghost_type); // damage_energy_on_qpoints = gc*l0 = scalar auto & damage_energy_vect = damage_energy(type, ghost_type); fem.computeBtDB(damage_energy_vect, *bt_d_b, 2, type, ghost_type, elem_filter); fem.computeNtbN(damage_energy_density_vect, *nt_b_n, type, ghost_type, elem_filter); /// compute @f$ K_{\grad d} = \int_e \mathbf{N}^t * \mathbf{w} * /// \mathbf{N}@f$ auto K_n = std::make_unique>( nb_element, nb_nodes_per_element * nb_nodes_per_element, "K_n"); fem.integrate(*nt_b_n, *K_n, nb_nodes_per_element * nb_nodes_per_element, type, ghost_type, elem_filter); model.getDOFManager().assembleElementalMatricesToMatrix( "K", "damage", *K_n, type, _not_ghost, _symmetric, elem_filter); /// compute @f$ K_{\grad d} = \int_e \mathbf{B}^t * \mathbf{W} * /// \mathbf{B}@f$ auto K_b = std::make_unique>( nb_element, nb_nodes_per_element * nb_nodes_per_element, "K_b"); fem.integrate(*bt_d_b, *K_b, nb_nodes_per_element * nb_nodes_per_element, type, ghost_type, elem_filter); model.getDOFManager().assembleElementalMatricesToMatrix( "K", "damage", *K_b, type, _not_ghost, _symmetric, elem_filter); } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void PhaseField::beforeSolveStep() { this->savePreviousState(); this->computeAllDrivingForces(_not_ghost); } /* -------------------------------------------------------------------------- */ void PhaseField::afterSolveStep() {} /* -------------------------------------------------------------------------- */ void PhaseField::savePreviousState() { AKANTU_DEBUG_IN(); for (auto pair : internal_vectors_real) { if (pair.second->hasHistory()) { pair.second->saveCurrentValues(); } } AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ void PhaseField::printself(std::ostream & stream, int indent) const { std::string space(indent, AKANTU_INDENT); std::string type = getID().substr(getID().find_last_of(':') + 1); stream << space << "PhaseField Material " << type << " [" << std::endl; Parsable::printself(stream, indent); stream << space << "]" << std::endl; } } // namespace akantu diff --git a/src/model/phase_field/phasefield.hh b/src/model/phase_field/phasefield.hh index c8a3d4b0c..e492e9c64 100644 --- a/src/model/phase_field/phasefield.hh +++ b/src/model/phase_field/phasefield.hh @@ -1,301 +1,310 @@ /** * @file phasefield.hh * * @author Mohit Pundir * * @date creation: Fri Jun 19 2020 * @date last modification: Wed Jun 23 2021 * * @brief Mother class for all phasefield laws * * * @section LICENSE * * Copyright (©) 2018-2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "aka_factory.hh" #include "data_accessor.hh" #include "parsable.hh" #include "parser.hh" /* -------------------------------------------------------------------------- */ #include "internal_field.hh" #include "random_internal_field.hh" /* -------------------------------------------------------------------------- */ #ifndef __AKANTU_PHASEFIELD_HH__ #define __AKANTU_PHASEFIELD_HH__ /* -------------------------------------------------------------------------- */ namespace akantu { class Model; class PhaseFieldModel; class PhaseField; } // namespace akantu namespace akantu { template using InternalPhaseField = InternalFieldTmpl; +template <> +inline void +ParameterTyped>::setAuto( + const ParserParameter & in_param) { + Parameter::setAuto(in_param); + RandomParameter random_param = in_param; + param.setRandomDistribution(random_param); +} + using PhaseFieldFactory = Factory; class PhaseField : public DataAccessor, public Parsable { /* ------------------------------------------------------------------------ */ /* Constructors/Destructors */ /* ------------------------------------------------------------------------ */ public: PhaseField(const PhaseField & phase) = delete; PhaseField & operator=(const PhaseField & phase) = delete; /// Initialize phasefield with defaults PhaseField(PhaseFieldModel & model, const ID & id = ""); /// Initialize phasefield with custom mesh & fe_engine PhaseField(PhaseFieldModel & model, UInt dim, const Mesh & mesh, FEEngine & fe_engine, const ID & id = ""); /// Destructor ~PhaseField() override; protected: void initialize(); /* ------------------------------------------------------------------------ */ /* Methods */ /* ------------------------------------------------------------------------ */ public: template void registerInternal(InternalPhaseField & /*vect*/) { AKANTU_TO_IMPLEMENT(); } template void unregisterInternal(InternalPhaseField & /*vect*/) { AKANTU_TO_IMPLEMENT(); } /// initialize the phasefield computed parameter virtual void initPhaseField(); /// virtual void beforeSolveStep(); /// virtual void afterSolveStep(); /// assemble the residual for this phasefield virtual void assembleInternalForces(GhostType ghost_type); /// assemble the stiffness matrix for this phasefield virtual void assembleStiffnessMatrix(GhostType ghost_type); /// compute the driving force for this phasefield virtual void computeAllDrivingForces(GhostType ghost_type = _not_ghost); /// save the phi in the phi internal field if needed virtual void savePreviousState(); /// add an element to the local mesh filter inline UInt addElement(const ElementType & type, UInt element, const GhostType & ghost_type); inline UInt addElement(const Element & element); /// function to print the contain of the class void printself(std::ostream & stream, int indent = 0) const override; protected: /// resize the internals arrrays virtual void resizeInternals(); /// function called to updatet the internal parameters when the /// modifiable parameters are modified virtual void updateInternalParameters(); // constitutive law for driving force virtual void computeDrivingForce(const ElementType & /* el_type */, GhostType /* ghost_type */ = _not_ghost) { AKANTU_TO_IMPLEMENT(); } /* ------------------------------------------------------------------------ */ /* DataAccessor inherited members */ /* ------------------------------------------------------------------------ */ public: inline UInt getNbData(const Array & elements, const SynchronizationTag & tag) const override; inline void packData(CommunicationBuffer & buffer, const Array & elements, const SynchronizationTag & tag) const override; inline void unpackData(CommunicationBuffer & buffer, const Array & elements, const SynchronizationTag & tag) override; template inline void packElementDataHelper(const ElementTypeMapArray & data_to_pack, CommunicationBuffer & buffer, const Array & elements, const ID & fem_id = ID()) const; template inline void unpackElementDataHelper(ElementTypeMapArray & data_to_unpack, CommunicationBuffer & buffer, const Array & elements, const ID & fem_id = ID()); /* ------------------------------------------------------------------------ */ /* Accessors */ /* ------------------------------------------------------------------------ */ public: AKANTU_GET_MACRO(Name, name, const std::string &); AKANTU_GET_MACRO(Model, model, const PhaseFieldModel &) AKANTU_GET_MACRO(ID, id, const ID &); AKANTU_GET_MACRO_BY_ELEMENT_TYPE_CONST(Strain, strain, Real); AKANTU_GET_MACRO(Strain, strain, const ElementTypeMapArray &); AKANTU_GET_MACRO_NOT_CONST(Strain, strain, ElementTypeMapArray &); AKANTU_GET_MACRO_BY_ELEMENT_TYPE_CONST(Damage, damage, Real); AKANTU_GET_MACRO_NOT_CONST(Damage, damage, ElementTypeMapArray &); AKANTU_GET_MACRO(Damage, damage, const ElementTypeMapArray &); AKANTU_GET_MACRO_BY_ELEMENT_TYPE_CONST(ElementFilter, element_filter, UInt); AKANTU_GET_MACRO(ElementFilter, element_filter, const ElementTypeMapArray &); template const InternalPhaseField & getInternal(const ID & id) const; template InternalPhaseField & getInternal(const ID & id); template inline bool isInternal(const ID & id, const ElementKind & element_kind) const; template inline void setParam(const ID & param, T value); inline const Parameter & getParam(const ID & param) const; template void flattenInternal(const std::string & field_id, ElementTypeMapArray & internal_flat, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined) const; /* ------------------------------------------------------------------------ */ /* Class Members */ /* ------------------------------------------------------------------------ */ protected: /// boolean to know if the material has been initialized bool is_init; std::map *> internal_vectors_real; std::map *> internal_vectors_uint; std::map *> internal_vectors_bool; protected: ID id; /// Link to the fem object in the model FEEngine & fem; /// phasefield name std::string name; /// The model to whch the phasefield belong PhaseFieldModel & model; /// length scale parameter Real l0; /// critical energy release rate // Real g_c; RandomInternalField g_c; /// Young's modulus Real E; /// Poisson ratio Real nu; /// Lame's first parameter Real lambda; /// Lame's second paramter Real mu; /// spatial dimension UInt spatial_dimension; /// list of element handled by the phasefield ElementTypeMapArray element_filter; /// damage arrays ordered by element types InternalPhaseField damage; /// phi arrays ordered by element types InternalPhaseField phi; /// strain arrays ordered by element types InternalPhaseField strain; /// driving force ordered by element types InternalPhaseField driving_force; /// damage energy ordered by element types InternalPhaseField damage_energy; /// damage energy density ordered by element types InternalPhaseField damage_energy_density; }; /// standard output stream operator inline std::ostream & operator<<(std::ostream & stream, const PhaseField & _this) { _this.printself(stream); return stream; } } // namespace akantu #include "phasefield_inline_impl.cc" #include "internal_field_tmpl.hh" #include "random_internal_field_tmpl.hh" /* -------------------------------------------------------------------------- */ #define PHASEFIELD_DEFAULT_ALLOCATOR(id, phase_name) \ [](const ID &, PhaseFieldModel & model, \ const ID & id) -> std::unique_ptr { \ return std::make_unique(model, id); \ } #define INSTANTIATE_PHASEFIELD(id, phase_name) \ static bool phasefield_is_alocated_##id [[gnu::unused]] = \ PhaseFieldFactory::getInstance().registerAllocator( \ #id, PHASEFIELD_DEFAULT_ALLOCATOR(id, phase_name)) #endif diff --git a/src/model/solid_mechanics/materials/random_internal_field.hh b/src/model/solid_mechanics/materials/random_internal_field.hh index 4325b55ec..78f9995cd 100644 --- a/src/model/solid_mechanics/materials/random_internal_field.hh +++ b/src/model/solid_mechanics/materials/random_internal_field.hh @@ -1,108 +1,108 @@ /** * @file random_internal_field.hh * * @author Nicolas Richart * * @date creation: Fri Jun 18 2010 * @date last modification: Fri Mar 26 2021 * * @brief Random internal material parameter * * * @section LICENSE * * Copyright (©) 2010-2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "aka_common.hh" #include "aka_random_generator.hh" #include "internal_field.hh" /* -------------------------------------------------------------------------- */ #ifndef AKANTU_RANDOM_INTERNAL_FIELD_HH_ #define AKANTU_RANDOM_INTERNAL_FIELD_HH_ namespace akantu { /** * class for the internal fields of materials with a random * distribution */ template class BaseField = InternalField, template class Generator = RandomGenerator> class RandomInternalField : public BaseField { /* ------------------------------------------------------------------------ */ /* Constructors/Destructors */ /* ------------------------------------------------------------------------ */ public: - using Material = typename BaseField::Material; + using ParentMaterial = typename BaseField::Material; - RandomInternalField(const ID & id, Material & material); + RandomInternalField(const ID & id, ParentMaterial & material); ~RandomInternalField() override; /* ------------------------------------------------------------------------ */ /* Methods */ /* ------------------------------------------------------------------------ */ RandomInternalField operator=(const RandomInternalField &) = delete; public: AKANTU_GET_MACRO(RandomParameter, random_parameter, const RandomParameter &); /// initialize the field to a given number of component void initialize(UInt nb_component) override; /// set the field to a given value void setDefaultValue(const T & value) override; /// set the specified random distribution to a given parameter void setRandomDistribution(const RandomParameter & param); /// print the content void printself(std::ostream & stream, int indent = 0) const override; protected: void setArrayValues(T * begin, T * end) override; /* ------------------------------------------------------------------------ */ /* Accessors */ /* ------------------------------------------------------------------------ */ public: inline operator Real() const; /* ------------------------------------------------------------------------ */ /* Class Members */ /* ------------------------------------------------------------------------ */ private: /// random parameter containing the distribution and base value RandomParameter random_parameter; }; /// standard output stream operator template inline std::ostream & operator<<(std::ostream & stream, const RandomInternalField & _this) { _this.printself(stream); return stream; } } // namespace akantu #endif /* AKANTU_RANDOM_INTERNAL_FIELD_HH_ */ diff --git a/src/model/solid_mechanics/materials/random_internal_field_tmpl.hh b/src/model/solid_mechanics/materials/random_internal_field_tmpl.hh index dc94496a6..e79be2cb5 100644 --- a/src/model/solid_mechanics/materials/random_internal_field_tmpl.hh +++ b/src/model/solid_mechanics/materials/random_internal_field_tmpl.hh @@ -1,126 +1,126 @@ /** * @file random_internal_field_tmpl.hh * * @author Nicolas Richart * * @date creation: Wed Nov 13 2013 * @date last modification: Fri Mar 26 2021 * * @brief Random internal material parameter implementation * * * @section LICENSE * * Copyright (©) 2014-2021 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * * Akantu is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. * * Akantu is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with Akantu. If not, see . * */ /* -------------------------------------------------------------------------- */ #include "aka_common.hh" #include "aka_random_generator.hh" #include "internal_field_tmpl.hh" /* -------------------------------------------------------------------------- */ #ifndef AKANTU_RANDOM_INTERNAL_FIELD_TMPL_HH_ #define AKANTU_RANDOM_INTERNAL_FIELD_TMPL_HH_ namespace akantu { /* -------------------------------------------------------------------------- */ template class BaseField, template class Generator> RandomInternalField::RandomInternalField( - const ID & id, Material & material) + const ID & id, ParentMaterial & material) : BaseField(id, material), random_parameter(T()) {} /* -------------------------------------------------------------------------- */ template class BaseField, template class Generator> RandomInternalField::~RandomInternalField() = default; /* -------------------------------------------------------------------------- */ template class BaseField, template class Generator> void RandomInternalField::initialize( UInt nb_component) { this->internalInitialize(nb_component); } /* ------------------------------------------------------------------------ */ template class BaseField, template class Generator> void RandomInternalField::setDefaultValue( const T & value) { random_parameter.setBaseValue(value); this->reset(); } /* ------------------------------------------------------------------------ */ template class BaseField, template class Generator> void RandomInternalField::setRandomDistribution( const RandomParameter & param) { random_parameter = param; this->reset(); } /* ------------------------------------------------------------------------ */ template class BaseField, template class Generator> void RandomInternalField::printself( std::ostream & stream, int indent [[gnu::unused]]) const { stream << "RandomInternalField [ "; random_parameter.printself(stream); stream << " ]"; #if !defined(AKANTU_NDEBUG) if (AKANTU_DEBUG_TEST(dblDump)) { stream << std::endl; - InternalField::printself(stream, indent); + BaseField::printself(stream, indent); } #endif } /* -------------------------------------------------------------------------- */ template class BaseField, template class Generator> void RandomInternalField::setArrayValues(T * begin, T * end) { random_parameter.template setValues(begin, end); } /* -------------------------------------------------------------------------- */ template class BaseField, template class Generator> inline RandomInternalField::operator Real() const { return random_parameter.getBaseValue(); } /* -------------------------------------------------------------------------- */ template <> inline void ParameterTyped>::setAuto( const ParserParameter & in_param) { Parameter::setAuto(in_param); RandomParameter r = in_param; param.setRandomDistribution(r); } /* -------------------------------------------------------------------------- */ } // namespace akantu #endif /* AKANTU_RANDOM_INTERNAL_FIELD_TMPL_HH_ */