13 {
14
16
17 try {
18
19 moab::Core mb_instance;
20 moab::Interface &moab = mb_instance;
21 int rank;
22 MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
23
24
25 PetscBool flg = PETSC_TRUE;
27#if PETSC_VERSION_GE(3, 6, 4)
29 255, &flg);
30#else
33#endif
34 if (flg != PETSC_TRUE) {
35 SETERRQ(PETSC_COMM_SELF, 1, "*** ERROR -my_file (MESH FILE NEEDED)");
36 }
38#if PETSC_VERSION_GE(3, 6, 4)
40#else
42 &flg);
43#endif
44
45
46 const char *option;
47 option = "";
49
50
51
54
55
59
60
61
62
63
66
69
74
79
80
82
85
88
91
92
94
97 bit_level0);
99
101 "FIELD_B");
104 bit_level0);
105
109 bit_level0);
111 bit_level0);
114
116
117
120
122
123
126
127
129
130 typedef tee_device<std::ostream, std::ofstream>
TeeDevice;
132 std::ofstream ofs("record_series_atom.txt");
135
139
140 auto dofs_ptr = m_field.
get_dofs();;
141
142 my_split << "TEST_SERIES1" << std::endl;
144 sit)) {
145
147 sit->get_step_number());
148
149 my_split << "next step:\n";
150 my_split << *sit << std::endl;
151
152 {
155 dofs_view.insert(*dof);
156 }
157 for (DofEntity_multiIndex_uid_view::iterator dit = dofs_view.begin();
158 dit != dofs_view.end(); dit++) {
159 my_split << **dit << endl;
160 }
161 }
162 }
163
164 my_split << "TEST_SERIES2" << std::endl;
166 sit)) {
167
169 sit->get_step_number());
170
171 my_split << "next step:\n";
172 {
175 dofs_view.insert(*dof);
176 }
177 for (DofEntity_multiIndex_uid_view::iterator dit = dofs_view.begin();
178 dit != dofs_view.end(); dit++) {
179 my_split << **dit << endl;
180 }
181 }
182 {
185 dofs_view.insert(*dof);
186 }
187 for (DofEntity_multiIndex_uid_view::iterator dit = dofs_view.begin();
188 dit != dofs_view.end(); dit++) {
189 my_split << **dit << endl;
190 }
191 }
192 }
193 }
195
197 return 0;
198}
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#define CHKERR
Inline error check.
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > > > > DofEntity_multiIndex_uid_view
multi-index view on DofEntity by uid
virtual const DofEntity_multiIndex * get_dofs() const =0
Get the dofs object.
#define _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT)
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
virtual MoFEMErrorCode set_field_order(const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
virtual MoFEMErrorCode add_ents_to_field_by_type(const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
virtual MoFEMErrorCode load_series_data(const std::string &serie_name, const int step_number)
virtual MoFEMErrorCode print_series_steps()
virtual MoFEMErrorCode finalize_series_recorder(const std::string &serie_name)
virtual MoFEMErrorCode record_field(const std::string &serie_name, const std::string &field_name, const BitRefLevel &bit, const BitRefLevel &mask)
virtual MoFEMErrorCode initialize_series_recorder(const std::string &serie_name)
#define _IT_SERIES_STEPS_BY_NAME_FOR_LOOP_(RECORDER, NAME, IT)
loop over recorded series step
virtual MoFEMErrorCode add_series_recorder(const std::string &series_name)
virtual MoFEMErrorCode record_begin(const std::string &serie_name)
virtual MoFEMErrorCode record_end(const std::string &serie_name, double time=0)
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
virtual MoFEMErrorCode add_field(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_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.