5namespace bio = boost::iostreams;
11static char help[] =
"...\n\n";
13int main(
int argc,
char *argv[]) {
19 moab::Core mb_instance;
20 moab::Interface &moab = mb_instance;
22 MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
25 PetscBool flg = PETSC_TRUE;
27#if PETSC_VERSION_GE(3, 6, 4)
34 if (flg != PETSC_TRUE) {
35 SETERRQ(PETSC_COMM_SELF, 1,
"*** ERROR -my_file (MESH FILE NEEDED)");
38#if PETSC_VERSION_GE(3, 6, 4)
130 typedef tee_device<std::ostream, std::ofstream>
TeeDevice;
132 std::ofstream ofs(
"record_series_atom.txt");
140 auto dofs_ptr = m_field.
get_dofs();;
142 my_split <<
"TEST_SERIES1" << std::endl;
147 sit->get_step_number());
149 my_split <<
"next step:\n";
150 my_split << *sit << std::endl;
155 dofs_view.insert(*dof);
157 for (DofEntity_multiIndex_uid_view::iterator dit = dofs_view.begin();
158 dit != dofs_view.end(); dit++) {
159 my_split << **dit << endl;
164 my_split <<
"TEST_SERIES2" << std::endl;
169 sit->get_step_number());
171 my_split <<
"next step:\n";
175 dofs_view.insert(*dof);
177 for (DofEntity_multiIndex_uid_view::iterator dit = dofs_view.begin();
178 dit != dofs_view.end(); dit++) {
179 my_split << **dit << endl;
185 dofs_view.insert(*dof);
187 for (DofEntity_multiIndex_uid_view::iterator dit = dofs_view.begin();
188 dit != dofs_view.end(); dit++) {
189 my_split << **dit << endl;
#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.
implementation of Data Operators for Forces and Sources
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.