v0.8.23
Files | Classes | Enumerations | Functions | Variables
Helmholtz element
Collaboration diagram for Helmholtz element:

Files

file  best_approximation.cpp
 
file  best_approximation.cpp
 
file  fe_approximation.cpp
 
file  AnalyticalSolutions.hpp
 
file  AnalyticalSolutions.hpp
 
file  HelmholtzElement.hpp
 Operators and data structures for wave propagation analyze (Galerkin Element)
 
file  HelmholtzElement.hpp
 Operators and data structures for wave propagation analyze (Galerkin Element)
 
file  HelmholtzElement.hpp
 Operators and data structures for wave propagation analyze (Galerkin Element)
 
file  HelmholtzElement.hpp
 Operators and data structures for wave propagation analyze (Galerkin Element)
 
file  NormElement.hpp
 Operators and data structures for L^2Norm analysis.
 
file  NormElement.hpp
 Operators and data structures for L^2Norm analysis.
 
file  ReynoldsStress.hpp
 Operators and data structures for the calculation of momentum flux and Reynolds Stress of the complex scalar field with Homogeneous material.
 
file  SecondOrderStress.hpp
 Operators and data structures for the calculation of second order flux term employed to retrieve the acoustic radiation force with Homogeneous material.
 

Classes

struct  GenericAnalyticalSolution
 Generic structure for analytical function. More...
 
struct  IncidentWave
 
struct  HardSphereScatterWave
 
struct  SoftSphereScatterWave
 
struct  PlaneWave
 Calculate the analytical solution of plane wave guide propagating in direction theta

\[ p_\textrm{scattered} = exp^{ik\mathbf{x}\Theta} \]

. More...

 
struct  HardCylinderScatterWave
 Calculate the analytical solution of impinging wave on cylinder

\[ p_\textrm{scattered} = \sum_0^N A_l H_l(kr)\cos(l\theta) \]

. More...

 
struct  SoftCylinderScatterWave
 Calculate the analytical solution of impinging wave on cylinder

\[ p_\textrm{scattered} = \sum_0^N A_l H_l(kr)\cos(l\theta) \]

. More...

 
struct  SingularScatterWave
 
struct  SingularIncidentWave
 
struct  MoFEM::HelmholtzElement::MyVolumeFE
 definition of volume element More...
 
struct  MoFEM::HelmholtzElement::MyTriFE
 define surface element More...
 
struct  MoFEM::HelmholtzElement::BlockData
 data for calulation Angular Frequency and wave speed elements \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::FluxData
 data for calulation heat flux \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::IncidentData
 
struct  MoFEM::HelmholtzElement::ImpedanceData
 data for Robin Boundary condition \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::CommonData
 common data used by volume elements \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::OpGetGradReAtGaussPts
 operator to calculate pressure gradient at Gauss points More...
 
struct  MoFEM::HelmholtzElement::OpGetGradImAtGaussPts
 operator to calculate pressure gradient at Gauss points More...
 
struct  MoFEM::HelmholtzElement::OpGetFieldAtGaussPts< OP >
 opearator to caulate pressure and rate of pressure at Gauss points \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::OpGetTetPressureReAtGaussPts
 operator to calculate pressure at Gauss pts \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::OpGetTetPressureImAtGaussPts
 
struct  MoFEM::HelmholtzElement::OpGetTriPressureReAtGaussPts
 operator to calculate pressure at Gauss pts \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::OpGetTriPressureImAtGaussPts
 
struct  MoFEM::HelmholtzElement::OpHoCoordTri
 
struct  MoFEM::HelmholtzElement::OpHoCoordTet
 
struct  MoFEM::HelmholtzElement::OpHelmholtzRhs_Re
 
struct  MoFEM::HelmholtzElement::OpHelmholtzRhs_Im
 
struct  MoFEM::HelmholtzElement::OpHelmholtzRhs_impedance
 
struct  MoFEM::HelmholtzElement::OpHelmholtzRhs_F
 
