|
| v0.14.0
|
Testich curl-curl operator by applying Stokes theorem.
More...
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
|
static char | help [] = "...\n\n" |
|
Testich curl-curl operator by applying Stokes theorem.
Definition in file hcurl_curl_operator.cpp.
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
< database
< interface
- Examples
- hcurl_curl_operator.cpp.
Definition at line 45 of file hcurl_curl_operator.cpp.
51 enum bases { AINSWORTH, DEMKOWICZ,
LASTOP };
53 const char *list[] = {
"ainsworth",
"demkowicz"};
56 PetscInt choise_value = AINSWORTH;
59 if (flg != PETSC_TRUE) {
63 PetscBool ho_geometry = PETSC_FALSE;
67 DMType dm_name =
"DMMOFEM";
84 switch (choise_value) {
99 if (ho_geometry == PETSC_TRUE)
103 constexpr
int order = 3;
109 if (ho_geometry == PETSC_TRUE)
120 auto material_grad_mat = boost::make_shared<MatrixDouble>();
121 auto material_det_vec = boost::make_shared<VectorDouble>();
122 auto material_inv_grad_mat = boost::make_shared<MatrixDouble>();
123 auto jac_ptr = boost::make_shared<MatrixDouble>();
124 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
125 auto det_ptr = boost::make_shared<VectorDouble>();
127 pipeline_mng->getOpDomainRhsPipeline().push_back(
129 pipeline_mng->getOpDomainRhsPipeline().push_back(
131 pipeline_mng->getOpDomainRhsPipeline().push_back(
133 pipeline_mng->getOpDomainRhsPipeline().push_back(
135 pipeline_mng->getOpDomainRhsPipeline().push_back(
139 pipeline_mng->getOpDomainRhsPipeline().push_back(
143 material_grad_mat, material_det_vec, material_inv_grad_mat));
144 pipeline_mng->getOpDomainRhsPipeline().push_back(
146 pipeline_mng->getOpDomainRhsPipeline().push_back(
148 pipeline_mng->getOpDomainRhsPipeline().push_back(
151 pipeline_mng->getOpDomainRhsPipeline().push_back(
new OpVolCurl(t_curl_vol));
154 pipeline_mng->getOpBoundaryRhsPipeline().push_back(
156 pipeline_mng->getOpBoundaryRhsPipeline().push_back(
158 pipeline_mng->getOpBoundaryRhsPipeline().push_back(
166 if (ho_geometry == PETSC_TRUE) {
172 CHKERR pipeline_mng->loopFiniteElements();
174 std::cout.precision(12);
176 t_curl_vol(
i) -= t_curl_skin(
i);
177 double nrm2 = sqrt(t_curl_vol(
i) * t_curl_vol(
i));
179 constexpr
double eps = 1e-8;
180 if (fabs(nrm2) >
eps)
182 "Curl operator not passed test\n");
◆ help
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name, LoadFileFunc loadFunc=defaultLoadFileFunc)
Load mesh file.
PipelineManager interface.
Projection of edge entities with one mid-node on hierarchical basis.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Simple interface for fast problem set-up.
Deprecated interface functions.
DeprecatedCoreInterface Interface
MoFEMErrorCode getOptions()
get options
#define CHKERR
Inline error check.
MoFEMErrorCode addDomainField(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on domain.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Calculate normals at Gauss points of triangle element.
virtual bool check_field(const std::string &name) const =0
check if field is in database
FTensor::Index< 'i', SPACE_DIM > i
MoFEMErrorCode addDataField(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on domain.
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
#define CATCH_ERRORS
Catch errors.
Set inverse jacobian to base functions.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ HCURL
field with continuous tangents
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
MoFEMErrorCode addBoundaryField(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on boundary.
transform local reference derivatives of shape function to global derivatives if higher order geometr...
@ MOFEM_ATOM_TEST_INVALID
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)