v0.10.0
Classes | Macros | Functions | Variables
spherical_best_approximation.cpp File Reference
#include <MoFEM.hpp>
#include <Projection10NodeCoordsOnField.hpp>
#include <HelmholtzElement.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>
#include <FiledApproximation.hpp>
#include <PotsProcOnRefMesh.hpp>
#include <boost/iostreams/tee.hpp>
#include <boost/iostreams/stream.hpp>
#include <petsctime.h>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <cmath>
#include <boost/math/special_functions.hpp>
#include <complex>

Go to the source code of this file.

Classes

struct  MyFunApprox_re
 

Macros

#define HOON
 

Functions

int main (int argc, char *argv[])
 

Variables

static char help [] = "...\n\n"
 

Macro Definition Documentation

◆ HOON

#define HOON

Definition at line 40 of file spherical_best_approximation.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 164 of file spherical_best_approximation.cpp.

164  {
165 
166 
167 
168 
169  PetscInitialize(&argc,&argv,(char *)0,help);
170 
171  moab::Core mb_instance;
172  Interface& moab = mb_instance;
173  int rank;
174  MPI_Comm_rank(PETSC_COMM_WORLD,&rank);
175 
176  PetscBool flg = PETSC_TRUE;
177  char mesh_file_name[255];
178  ierr = PetscOptionsGetString(PETSC_NULL,"-my_file",mesh_file_name,255,&flg); CHKERRQ(ierr);
179  if(flg != PETSC_TRUE) {
180  SETERRQ(PETSC_COMM_SELF,1,"*** ERROR -my_file (MESH FILE NEEDED)");
181  }
182 
183  ParallelComm* pcomm = ParallelComm::get_pcomm(&moab,MYPCOMM_INDEX);
184  if(pcomm == NULL) pcomm = new ParallelComm(&moab,PETSC_COMM_WORLD);
185 
186  const char *option;
187  option = "";//"PARALLEL=BCAST;";//;DEBUG_IO";
188  BARRIER_RANK_START(pcomm)
189  rval = moab.load_file(mesh_file_name, 0, option); CHKERR_PETSC(rval);
190  BARRIER_RANK_END(pcomm)
191 
192  //Create MoFEM (Joseph) database
193  MoFEM::Core core(moab);
194  MoFEM::Interface& m_field = core;
195 
196  //count the comsumption of time by single run
197  PetscLogDouble t1,t2;
198  PetscLogDouble v1,v2;
199  ierr = PetscTime(&v1); CHKERRQ(ierr);
200  ierr = PetscGetCPUTime(&t1); CHKERRQ(ierr);
201 
202  //set entitities bit level
203  BitRefLevel bit_level0;
204  bit_level0.set(0);
205  EntityHandle meshset_level0;
206  rval = moab.create_meshset(MESHSET_SET,meshset_level0); CHKERR_PETSC(rval);
207  ierr = m_field.seed_ref_level_3D(0,bit_level0); CHKERRQ(ierr);
208 
209  //Fields
210  ierr = m_field.add_field("reEX",H1,AINSWORTH_LEGENDRE_BASE,1); CHKERRQ(ierr);
211  ierr = m_field.add_field("imEX",H1,AINSWORTH_LEGENDRE_BASE,1); CHKERRQ(ierr);
212  #ifdef HOON
213  ierr = m_field.add_field("MESH_NODE_POSITIONS",H1,AINSWORTH_LEGENDRE_BASE,3,MB_TAG_SPARSE,MF_ZERO); CHKERRQ(ierr);
214  #endif
215 
216  //FE
217  ierr = m_field.add_finite_element("FE1"); CHKERRQ(ierr);
218  ierr = m_field.add_finite_element("FE2"); CHKERRQ(ierr);
219 
220  //Define rows/cols and element data
221  ierr = m_field.modify_finite_element_add_field_row("FE1","reEX"); CHKERRQ(ierr);
222  ierr = m_field.modify_finite_element_add_field_col("FE1","reEX"); CHKERRQ(ierr);
223  ierr = m_field.modify_finite_element_add_field_data("FE1","reEX"); CHKERRQ(ierr);
224  ierr = m_field.modify_finite_element_add_field_data("FE1","imEX"); CHKERRQ(ierr);
225  #ifdef HOON
226  ierr = m_field.modify_finite_element_add_field_data("FE1","MESH_NODE_POSITIONS"); CHKERRQ(ierr);
227  #endif
228 
229  //Define rows/cols and element data
230  ierr = m_field.modify_finite_element_add_field_row("FE2","imEX"); CHKERRQ(ierr);
231  ierr = m_field.modify_finite_element_add_field_col("FE2","imEX"); CHKERRQ(ierr);
232  ierr = m_field.modify_finite_element_add_field_data("FE2","imEX"); CHKERRQ(ierr);
233  #ifdef HOON
234  ierr = m_field.modify_finite_element_add_field_data("FE2","MESH_NODE_POSITIONS"); CHKERRQ(ierr);
235  #endif
236 
237  //Problem
238  ierr = m_field.add_problem("EX1_PROBLEM"); CHKERRQ(ierr);
239  ierr = m_field.add_problem("EX2_PROBLEM"); CHKERRQ(ierr);
240 
241  //set finite elements for problem
242  ierr = m_field.modify_problem_add_finite_element("EX1_PROBLEM","FE1"); CHKERRQ(ierr);
243  ierr = m_field.modify_problem_add_finite_element("EX2_PROBLEM","FE2"); CHKERRQ(ierr);
244  //set refinment level for problem
245  ierr = m_field.modify_problem_ref_level_add_bit("EX1_PROBLEM",bit_level0); CHKERRQ(ierr);
246  ierr = m_field.modify_problem_ref_level_add_bit("EX2_PROBLEM",bit_level0); CHKERRQ(ierr);
247 
248  //meshset consisting all entities in mesh
249  EntityHandle root_set = moab.get_root_set();
250  //add entities to field
251  ierr = m_field.add_ents_to_field_by_type(root_set,MBTET,"reEX"); CHKERRQ(ierr);
252  ierr = m_field.add_ents_to_field_by_type(root_set,MBTET,"imEX"); CHKERRQ(ierr);
253  #ifdef HOON
254  ierr = m_field.add_ents_to_field_by_type(root_set,MBTET,"MESH_NODE_POSITIONS"); CHKERRQ(ierr);
255  #endif
256  //add entities to finite element
257  ierr = m_field.add_ents_to_finite_element_by_type(root_set,MBTET,"FE1"); CHKERRQ(ierr);
258  ierr = m_field.add_ents_to_finite_element_by_type(root_set,MBTET,"FE2"); CHKERRQ(ierr);
259 
260 
261  //set app. order
262  //see Hierarchic Finite Element Bases on Unstructured Tetrahedral Meshes (Mark Ainsworth & Joe Coyle)
263  int order = 3;
264  ierr = PetscOptionsGetInt(PETSC_NULL,"-my_order",&order,&flg); CHKERRQ(ierr);
265  if(flg != PETSC_TRUE) {
266  order = 3;
267  }
268  ierr = m_field.set_field_order(root_set,MBTET,"reEX",order); CHKERRQ(ierr);
269  ierr = m_field.set_field_order(root_set,MBTRI,"reEX",order); CHKERRQ(ierr);
270  ierr = m_field.set_field_order(root_set,MBEDGE,"reEX",order); CHKERRQ(ierr);
271  ierr = m_field.set_field_order(root_set,MBVERTEX,"reEX",1); CHKERRQ(ierr);
272 
273  ierr = m_field.set_field_order(root_set,MBTET,"imEX",order); CHKERRQ(ierr);
274  ierr = m_field.set_field_order(root_set,MBTRI,"imEX",order); CHKERRQ(ierr);
275  ierr = m_field.set_field_order(root_set,MBEDGE,"imEX",order); CHKERRQ(ierr);
276  ierr = m_field.set_field_order(root_set,MBVERTEX,"imEX",1); CHKERRQ(ierr);
277  #ifdef HOON
278  //if(!m_field.check_field("MESH_NODE_POSITIONS")) {
279  ierr = m_field.set_field_order(root_set,MBTET,"MESH_NODE_POSITIONS",2); CHKERRQ(ierr);
280  ierr = m_field.set_field_order(root_set,MBTRI,"MESH_NODE_POSITIONS",2); CHKERRQ(ierr);
281  ierr = m_field.set_field_order(root_set,MBEDGE,"MESH_NODE_POSITIONS",2); CHKERRQ(ierr);
282  ierr = m_field.set_field_order(root_set,MBVERTEX,"MESH_NODE_POSITIONS",1); CHKERRQ(ierr);
283  //}
284  #endif
285 
286  /****/
287  //build database
288  //build field
289  ierr = m_field.build_fields(); CHKERRQ(ierr);
290  #ifdef HOON
291  Projection10NodeCoordsOnField ent_method_material(m_field,"MESH_NODE_POSITIONS");
292  ierr = m_field.loop_dofs("MESH_NODE_POSITIONS",ent_method_material); CHKERRQ(ierr);
293  #endif
294  //build finite elemnts
295  ierr = m_field.build_finite_elements(); CHKERRQ(ierr);
296  //build adjacencies
297  ierr = m_field.build_adjacencies(bit_level0); CHKERRQ(ierr);
298  //build problem
299  ierr = m_field.build_problems(); CHKERRQ(ierr);
300 
301  /****/
302  //mesh partitioning
303  //partition
304  ierr = m_field.simple_partition_problem("EX1_PROBLEM"); CHKERRQ(ierr);
305  ierr = m_field.partition_finite_elements("EX1_PROBLEM"); CHKERRQ(ierr);
306  ierr = m_field.simple_partition_problem("EX2_PROBLEM"); CHKERRQ(ierr);
307  ierr = m_field.partition_finite_elements("EX2_PROBLEM"); CHKERRQ(ierr);
308  //what are ghost nodes, see Petsc Manual
309  ierr = m_field.partition_ghost_dofs("EX1_PROBLEM"); CHKERRQ(ierr);
310  ierr = m_field.partition_ghost_dofs("EX2_PROBLEM"); CHKERRQ(ierr);
311 
312  Mat A;
313  ierr = m_field.MatCreateMPIAIJWithArrays("EX1_PROBLEM",&A); CHKERRQ(ierr);
314  Vec D,F;
315  ierr = m_field.VecCreateGhost("EX1_PROBLEM",ROW,&F); CHKERRQ(ierr);
316  ierr = m_field.VecCreateGhost("EX1_PROBLEM",COL,&D); CHKERRQ(ierr);
317 
318  Mat B;
319  ierr = m_field.MatCreateMPIAIJWithArrays("EX2_PROBLEM",&B); CHKERRQ(ierr);
320  Vec C,G;
321  ierr = m_field.VecCreateGhost("EX2_PROBLEM",ROW,&G); CHKERRQ(ierr);
322  ierr = m_field.VecCreateGhost("EX2_PROBLEM",COL,&C); CHKERRQ(ierr);
323 
324  //Extract data from MAT_HELMHOLTZ block
325  //Exact solution of Impinging sphere from Acoustic isogeometric boundary element analysis by R.N. Simpson etc.
326  static double aNgularfreq;
327  static double sPeed; //Without static. I got error:use of local variable with automatic storage from containing function
328 
329 
330  for(_IT_CUBITMESHSETS_BY_NAME_FOR_LOOP_(m_field,"MAT_HELMHOLTZ",it)) {
331  //for(_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(m_field,"MAT_HELMHOLTZ",it) {
332  //for(_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(m_field,BLOCKSET,it)) {
333 
334  //Get block name
335  //string name = it->get_Cubit_name();
336  //if (name.compare(0,13,"MAT_HELMHOLTZ") == 0)
337  //{
338  //get block attributes
339  vector<double> attributes;
340  ierr = it->get_Cubit_attributes(attributes); CHKERRQ(ierr);
341  if(attributes.size()<2) {
342  SETERRQ1(PETSC_COMM_SELF,1,"not enough block attributes to deffine fluid pressure element, attributes.size() = %d ",attributes.size());
343  }
344  aNgularfreq = attributes[0];
345  sPeed = attributes[1];
346  //}
347  }
348 
349 
350  double wavenumber = aNgularfreq/sPeed;
351 
352  {
353 
354  MyFunApprox_re function_evaluator_re(wavenumber,true);
355  FieldApproximationH1<MyFunApprox_re> field_approximation_re(m_field);
356 
357  field_approximation_re.loopMatrixAndVector(
358  "EX1_PROBLEM","FE1","reEX",A,F,function_evaluator_re);
359  }
360 
361  {
362 
363  MyFunApprox_re function_evaluator_im(wavenumber,false);
364  FieldApproximationH1<MyFunApprox_re> field_approximation_im(m_field);
365 
366  field_approximation_im.loopMatrixAndVector(
367  "EX2_PROBLEM","FE2","imEX",B,G,function_evaluator_im);
368  }
369 
370  //solve real part of the acoustic problem
371  ierr = MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
372  ierr = MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
373  ierr = VecGhostUpdateBegin(F,ADD_VALUES,SCATTER_REVERSE); CHKERRQ(ierr);
374  ierr = VecGhostUpdateEnd(F,ADD_VALUES,SCATTER_REVERSE); CHKERRQ(ierr);
375  ierr = VecGhostUpdateBegin(F,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
376  ierr = VecGhostUpdateEnd(F,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
377 
378  KSP solver1;
379  ierr = KSPCreate(PETSC_COMM_WORLD,&solver1); CHKERRQ(ierr);
380  ierr = KSPSetOperators(solver1,A,A); CHKERRQ(ierr);
381  ierr = KSPSetFromOptions(solver1); CHKERRQ(ierr);
382  ierr = KSPSetUp(solver1); CHKERRQ(ierr);
383 
384  ierr = KSPSolve(solver1,F,D); CHKERRQ(ierr);
385  ierr = VecGhostUpdateBegin(D,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
386  ierr = VecGhostUpdateEnd(D,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
387 
388  //solve imagine part of the acoustic problem
389  ierr = MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
390  ierr = MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY); CHKERRQ(ierr);
391  ierr = VecGhostUpdateBegin(G,ADD_VALUES,SCATTER_REVERSE); CHKERRQ(ierr);
392  ierr = VecGhostUpdateEnd(G,ADD_VALUES,SCATTER_REVERSE); CHKERRQ(ierr);
393  ierr = VecGhostUpdateBegin(G,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
394  ierr = VecGhostUpdateEnd(G,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
395 
396  KSP solver2;
397  ierr = KSPCreate(PETSC_COMM_WORLD,&solver2); CHKERRQ(ierr);
398  ierr = KSPSetOperators(solver2,B,B); CHKERRQ(ierr);
399  ierr = KSPSetFromOptions(solver2); CHKERRQ(ierr);
400  ierr = KSPSetUp(solver2); CHKERRQ(ierr);
401  ierr = KSPSolve(solver2,G,C); CHKERRQ(ierr);
402  ierr = VecGhostUpdateBegin(C,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
403  ierr = VecGhostUpdateEnd(C,INSERT_VALUES,SCATTER_FORWARD); CHKERRQ(ierr);
404  ierr = m_field.set_global_ghost_vector("EX1_PROBLEM",COL,D,INSERT_VALUES,SCATTER_REVERSE); CHKERRQ(ierr);
405  ierr = m_field.set_global_ghost_vector("EX2_PROBLEM",COL,C,INSERT_VALUES,SCATTER_REVERSE); CHKERRQ(ierr);
406 
407 
408  //if(pcomm->rank()==0) {
409  rval = moab.write_file("analytical_solution_mesh.h5m"); CHKERR_PETSC(rval);
410  //}
411 
412  //destroy the solvers
413  ierr = KSPDestroy(&solver1); CHKERRQ(ierr);
414  ierr = VecDestroy(&D); CHKERRQ(ierr);
415  ierr = VecDestroy(&F); CHKERRQ(ierr);
416  ierr = MatDestroy(&A); CHKERRQ(ierr);
417  ierr = KSPDestroy(&solver2); CHKERRQ(ierr);
418  ierr = VecDestroy(&C); CHKERRQ(ierr);
419  ierr = VecDestroy(&G); CHKERRQ(ierr);
420  ierr = MatDestroy(&B); CHKERRQ(ierr);
421 
422 
423  //PostProcVolumeOnRefinedMesh post_proc1(m_field);
424  //ierr = post_proc1.generateRefereneElemenMesh(); CHKERRQ(ierr);
425  //ierr = post_proc1.addFieldValuesPostProc("reEX"); CHKERRQ(ierr);
426  //ierr = post_proc1.addFieldValuesGradientPostProc("reEX"); CHKERRQ(ierr);
427  //ierr = post_proc1.addFieldValuesPostProc("imEX"); CHKERRQ(ierr);
428  //ierr = post_proc1.addFieldValuesGradientPostProc("imEX"); CHKERRQ(ierr);
429  //ierr = post_proc1.addFieldValuesPostProc("MESH_NODE_POSITIONS"); CHKERRQ(ierr);
430  //ierr = m_field.loop_finite_elements("EX1_PROBLEM","FE1",post_proc1); CHKERRQ(ierr);
431  //rval = post_proc1.postProcMesh.write_file("best_approximation_out.h5m","MOAB","PARALLEL=WRITE_PART"); CHKERR_PETSC(rval);
432 
433  //output the results from Docker
434  //char command1[] = "mbconvert ./best_approximation_out.h5m ./best_approximation_out.vtk && cp ./best_approximation_out.vtk ../../../../../mnt/home/Desktop/U_pan/helmholtz_results/";
435  //int todo1 = system( command1 );
436 
437  /** get the time interval **/
438  ierr = PetscTime(&v2);CHKERRQ(ierr);
439  ierr = PetscGetCPUTime(&t2);CHKERRQ(ierr);
440  PetscSynchronizedPrintf(PETSC_COMM_WORLD,"Total Rank %d Time = %f S CPU Time = %f S \n",pcomm->rank(),v2-v1,t2-t1);
441 
442 
443  //typedef tee_device<ostream, ofstream> TeeDevice;
444  //typedef stream<TeeDevice> TeeStream;
445 
446  //ofstream ofs("acoustic_re_field_testing_field_approximation.txt");
447  //TeeDevice tee(cout, ofs);
448  //TeeStream my_split(tee);
449 
450  //Range nodes;
451  //rval = moab.get_entities_by_type(0,MBVERTEX,nodes,true); CHKERR(rval);
452  //MatrixDouble nodes_vals;
453  //nodes_vals.resize(nodes.size(),3); //change the parameter from 3 to 1 ?
454  //rval = moab.tag_get_data(
455  // ent_method_field1_on_10nodeTet.th,nodes,&*nodes_vals.data().begin()); CHKERR(rval);
456 
457 
458  //const double eps = 1e-4;
459 
460  //my_split.precision(3);
461  //my_split.setf(std::ios::fixed);
462  //for(
463  // ublas::unbounded_array<double>::iterator it = nodes_vals.data().begin();
464  // it!=nodes_vals.data().end();it++) {
465  // *it = fabs(*it)<eps ? 0.0 : *it; //if a < b ?then c, :else d
466  //}
467  //my_split << nodes_vals << endl;
468 
469  //const Problem *problemPtr;
470  //ierr = m_field.get_problem("PROBLEM1",&problemPtr); CHKERRQ(ierr);
471  //map<EntityHandle,double> m0,m1,m2;
472  //for(_IT_NUMEREDDOF_ROW_FOR_LOOP_(problemPtr,dit)) {
473 
474  // my_split.precision(3);
475  // my_split.setf(std::ios::fixed);
476  // double val = fabs(dit->getFieldData())<eps ? 0.0 : dit->getFieldData();
477  // my_split << dit->getPetscGlobalDofIdx() << " " << val << endl;
478 
479  //}
480 
481  ierr = PetscFinalize(); CHKERRQ(ierr);
482 
483  return 0;
484 
485 }
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string &name_row)=0
set field col which finite element use
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
Deprecated interface functions.
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
DEPRECATED MoFEMErrorCode set_global_ghost_vector(const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const
set values of vector from/to mesh database (collective)collective - need tu be run on all processors ...
CoreTmp< 0 > Core
Definition: Core.hpp:1129
const double D
diffusivity
#define BARRIER_RANK_END(PCMB)
Definition: definitions.h:351
virtual DEPRECATED MoFEMErrorCode build_problems(int verb=-1)=0
build problem data structures
#define _IT_CUBITMESHSETS_BY_NAME_FOR_LOOP_(MESHSET_MANAGER, NAME, IT)
Iterator that loops over Cubit BlockSet having a particular name.
virtual MoFEMErrorCode modify_problem_add_finite_element(const std::string &name_problem, const std::string &fe_name)=0
add finite element to problem, this add entities assigned to finite element to a particular problem
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.
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.
char mesh_file_name[255]
Projection of edge entities with one mid-node on hierarchical basis.
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:85
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
DEPRECATED MoFEMErrorCode partition_finite_elements(const std::string &name, bool part_from_moab=false, int low_proc=-1, int hi_proc=-1, int verb=-1)
partition finite elements
constexpr int order
#define BARRIER_RANK_START(PCMB)
Definition: definitions.h:328
CHKERRQ(ierr)
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.
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:152
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.
virtual MoFEMErrorCode modify_problem_ref_level_add_bit(const std::string &name_problem, const BitRefLevel &bit)=0
add ref level to problem
DEPRECATED MoFEMErrorCode VecCreateGhost(const std::string &name, RowColData rc, Vec *V) const
create ghost vector for problem (collective)collective - need to be run on all processors in communic...
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:292
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:51
DEPRECATED MoFEMErrorCode partition_ghost_dofs(const std::string &name, int verb=-1)
determine ghost nodes
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
virtual MoFEMErrorCode add_problem(const std::string &name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add problem.
Finite element for approximating analytical filed on the mesh.
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string &name_row)=0
set field row which finite element use
Core (interface) class.
Definition: Core.hpp:77
continuous field
Definition: definitions.h:177
DEPRECATED MoFEMErrorCode MatCreateMPIAIJWithArrays(const std::string &name, Mat *Aij, int verb=DEFAULT_VERBOSITY)
DEPRECATED MoFEMErrorCode seed_ref_level_3D(const EntityHandle meshset, const BitRefLevel &bit, int verb=-1)
seed 2D entities in the meshset and their adjacencies (only TETs adjacencies) in a particular BitRefL...
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elementsBuild finite element data structures. Have to be run before problem and adjacenc...
static char help[]

Variable Documentation

◆ help

char help[] = "...\n\n"
static

Definition at line 49 of file spherical_best_approximation.cpp.