struct  MoFEM::HelmholtzElement::OpHelmholtzLhs_A
 
struct  MoFEM::HelmholtzElement::OpHelmholtzFlux
 operator for calculate Impedance flux and assemble to right hand side \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::OpHelmholtzIncidentWave
 operator for calculate Impedance flux and assemble to right hand side \infroup mofem_helmholtz_elem More...
 
struct  MoFEM::HelmholtzElement::OpImpedanceLhs_reimC
 \biref operator to calculate Impedance on body surface and assemble to imaginary lhs of equations More...
 
struct  MoFEM::HelmholtzElement::OpImpedanceLhs_imreC
 \biref operator to calculate Impedance on body surface and assemble to imaginary lhs of equations More...
 
struct  MoFEM::HelmholtzElement::OpImpedanceLhs_D
 
struct  HelmholtzElement
 Structure grouping operators and data used for wave propagation problemComplex-real transformation, See Ercegovac, Milos, and Jean-Michel Muller. "Solving Systems of Linear Equations in Complex Domain: Complex E-Method." (2007)". More...
 
struct  HelmholtzElement::InfiniteHelmholtz
 
struct  HelmholtzElement::OpHelmholtzMixBCLhs< FUNEVAL1 >
 Mix boundary conditions

\[ C_{ij}= \int_{\Gamma^e} (\sigma+F1) N_i N_j \textrm{d}S \]

. More...

 
struct  HelmholtzElement::OpHelmholtzMixBCRhs< FUNEVAL1, FUNEVAL2 >
 
struct  HelmholtzElement::IncidentWaveDirichletF2
 Calculate incident wave scattered on soft surface with admittanceThis part shows the Dirichlet like boundary condition of the exterior boundary value problem for the rigid scatterer. More...
 
struct  HelmholtzElement::IncidentWaveNeumannF2
 Calculate incident wave scattered on hard surfaceThis part shows the Neumann boundary condition of the exterior boundary value problem for the rigid scatterer. More...
 
struct  HelmholtzElement::BaylissTurkel
 
struct  HelmholtzElement::ZeroFunVal
 
struct  HelmholtzElement::OpHelmholtzLhs
 Lhs for helmholtz operator. More...
 
struct  HelmholtzElement::OpHelmholtzRhs_F
 
struct  HelmholtzElement::OpHelmholtzRhs
 Rhs vector for Helmholtz operator

\[ F_i = \int_{\Omega^e} \frac{\partial N_i}{\partial X_j} \frac{\partial p}{\partial X_j} - k^2 N_i p \textrm{d}V \]

. More...

 
struct  HelmholtzElement::OpHoCoordTet
 Coordinates at integration points, on Volume. More...
 
struct  HelmholtzElement::OpHoCoordTri
 Coordinates at integration points, on surface. More...
 
struct  HelmholtzElement::OpGetValueAtGaussPts
 Calculate pressure on surface. More...
 
struct  HelmholtzElement::OpGetValueAndGradAtGaussPts
 Calculate pressure and gradient of pressure in volume. More...
 
struct  HelmholtzElement::OpGetImIndices
 
struct  HelmholtzElement::CommonData
 Common data used by volume and surface elements. More...
 
struct  HelmholtzElement::GlobalParameters
 
struct  HelmholtzElement::SurfaceData
 Surface element data. More...
 
struct  HelmholtzElement::VolumeData
 Volume element data. More...
 
struct  HelmholtzElement::MySurfaceFE
 Surface element. More...
 
struct  HelmholtzElement::MyVolumeFE
 Volume element. More...
 
struct  MoFEM::HelmholtzElement
 struture grouping operators and data used for helmholtz problemsIn order to assemble matrices and right hand side vectors, the loops over elements, enetities over that elememnts and finally loop over intergration points are executed. More...
 
struct  NormElement::CommonData
 Common data used by volume and surface elements. More...
 
struct  NormElement::OpLhs
 Lhs Matrix for Norm Element

