Page MenuHomec4science

stimulation_temperature_mesh.cc
No OneTemporary

File Metadata

Created
Thu, May 23, 21:13

stimulation_temperature_mesh.cc

/**
* @file stimulation_temperature_mesh.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
* @author Srinivasa Babu Ramisetti <srinivasa.ramisetti@epfl.ch>
*
* @date Thu Sep 18 16:13:19 2014
*
* @brief Set a given temperature to a set of DOFs
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* LibMultiScale 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.
*
* LibMultiScale 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 LibMultiScale. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "lm_common.hh"
#include "stimulation_temperature.hh"
#include "lib_continuum.hh"
#include "filter.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
template <typename Cont>
void StimulationTemperature<Cont>::stimulate(Cont &cont, UInt stage) {
typedef typename Cont::Ref Ref;
typename Cont::iterator it = cont.getIterator();
if(!flux_flag){
for (Ref n = it.getFirst();!it.end();n = it.getNext()) {
n.temperature() = this->temperature;
}
}
else{
for (Ref n = it.getFirst();!it.end();n = it.getNext()) {
n.externalHeatRate() = this->heat_rate_per_node;
}
}
}
/* -------------------------------------------------------------------------- */
DECLARE_STIMULATION(StimulationTemperature,LIST_CONTINUUM_MODEL)
__END_LIBMULTISCALE__

Event Timeline