211 {
213
214 using OP_SOURCE = typename FormsIntegrators<OpBase>::template Assembly<
216 using OP_TEMP = typename FormsIntegrators<OpBase>::template Assembly<
218
219 auto add_op = [&](auto &&meshset_vec_ptr) {
221 for (
auto m : meshset_vec_ptr) {
222 std::vector<double> block_data;
223 m->getAttributes(block_data);
224 if (block_data.size() < 2) {
226 "Expected two parameters");
227 }
228 double target_temperature = block_data[0];
229 double beta = block_data[1];
230 auto ents_ptr = boost::make_shared<Range>();
232 *(ents_ptr), true);
233
235 <<
"Add " << *
m <<
" target temperature " << target_temperature
236 << " penalty " << beta;
237
238 auto op_source = new OP_SOURCE(
240 [target_temperature, beta](double, double, double) {
241 return target_temperature * beta;
242 },
243 ents_ptr);
244 op_source->feScalingFun = fe_fun;
245 pipeline.push_back(op_source);
246 auto op_temp = new OP_TEMP(
248 [beta](double, double, double) { return -beta; }, ents_ptr);
249 op_temp->feScalingFun = fe_fun;
250 pipeline.push_back(op_temp);
251 }
253 };
254
256
257 m_field.
getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
258
259 (boost::format("%s(.*)") % block_name).str()
260
261 ))
262
263 );
264
266
268 }
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
constexpr auto field_name
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.