\[ A_{ik} = \int_{\Omega^e} N_i N_k \textrm{d}V \]

. More...

 
struct  NormElement::OpRhs
 Rhs vector for Norm Element

\[ F_i = \int_{\Omega^e} (\Phi_{ref} - \Phi_{fem}) N_i \textrm{d}V \]

. More...

 
struct  PlaneIncidentWaveSacttrerData
 Read impulse and apply FFTFirst signal is read from text file. Currently is assumed that this signal gives profile for plane wave. Spherical or other wave types can be easily added and implemented. More...
 

Enumerations

enum  AnalyticalSolutionTypes {
  HARD_SPHERE_SCATTER_WAVE, SOFT_SPHERE_SCATTER_WAVE, PLANE_WAVE, HARD_CYLINDER_SCATTER_WAVE,
  SOFT_CYLINDER_SCATTER_WAVE, SINGULAR_SCATTER_WAVE, INCIDENT_WAVE, NO_ANALYTICAL_SOLUTION,
  HARD_SPHERE_SCATTER_WAVE, SOFT_SPHERE_SCATTER_WAVE, PLANE_WAVE, HARD_CYLINDER_SCATTER_WAVE,
  SOFT_CYLINDER_SCATTER_WAVE, INCIDENT_WAVE
}
 
enum  AnalyticalSolutionTypes {
  HARD_SPHERE_SCATTER_WAVE, SOFT_SPHERE_SCATTER_WAVE, PLANE_WAVE, HARD_CYLINDER_SCATTER_WAVE,
  SOFT_CYLINDER_SCATTER_WAVE, SINGULAR_SCATTER_WAVE, INCIDENT_WAVE, NO_ANALYTICAL_SOLUTION,
  HARD_SPHERE_SCATTER_WAVE, SOFT_SPHERE_SCATTER_WAVE, PLANE_WAVE, HARD_CYLINDER_SCATTER_WAVE,
  SOFT_CYLINDER_SCATTER_WAVE, INCIDENT_WAVE
}
 

Functions

PetscErrorCode HelmholtzElement::addHelmholtzElements (const string re_field_name, const string im_field_name, const string mesh_nodals_positions="MESH_NODE_POSITIONS", const string pressure_field="P")
 Add Helmholtz elements to problemIt get data from block set and define element in moab w. More...
 
PetscErrorCode NormElement::addNormElements (const string problem, string fe, const string norm_field_name, const string an_field_name1, const string nu_field_name1, const string an_field_name2, const string nu_field_name2, const string mesh_nodals_positions="MESH_NODE_POSITIONS")
 Add Norm Element ProblemIt get data from block set and define element in moab w. More...
 

Variables

const char * analytical_solution_types []
 
const char * analytical_solution_types []
 

Detailed Description

Enumeration Type Documentation

◆ AnalyticalSolutionTypes [1/2]

List of analytical solution

Enumerator
HARD_SPHERE_SCATTER_WAVE 
SOFT_SPHERE_SCATTER_WAVE 
PLANE_WAVE 
HARD_CYLINDER_SCATTER_WAVE 
SOFT_CYLINDER_SCATTER_WAVE 
SINGULAR_SCATTER_WAVE 
INCIDENT_WAVE 
NO_ANALYTICAL_SOLUTION 
HARD_SPHERE_SCATTER_WAVE 
SOFT_SPHERE_SCATTER_WAVE 
PLANE_WAVE 
HARD_CYLINDER_SCATTER_WAVE 
SOFT_CYLINDER_SCATTER_WAVE 
INCIDENT_WAVE 

Definition at line 38 of file AnalyticalSolutions_obsolete.hpp.

◆ AnalyticalSolutionTypes [2/2]

List of analytical solution

