291 {
293
294 auto check_result_fe_ptr = boost::make_shared<DomainEle>(
mField);
298
300 check_result_fe_ptr->getOpPtrVector(), {H1})),
301 "Apply transform");
302
303 check_result_fe_ptr->getRuleHook = [](
int,
int,
int p) {
return p; };
304 auto analyticalFunction = [&](double x, double y, double z) {
305 return sin(M_PI * x) * sin(M_PI * y);
306 };
307
308 auto u_ptr = boost::make_shared<VectorDouble>();
309
310 check_result_fe_ptr->getOpPtrVector().push_back(
312 auto mValFuncPtr = boost::make_shared<VectorDouble>();
313 check_result_fe_ptr->getOpPtrVector().push_back(
315 check_result_fe_ptr->getOpPtrVector().push_back(
320 check_result_fe_ptr);
324
326 const double *norms;
329 <<
"NORM: " << std::sqrt(norms[
NORM]);
331 }
332
334 const double *t_ptr;
336 double ref_norm = 2.2e-04;
337 double cal_norm;
339 case 1:
340 cal_norm = sqrt(t_ptr[0]);
341 break;
342 default:
344 "atom test %d does not exist",
atom_test);
345 }
346 if (cal_norm > ref_norm) {
348 "atom test %d failed! Calculated Norm %3.16e is greater than "
349 "reference Norm %3.16e",
351 }
353 }
355}
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
@ MOFEM_ATOM_TEST_INVALID
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
Get norm of input VectorDouble for Tensor0.
Specialization for double precision scalar field values calculation.
Get values from scalar function at integration points and save them to VectorDouble for Tensor0.
MoFEMErrorCode getDM(DM *dm)
Get DM.
const std::string getDomainFEName() const
Get the Domain FE Name.
SmartPetscObj< Vec > petscVec