Enumerator
HARD_SPHERE_SCATTER_WAVE 
SOFT_SPHERE_SCATTER_WAVE 
PLANE_WAVE 
HARD_CYLINDER_SCATTER_WAVE 
SOFT_CYLINDER_SCATTER_WAVE 
SINGULAR_SCATTER_WAVE 
INCIDENT_WAVE 
NO_ANALYTICAL_SOLUTION 
HARD_SPHERE_SCATTER_WAVE 
SOFT_SPHERE_SCATTER_WAVE 
PLANE_WAVE 
HARD_CYLINDER_SCATTER_WAVE 
SOFT_CYLINDER_SCATTER_WAVE 
INCIDENT_WAVE 

Definition at line 41 of file AnalyticalSolutions.hpp.

Function Documentation

◆ addHelmholtzElements()

PetscErrorCode HelmholtzElement::addHelmholtzElements ( const string  re_field_name,
const string  im_field_name,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS",
const string  pressure_field = "P" 
)

Add Helmholtz elements to problemIt get data from block set and define element in moab w.

Parameters
problemname
fieldname
nameof mesh nodal positions (if not defined nodal coordinates are used)

Definition at line 2537 of file HelmholtzElement.hpp.

2540  {
2541  PetscFunctionBegin;
2542 
2543  PetscErrorCode ierr;
2544  ErrorCode rval;
2545 
2546  if(mField.check_field(pressure_field)) {
2547 
2548  ierr = mField.add_finite_element("PRESSURE_FE",MF_ZERO); CHKERRQ(ierr );
2549  ierr = mField.modify_finite_element_add_field_row("PRESSURE_FE",pressure_field); CHKERRQ(ierr);
2550  ierr = mField.modify_finite_element_add_field_col("PRESSURE_FE",pressure_field); CHKERRQ(ierr);
2551  ierr = mField.modify_finite_element_add_field_data("PRESSURE_FE",pressure_field); CHKERRQ(ierr);
2552 
2553  }
2554 
2555  ierr = mField.add_finite_element("HELMHOLTZ_RERE_FE",MF_ZERO); CHKERRQ(ierr );
2556  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_RERE_FE",re_field_name); CHKERRQ(ierr);
2557  // ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_RERE_FE",im_field_name); CHKERRQ(ierr);
2558  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_RERE_FE",re_field_name); CHKERRQ(ierr);
2559  // ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_RERE_FE",im_field_name); CHKERRQ(ierr);
2560  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_RERE_FE",re_field_name); CHKERRQ(ierr);
2561  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_RERE_FE",im_field_name); CHKERRQ(ierr);
2562 
2563  ierr = mField.add_finite_element("HELMHOLTZ_IMIM_FE",MF_ZERO); CHKERRQ(ierr );
2564  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_IMIM_FE",im_field_name); CHKERRQ(ierr);
2565  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_IMIM_FE",im_field_name); CHKERRQ(ierr);
2566  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_IMIM_FE",im_field_name); CHKERRQ(ierr);
2567  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_IMIM_FE",re_field_name); CHKERRQ(ierr);
2568 
2569  ierr = mField.add_finite_element("HELMHOLTZ_REIM_FE",MF_ZERO); CHKERRQ(ierr );
2570  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_REIM_FE",re_field_name); CHKERRQ(ierr);
2571  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_REIM_FE",im_field_name); CHKERRQ(ierr);
2572  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_REIM_FE",re_field_name); CHKERRQ(ierr);
2573  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_REIM_FE",im_field_name); CHKERRQ(ierr);
2574  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_REIM_FE",re_field_name); CHKERRQ(ierr);
2575  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_REIM_FE",im_field_name); CHKERRQ(ierr);
2576 
2577  if(mField.check_field(mesh_nodals_positions)) {
2578 
2579  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_RERE_FE",mesh_nodals_positions); CHKERRQ(ierr);
2580  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_IMIM_FE",mesh_nodals_positions); CHKERRQ(ierr);
2581  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_REIM_FE",mesh_nodals_positions); CHKERRQ(ierr);
2582 
2583  if(mField.check_field(pressure_field)) {
2584 
2585  ierr = mField.modify_finite_element_add_field_data("PRESSURE_FE",mesh_nodals_positions); CHKERRQ(ierr);
2586 
2587  }
2588 
2589  }
2590 
2592 
2593  if(it->getName().compare(0,13,"MAT_HELMHOLTZ") == 0) {
2594 
2595  const complex< double > i( 0.0, 1.0 );
2596  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTET,volumeData[it->getMeshsetId()].tEts,true); CHKERRQ_MOAB(rval);
2597  ierr = mField.add_ents_to_finite_element_by_type(volumeData[it->getMeshsetId()].tEts,MBTET,"HELMHOLTZ_RERE_FE"); CHKERRQ(ierr);
2598  ierr = mField.add_ents_to_finite_element_by_type(volumeData[it->getMeshsetId()].tEts,MBTET,"HELMHOLTZ_IMIM_FE"); CHKERRQ(ierr);
2599  /* FIXME Replace 0 by attenuation coefficient. */
2600  volumeData[it->getMeshsetId()].waveNumber = globalParameters.waveNumber.first;
2601 
2602  if(mField.check_field(pressure_field)) {
2603  ierr = mField.add_ents_to_finite_element_by_type(volumeData[it->getMeshsetId()].tEts,MBTET,"PRESSURE_FE"); CHKERRQ(ierr);
2604  }
2605 
2606  }
2607 
2608  }
2609 
2611 
2612  if(it->getName().compare(0,23,"HARD_INCIDENT_WAVE_BC") == 0) {
2613 
2614  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_real = 0;
2615  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag = 0;
2616  globalParameters.isIncidentWave.first = PETSC_TRUE;
2617 
2618  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceIncidentWaveBcData[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2619  ierr = mField.add_ents_to_finite_element_by_type(surfaceIncidentWaveBcData[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2620 
2621  }
2622 
2623  if(it->getName().compare(0,25,"HARD_INCIDENT_WAVE_2BC") == 0) {
2624 
2625  surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_real = 0;
2626  surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_imag = 0;
2627  globalParameters.isIncidentWave.first = PETSC_TRUE;
2628 
2629  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceIncidentWaveBc2Data[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2630  ierr = mField.add_ents_to_finite_element_by_type(surfaceIncidentWaveBc2Data[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2631 
2632  }
2633 
2634  if(it->getName().compare(0,22,"MIX_INCIDENT_WAVE_BC") == 0) {
2635 
2636  // Range tris;
2637  // rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,tris,true); CHKERRQ_MOAB(rval);
2638  // if(tris.size()==0) continue;
2639 
2640  //get block attributes
2641  vector<double> attributes;
2642  ierr = it->getAttributes(attributes); CHKERRQ(ierr);
2643 
2644  /* FIXME problem with paratitioned mesh parallel computation. */
2645  if(attributes.size()<1) {
2646  //SETERRQ1(PETSC_COMM_SELF,1,"first block attribute should define surface admittance (atribute size = %d)",attributes.size());
2647  // attributes.resize(2,0);
2648  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_real = 0;
2649  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient1.first;
2650  // cerr << "\n surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag = \n" << surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag << endl;
2651  } else {
2652  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_real = attributes[0];
2653  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag = attributes[1];
2654  }
2655 
2656  globalParameters.isIncidentWave.first = PETSC_TRUE;
2657 
2658  if(surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag == 0 && surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_real == 0) {
2659 
2660  surfaceIncidentWaveBcData[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient1.first;
2661 
2662  }
2663 
2664  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceIncidentWaveBcData[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2665  ierr = mField.add_ents_to_finite_element_by_type(surfaceIncidentWaveBcData[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2666 
2667  }
2668 
2669  if(it->getName().compare(0,22,"MIX_INCIDENT_WAVE_2BC") == 0) {
2670 
2671  vector<double> attributes;
2672  ierr = it->getAttributes(attributes); CHKERRQ(ierr);
2673 
2674  if(attributes.size()<1) {
2675  surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_real = 0;
2676  surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient2.first;
2677  } else {
2678  surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_real = attributes[0];
2679  surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_imag = attributes[1];
2680  }
2681 
2682  globalParameters.isIncidentWave.first = PETSC_TRUE;
2683  // cerr << "\n surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_imag = \n" << surfaceIncidentWaveBc2Data[it->getMeshsetId()].aDmittance_imag << endl;
2684  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceIncidentWaveBc2Data[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2685  ierr = mField.add_ents_to_finite_element_by_type(surfaceIncidentWaveBc2Data[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2686 
2687  }
2688 
2689  if(it->getName().compare(0,9,"HARD_BC") == 0) {
2690 
2691  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_real = 0;
2692  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_imag = 0;
2693  globalParameters.isHomogenous.first = PETSC_TRUE;
2694 
2695  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceHomogeneousBcData[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2696  ierr = mField.add_ents_to_finite_element_by_type(surfaceHomogeneousBcData[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2697 
2698  }
2699 
2700  if(it->getName().compare(0,9,"ABSORB_BC") == 0) {
2701 
2702  //get block attributes
2703  vector<double> attributes;
2704  ierr = it->getAttributes(attributes); CHKERRQ(ierr);
2705  // if(attributes.size()<1) {
2706  // SETERRQ1(PETSC_COMM_SELF,1,"first block attribute should define surface admittance",attributes.size());
2707  // }
2708  if(attributes.size()<1) {
2709  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_real = 0;
2710  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient1.first;
2711  } else {
2712  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_real = attributes[0];
2713  /* wave reflected based on -\sigma */
2714  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_imag = attributes[1];
2715  }
2716 
2717  globalParameters.isHomogenous.first = PETSC_TRUE;
2718 
2719  if(surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_imag == 0 && surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_real == 0) {
2720  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_real = 0;
2721  surfaceHomogeneousBcData[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient1.first;
2722  }
2723 
2724  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceHomogeneousBcData[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2725  ierr = mField.add_ents_to_finite_element_by_type(surfaceHomogeneousBcData[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2726 
2727  }
2728 
2729  if(it->getName().compare(0,10,"ABSORB_2BC") == 0) {
2730 
2731  //get block attributes
2732  vector<double> attributes;
2733  ierr = it->getAttributes(attributes); CHKERRQ(ierr);
2734 
2735  if(attributes.size()<1) {
2736  surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_real = 0;
2737  surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient2.first;
2738  } else {
2739  surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_real = attributes[0];
2740  surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_imag = attributes[1];
2741  }
2742 
2743  globalParameters.isHomogenous.first = PETSC_TRUE;
2744 
2745  if(surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_imag == 0 && surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_real == 0) {
2746  surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_real = 0;
2747  surfaceHomogeneousBc2Data[it->getMeshsetId()].aDmittance_imag = globalParameters.materialCoefficient2.first;
2748  }
2749 
2750  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,surfaceHomogeneousBc2Data[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2751  ierr = mField.add_ents_to_finite_element_by_type(surfaceHomogeneousBc2Data[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2752 
2753  }
2754 
2755  if(it->getName().compare(0,13,"SOMMERFELD_BC") == 0) {
2756 
2757  sommerfeldBcData[it->getMeshsetId()].aDmittance_real = 0;
2758 
2759  sommerfeldBcData[it->getMeshsetId()].aDmittance_imag = -globalParameters.waveNumber.first;
2760 
2761 
2762  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,sommerfeldBcData[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2763  ierr = mField.add_ents_to_finite_element_by_type(sommerfeldBcData[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2764 
2765  }
2766 
2767  if(it->getName().compare(0,17,"BAYLISS_TURKEL_BC") == 0) {
2768 
2769  baylissTurkelBcData[it->getMeshsetId()].aDmittance_real = 0;
2770  baylissTurkelBcData[it->getMeshsetId()].aDmittance_imag = -globalParameters.waveNumber.first;
2771 
2772  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,baylissTurkelBcData[it->getMeshsetId()].tRis,true); CHKERRQ_MOAB(rval);
2773  ierr = mField.add_ents_to_finite_element_by_type(baylissTurkelBcData[it->getMeshsetId()].tRis,MBTRI,"HELMHOLTZ_REIM_FE"); CHKERRQ(ierr);
2774 
2775  }
2776 
2777  }
2778 
2779  PetscFunctionReturn(0);
2780  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
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
pair< PetscBool, PetscBool > isHomogenous
virtual moab::Interface & get_moab()=0
pair< double, PetscBool > materialCoefficient2
MoFEM::Interface & mField
map< int, SurfaceData > surfaceHomogeneousBc2Data
map< int, SurfaceData > surfaceIncidentWaveBc2Data
map< int, SurfaceData > sommerfeldBcData
map< int, SurfaceData > surfaceHomogeneousBcData
GlobalParameters globalParameters
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
pair< double, PetscBool > waveNumber
pair< double, PetscBool > materialCoefficient1
CHKERRQ(ierr)
map< int, SurfaceData > baylissTurkelBcData
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
map< int, SurfaceData > surfaceIncidentWaveBcData
pair< PetscBool, PetscBool > isIncidentWave
virtual bool check_field(const std::string &name) const =0
check if field is in database
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
map< int, VolumeData > volumeData

◆ addNormElements()

PetscErrorCode NormElement::addNormElements ( const string  problem,
string  fe,
const string  norm_field_name,
const string  an_field_name1,
const string  nu_field_name1,
const string  an_field_name2,
const string  nu_field_name2,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)

Add Norm Element ProblemIt get data from block set and define element in moab w.

Parameters
problemname
fieldname
nameof mesh nodal positions (if not defined nodal coordinates are used)

Definition at line 471 of file NormElement.hpp.

476  {
477  PetscFunctionBegin;
478 
479 
484 
489 
490 
491  if(m_field.check_field(mesh_nodals_positions)) {
492  ierr = m_field.modify_finite_element_add_field_data(fe,mesh_nodals_positions); CHKERRQ(ierr);
493  }
495 
496 
497  //Range tEts;
498  for(_IT_CUBITMESHSETS_BY_NAME_FOR_LOOP_(m_field,"MAT_NORM",it)) {
499 
500  rval = m_field.get_moab().get_entities_by_type(it->getMeshset(),MBTET,volumeData[it->getMeshsetId()].tEts,true); CHKERRQ_MOAB(rval);
501 
502  ierr = m_field.add_ents_to_finite_element_by_type(volumeData[it->getMeshsetId()].tEts,MBTET,fe); CHKERRQ(ierr);
503  }
504 
505 
506  PetscFunctionReturn(0);
507 
508  }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
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
map< int, VolumeData > volumeData
maps block set id with appropiate VolumeData
virtual moab::Interface & get_moab()=0
#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
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
CHKERRQ(ierr)
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
MoFEM::Interface & m_field
Definition: NormElement.hpp:99
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
virtual bool check_field(const std::string &name) const =0
check if field is in database
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

Variable Documentation

◆ analytical_solution_types [1/2]

const char* analytical_solution_types[]
Initial value:
= {
"hard_sphere_incident_wave",
"soft_sphere_incident_wave",
"plane_wave",
"hard_cylinder_scatter_wave",
"soft_cylinder_scatter_wave",
"incident_wave"
}

Line command list of analytical solutions

Definition at line 50 of file AnalyticalSolutions_obsolete.hpp.

◆ analytical_solution_types [2/2]

const char* analytical_solution_types[]
Initial value:
= {
"hard_sphere_incident_wave",
"soft_sphere_incident_wave",
"plane_wave",
"hard_cylinder_scatter_wave",
"soft_cylinder_scatter_wave",
"singular_scatter_wave",
"incident_wave",
"no_analytical_solution"
}

Line command list of analytical solutions

Definition at line 55 of file AnalyticalSolutions.hpp.