v0.8.13
Classes | Public Member Functions | Public Attributes | List of all members
MoFEM::HelmholtzElement Struct Reference

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...

#include <users_modules/helmholtz/src/HelmholtzElementObsolete.hpp>

Collaboration diagram for MoFEM::HelmholtzElement:
[legend]

Classes

struct  BlockData
 data for calulation Angular Frequency and wave speed elements mofem_helmholtz_elem More...
 
struct  CommonData
 common data used by volume elements mofem_helmholtz_elem More...
 
struct  FluxData
 data for calulation heat flux mofem_helmholtz_elem More...
 
struct  ImpedanceData
 data for Robin Boundary condition mofem_helmholtz_elem More...
 
struct  IncidentData
 
struct  MyTriFE
 define surface element More...
 
struct  MyVolumeFE
 definition of volume element More...
 
struct  OpGetFieldAtGaussPts
 opearator to caulate pressure and rate of pressure at Gauss points mofem_helmholtz_elem More...
 
struct  OpGetGradImAtGaussPts
 operator to calculate pressure gradient at Gauss points More...
 
struct  OpGetGradReAtGaussPts
 operator to calculate pressure gradient at Gauss points More...
 
struct  OpGetTetPressureImAtGaussPts
 
struct  OpGetTetPressureReAtGaussPts
 operator to calculate pressure at Gauss pts mofem_helmholtz_elem More...
 
struct  OpGetTriPressureImAtGaussPts
 
struct  OpGetTriPressureReAtGaussPts
 operator to calculate pressure at Gauss pts mofem_helmholtz_elem More...
 
struct  OpHelmholtzFlux
 operator for calculate Impedance flux and assemble to right hand side mofem_helmholtz_elem More...
 
struct  OpHelmholtzIncidentWave
 operator for calculate Impedance flux and assemble to right hand side mofem_helmholtz_elem More...
 
struct  OpHelmholtzLhs_A
 
struct  OpHelmholtzRhs_F
 
struct  OpHelmholtzRhs_Im
 
struct  OpHelmholtzRhs_impedance
 
struct  OpHelmholtzRhs_Re
 
struct  OpHoCoordTet
 
struct  OpHoCoordTri
 
struct  OpImpedanceLhs_D
 
struct  OpImpedanceLhs_imreC
 operator to calculate Impedance on body surface and assemble to imaginary lhs of equations More...
 
struct  OpImpedanceLhs_reimC
 operator to calculate Impedance on body surface and assemble to imaginary lhs of equations More...
 

Public Member Functions

MyVolumeFEgetLoopFeRhs ()
 get rhs volume element More...
 
MyVolumeFEgetLoopFeLhs ()
 get lhs volume element More...
 
MyTriFEgetLoopFeRhs_Tri ()
 get rhs volume element More...
 
MyTriFEgetLoopFeFlux ()
 
MyTriFEgetLoopfeIncidentWave ()
 
MyTriFEgetLoopFeImpedanceLhs ()
 
 HelmholtzElement (MoFEM::Interface &m_field)
 
PetscErrorCode addHelmholtzElements (const string problem_name, const string re_field_name, const string im_field_name, const string mesh_nodals_positions="MESH_NODE_POSITIONS")
 add helmholtz element on tets mofem_helmholtz_elem More...
 
PetscErrorCode addHelmholtzFluxElement (const string problem_name, const string re_field_name, const string im_field_name)
 add helmholtz flux element mofem_helmholtz_elem More...
 
PetscErrorCode addHelmholtzIncidentElement (const string problem_name, const string re_field_name, const string im_field_name)
 add helmholtz flux element mofem_helmholtz_elem More...
 
PetscErrorCode addHelmholtzImpedanceElement (const string problem_name, const string re_field_name, const string im_field_name)
 add Impedance element mofem_helmholtz_elem More...
 
PetscErrorCode setHelmholtzFiniteElementRhs_FOperators (string re_field_name, string im_field_name, Vec &F, bool useScalar, const string mesh_nodals_positions="MESH_NODE_POSITIONS")
 this function is used in case of stationary problem to set elements for rhs mofem_helmholtz_elem More...
 
PetscErrorCode setHelmholtzFiniteElementRhsOperators (string re_field_name, string im_field_name, Vec &F, bool useImpedance)
 
PetscErrorCode setHelmholtzFiniteElementLhsOperators (string re_field_name, string im_field_name, Mat A)
 this fucntion is used in case of stationary Helmholtz problem for lhs stiffness term mofem_helmholtz_elem More...
 
PetscErrorCode setHelmholtzFluxFiniteElementRhsOperators (string re_field_name, string im_field_name, Vec &F, const string mesh_nodals_positions="MESH_NODE_POSITIONS")
 
PetscErrorCode setHelmholtzIncidentWaveFiniteElementRhsOperators (string re_field_name, string im_field_name, Vec &F, const string mesh_nodals_positions="MESH_NODE_POSITIONS")
 this function is used in case of statonary for helmholtz incident wave flux terms More...
 
PetscErrorCode setHelmholtzImpedanceFiniteElementLhsOperators (string re_field_name, string im_field_name, Mat A, const string mesh_nodals_positions="MESH_NODE_POSITIONS")
 

Public Attributes

MyVolumeFE feRhs
 cauclate right hand side for tetrahedral elements More...
 
MyVolumeFE feLhs
 
MyTriFE feRhs_Tri
 cauclate right hand side for tetrahedral elements More...
 
MyTriFE feFlux
 
MyTriFE feIncidentWave
 
MyTriFE feImpedanceLhs
 
MoFEM::InterfacemField
 
map< int, BlockDatasetOfBlocks
 maps block set id with appropiate BlockData More...
 
BlockData blockData
 
map< int, FluxDatasetOfFluxes
 maps side set id with appropiate FluxData More...
 
map< int, IncidentDatasetOfIncident
 maps side set id with appropiate FluxData More...
 
map< int, ImpedanceDatasetOfImpedance
 
CommonData commonData
 
MatrixDouble hoCoordsTri
 
MatrixDouble hoCoordsTet
 

Detailed Description

struture grouping operators and data used for helmholtz problems

In 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.

complex-real transformation are implemented for computational efficenicy See Ercegovac, Milos, and Jean-Michel Muller. "Solving Systems of Linear Equations in Complex Domain: Complex E-Method." (2007). for details.

Following implementation separte those three cegories of loops and to each loop attach operator.

Definition at line 53 of file HelmholtzElementObsolete.hpp.

Constructor & Destructor Documentation

◆ HelmholtzElement()

MoFEM::HelmholtzElement::HelmholtzElement ( MoFEM::Interface m_field)

Definition at line 105 of file HelmholtzElementObsolete.hpp.

106  :
107  feRhs(m_field),feRhs_Tri(m_field),feLhs(m_field),feFlux(m_field),feIncidentWave(m_field),feImpedanceLhs(m_field),mField(m_field) {}
MyVolumeFE feRhs
cauclate right hand side for tetrahedral elements
MyTriFE feRhs_Tri
cauclate right hand side for tetrahedral elements

Member Function Documentation

◆ addHelmholtzElements()

PetscErrorCode MoFEM::HelmholtzElement::addHelmholtzElements ( const string  problem_name,
const string  re_field_name,
const string  im_field_name,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)

add helmholtz element on tets mofem_helmholtz_elem

It 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 1595 of file HelmholtzElementObsolete.hpp.

1596  {
1597  PetscFunctionBegin;
1598 
1599  PetscErrorCode ierr;
1600  ErrorCode rval;
1601 
1602  //to do matrix A and C; add Finite Element "HELMHOLTZ_FE"
1603  ierr = mField.add_finite_element("HELMHOLTZ_FE",MF_ZERO); CHKERRQ(ierr );
1604  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_FE",re_field_name); CHKERRQ(ierr);
1605  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_FE",re_field_name); CHKERRQ(ierr);
1606  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_FE",re_field_name); CHKERRQ(ierr);
1607  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_FE",im_field_name); CHKERRQ(ierr);
1608  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_FE",im_field_name); CHKERRQ(ierr);
1609  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_FE",im_field_name); CHKERRQ(ierr);
1610 
1611  if(mField.check_field(mesh_nodals_positions)) {
1612  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_FE",mesh_nodals_positions); CHKERRQ(ierr);
1613  }
1614  ierr = mField.modify_problem_add_finite_element(problem_name,"HELMHOLTZ_FE"); CHKERRQ(ierr);
1615 
1616  //takes skin of block of entities
1617  //Skinner skin(&mField.get_moab());
1618  // loop over all blocksets and get data which name is FluidPressure
1619 
1621 
1622  if(it->get_Cubit_name().compare(0,13,"MAT_HELMHOLTZ") == 0) {
1623 
1624  //get block attributes
1625  vector<double> attributes;
1626  ierr = it->get_Cubit_attributes(attributes); CHKERRQ(ierr);
1627  if(attributes.size()<2) {
1628  SETERRQ1(PETSC_COMM_SELF,1,"not enough block attributes to deffine fluid pressure element, attributes.size() = %d ",attributes.size());
1629  }
1630 
1631  blockData.aNgularfreq = attributes[0];
1632  blockData.sPeed = attributes[1];
1633  setOfBlocks[it->get_msId()].aNgularfreq = attributes[0];
1634  setOfBlocks[it->get_msId()].sPeed = attributes[1];
1635 
1636  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTET,setOfBlocks[it->get_msId()].tEts,true); CHKERR_PETSC(rval);
1637  ierr = mField.add_ents_to_finite_element_by_TETs(setOfBlocks[it->get_msId()].tEts,"HELMHOLTZ_FE"); CHKERRQ(ierr);
1638  }
1639  }
1640 
1641  PetscFunctionReturn(0);
1642  }
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
map< int, BlockData > setOfBlocks
maps block set id with appropiate BlockData
virtual moab::Interface & get_moab()=0
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< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
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
#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
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_TETs(const Range &tets, const std::string &name)=0
add TET entities from range to finite element database given by name
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

◆ addHelmholtzFluxElement()

PetscErrorCode MoFEM::HelmholtzElement::addHelmholtzFluxElement ( const string  problem_name,
const string  re_field_name,
const string  im_field_name 
)

add helmholtz flux element mofem_helmholtz_elem

It get data from helmholtz flux set and define elemenet in moab. Alternatively uses block set with name HELMHOLTZ_FLUX.

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

Definition at line 1654 of file HelmholtzElementObsolete.hpp.

1655  {
1656  PetscFunctionBegin;
1657 
1658  PetscErrorCode ierr;
1659  ErrorCode rval;
1660 
1661  ierr = mField.add_finite_element("HELMHOLTZ_FLUX_FE",MF_ZERO); CHKERRQ(ierr);
1662  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_FLUX_FE",re_field_name); CHKERRQ(ierr);
1663  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_FLUX_FE",re_field_name); CHKERRQ(ierr);
1664  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_FLUX_FE",re_field_name); CHKERRQ(ierr);
1665  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_FLUX_FE",im_field_name); CHKERRQ(ierr);
1666  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_FLUX_FE",im_field_name); CHKERRQ(ierr);
1667  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_FLUX_FE",im_field_name); CHKERRQ(ierr);
1668 
1669  if(mField.check_field("MESH_NODE_POSITIONS")) {
1670  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_FLUX_FE","MESH_NODE_POSITIONS"); CHKERRQ(ierr);
1671  }
1672 
1673  ierr = mField.modify_problem_add_finite_element(problem_name,"HELMHOLTZ_FLUX_FE"); CHKERRQ(ierr);
1674 
1676  ierr = it->get_cubit_bc_data_structure(setOfFluxes[it->get_msId()].dAta); CHKERRQ(ierr);
1677  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,setOfFluxes[it->get_msId()].tRis,true); CHKERR_PETSC(rval);
1678  ierr = mField.add_ents_to_finite_element_by_TRIs(setOfFluxes[it->get_msId()].tRis,"HELMHOLTZ_FLUX_FE"); CHKERRQ(ierr);
1679  }
1680 
1681  //this is alternative method for setting boundary conditions, to bypass bu in cubit file reader.
1682  //not elegant, but good enough
1684  if(it->get_Cubit_name().compare(0,9,"HELMHOLTZ_FLUX") == 0) {
1685  vector<double> data;
1686  ierr = it->get_Cubit_attributes(data); CHKERRQ(ierr);
1687  if(data.size()!=1) {
1688  SETERRQ(PETSC_COMM_SELF,1,"Data inconsistency");
1689  }
1690  strcpy(setOfFluxes[it->get_msId()].dAta.data.name,"HelmholtzFlux");
1691  setOfFluxes[it->get_msId()].dAta.data.flag1 = 1;
1692  setOfFluxes[it->get_msId()].dAta.data.value1 = data[0];
1693  //cerr << setOfFluxes[it->get_msId()].dAta << endl;
1694  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,setOfFluxes[it->get_msId()].tRis,true); CHKERR_PETSC(rval);
1695  ierr = mField.add_ents_to_finite_element_by_TRIs(setOfFluxes[it->get_msId()].tRis,"HELMHOLTZ_FLUX_FE"); CHKERRQ(ierr);
1696 
1697  }
1698  }
1699 
1700 
1701  PetscFunctionReturn(0);
1702  }
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 moab::Interface & get_moab()=0
map< int, FluxData > setOfFluxes
maps side set id with appropiate FluxData
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 DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_TRIs(const Range &tris, const std::string &name)=0
add TRI entities from range to finite element database given by name
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
CHKERRQ(ierr)
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
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
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

◆ addHelmholtzImpedanceElement()

PetscErrorCode MoFEM::HelmholtzElement::addHelmholtzImpedanceElement ( const string  problem_name,
const string  re_field_name,
const string  im_field_name 
)

add Impedance element mofem_helmholtz_elem

It get data from convection set and define elemenet in moab. Alternatively uses block set with name IMPEDANCE.

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

Definition at line 1771 of file HelmholtzElementObsolete.hpp.

1772  {
1773  PetscFunctionBegin;
1774 
1775  PetscErrorCode ierr;
1776  ErrorCode rval;
1777 
1778  ierr = mField.add_finite_element("HELMHOLTZ_IMPEDANCE_FE",MF_ZERO); CHKERRQ(ierr);
1779  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_IMPEDANCE_FE",re_field_name); CHKERRQ(ierr);
1780  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_IMPEDANCE_FE",re_field_name); CHKERRQ(ierr);
1781  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_IMPEDANCE_FE",re_field_name); CHKERRQ(ierr);
1782  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_IMPEDANCE_FE",im_field_name); CHKERRQ(ierr);
1783  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_IMPEDANCE_FE",im_field_name); CHKERRQ(ierr);
1784  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_IMPEDANCE_FE",im_field_name); CHKERRQ(ierr);
1785 
1786  ierr = mField.modify_problem_add_finite_element(problem_name,"HELMHOLTZ_IMPEDANCE_FE"); CHKERRQ(ierr);
1787 
1789  if(it->get_Cubit_name().compare(0,9,"IMPEDANCE") == 0) {
1790 
1791  vector<double> data;
1792  ierr = it->get_Cubit_attributes(data); CHKERRQ(ierr);
1793  if(data.size()!=2) {
1794  SETERRQ(PETSC_COMM_SELF,1,"Data inconsistency");
1795  }
1796  setOfImpedance[it->get_msId()].g = data[0];
1797  setOfImpedance[it->get_msId()].sIgma = data[1];
1798  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,setOfImpedance[it->get_msId()].tRis,true); CHKERR_PETSC(rval);
1799  ierr = mField.add_ents_to_finite_element_by_TRIs(setOfImpedance[it->get_msId()].tRis,"HELMHOLTZ_IMPEDANCE_FE"); CHKERRQ(ierr);
1800 
1801  }
1802  }
1803 
1804 
1805  PetscFunctionReturn(0);
1806  }
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 moab::Interface & get_moab()=0
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 DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_TRIs(const Range &tris, const std::string &name)=0
add TRI entities from range to finite element database given by name
map< int, ImpedanceData > setOfImpedance
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
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
#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
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

◆ addHelmholtzIncidentElement()

PetscErrorCode MoFEM::HelmholtzElement::addHelmholtzIncidentElement ( const string  problem_name,
const string  re_field_name,
const string  im_field_name 
)

add helmholtz flux element mofem_helmholtz_elem

It get data from helmholtz flux set and define elemenet in moab. Alternatively uses block set with name HELMHOLTZ_FLUX.

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

Definition at line 1716 of file HelmholtzElementObsolete.hpp.

1717  {
1718  PetscFunctionBegin;
1719 
1720  PetscErrorCode ierr;
1721  ErrorCode rval;
1722 
1723  ierr = mField.add_finite_element("HELMHOLTZ_INCIDENT_FE",MF_ZERO); CHKERRQ(ierr);
1724  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_INCIDENT_FE",re_field_name); CHKERRQ(ierr);
1725  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_INCIDENT_FE",re_field_name); CHKERRQ(ierr);
1726  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_INCIDENT_FE",re_field_name); CHKERRQ(ierr);
1727  ierr = mField.modify_finite_element_add_field_row("HELMHOLTZ_INCIDENT_FE",im_field_name); CHKERRQ(ierr);
1728  ierr = mField.modify_finite_element_add_field_col("HELMHOLTZ_INCIDENT_FE",im_field_name); CHKERRQ(ierr);
1729  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_INCIDENT_FE",im_field_name); CHKERRQ(ierr);
1730 
1731  if(mField.check_field("MESH_NODE_POSITIONS")) {
1732  ierr = mField.modify_finite_element_add_field_data("HELMHOLTZ_INCIDENT_FE","MESH_NODE_POSITIONS"); CHKERRQ(ierr);
1733  }
1734 
1735  ierr = mField.modify_problem_add_finite_element(problem_name,"HELMHOLTZ_INCIDENT_FE"); CHKERRQ(ierr);
1736 
1737  //this is alternative method for setting boundary conditions, to bypass bu in cubit file reader.
1738  //not elegant, but good enough
1740  if(it->get_Cubit_name().compare(0,9,"INCIDENT") == 0) {
1741  vector<double> data;
1742  ierr = it->get_Cubit_attributes(data); CHKERRQ(ierr);
1743  if(data.size()!=1) {
1744  SETERRQ(PETSC_COMM_SELF,1,"Data inconsistency");
1745  }
1746 
1747  setOfIncident[it->get_msId()].amplitude = data[0];
1748 
1749  //cerr << setOfIncident[it->get_msId()].dAta << endl;
1750  rval = mField.get_moab().get_entities_by_type(it->meshset,MBTRI,setOfIncident[it->get_msId()].tRis,true); CHKERR_PETSC(rval);
1751  ierr = mField.add_ents_to_finite_element_by_TRIs(setOfIncident[it->get_msId()].tRis,"HELMHOLTZ_INCIDENT_FE"); CHKERRQ(ierr);
1752 
1753  }
1754  }
1755 
1756 
1757  PetscFunctionReturn(0);
1758  }
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 moab::Interface & get_moab()=0
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 DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_TRIs(const Range &tris, const std::string &name)=0
add TRI entities from range to finite element database given by name
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Common.hpp:80
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
CHKERRQ(ierr)
map< int, IncidentData > setOfIncident
maps side set id with appropiate FluxData
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
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

◆ getLoopFeFlux()

MyTriFE& MoFEM::HelmholtzElement::getLoopFeFlux ( )

Definition at line 94 of file HelmholtzElementObsolete.hpp.

◆ getLoopFeImpedanceLhs()

MyTriFE& MoFEM::HelmholtzElement::getLoopFeImpedanceLhs ( )

Definition at line 100 of file HelmholtzElementObsolete.hpp.

◆ getLoopfeIncidentWave()

MyTriFE& MoFEM::HelmholtzElement::getLoopfeIncidentWave ( )

Definition at line 97 of file HelmholtzElementObsolete.hpp.

97 { return feIncidentWave; } //incident wave

◆ getLoopFeLhs()

MyVolumeFE& MoFEM::HelmholtzElement::getLoopFeLhs ( )

get lhs volume element

Definition at line 79 of file HelmholtzElementObsolete.hpp.

◆ getLoopFeRhs()

MyVolumeFE& MoFEM::HelmholtzElement::getLoopFeRhs ( )

get rhs volume element

Definition at line 77 of file HelmholtzElementObsolete.hpp.

◆ getLoopFeRhs_Tri()

MyTriFE& MoFEM::HelmholtzElement::getLoopFeRhs_Tri ( )

get rhs volume element

Definition at line 91 of file HelmholtzElementObsolete.hpp.

◆ setHelmholtzFiniteElementLhsOperators()

PetscErrorCode MoFEM::HelmholtzElement::setHelmholtzFiniteElementLhsOperators ( string  re_field_name,
string  im_field_name,
Mat  A 
)

this fucntion is used in case of stationary Helmholtz problem for lhs stiffness term mofem_helmholtz_elem

Definition at line 1864 of file HelmholtzElementObsolete.hpp.

1864  {
1865  PetscFunctionBegin;
1866  map<int,BlockData>::iterator sit = setOfBlocks.begin();
1867  for(;sit!=setOfBlocks.end();sit++) {
1868  //add finite elemen
1869  feLhs.get_op_to_do_Lhs().push_back(new OpHelmholtzLhs_A(re_field_name,re_field_name,A,sit->second,commonData,true));
1870  feLhs.get_op_to_do_Lhs().push_back(new OpHelmholtzLhs_A(im_field_name,im_field_name,A,sit->second,commonData,false));
1871  }
1872  PetscFunctionReturn(0);
1873  }
map< int, BlockData > setOfBlocks
maps block set id with appropiate BlockData

◆ setHelmholtzFiniteElementRhs_FOperators()

PetscErrorCode MoFEM::HelmholtzElement::setHelmholtzFiniteElementRhs_FOperators ( string  re_field_name,
string  im_field_name,
Vec &  F,
bool  useScalar,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)

this function is used in case of stationary problem to set elements for rhs mofem_helmholtz_elem

Definition at line 1812 of file HelmholtzElementObsolete.hpp.

1812  {
1813  PetscFunctionBegin;
1814  map<int,BlockData>::iterator sit = setOfBlocks.begin();
1815 
1816  if(mField.check_field(mesh_nodals_positions)) {
1817 
1818  //feIncidentWave.get_op_to_do_Rhs().push_back(new OpHoCoordTri(mesh_nodals_positions,hoCoordsTri));
1819 
1820  feRhs.get_op_to_do_Rhs().push_back(new OpHoCoordTet(mesh_nodals_positions,hoCoordsTet));
1821 
1822  }
1823 
1824  for(;sit!=setOfBlocks.end();sit++) {
1825  //add finite element
1826  feRhs.get_op_to_do_Rhs().push_back(new OpHelmholtzRhs_F(re_field_name,re_field_name,F,sit->second,commonData,hoCoordsTet,useScalar,true));
1827  feRhs.get_op_to_do_Rhs().push_back(new OpHelmholtzRhs_F(im_field_name,im_field_name,F,sit->second,commonData,hoCoordsTet,useScalar,false));
1828  }
1829  PetscFunctionReturn(0);
1830  }
map< int, BlockData > setOfBlocks
maps block set id with appropiate BlockData
MyVolumeFE feRhs
cauclate right hand side for tetrahedral elements
virtual bool check_field(const std::string &name) const =0
check if field is in database

◆ setHelmholtzFiniteElementRhsOperators()

PetscErrorCode MoFEM::HelmholtzElement::setHelmholtzFiniteElementRhsOperators ( string  re_field_name,
string  im_field_name,
Vec &  F,
bool  useImpedance 
)

Definition at line 1832 of file HelmholtzElementObsolete.hpp.

1832  {
1833  PetscFunctionBegin;
1834 
1835  map<int,BlockData>::iterator sit = setOfBlocks.begin();
1836 
1837  for(;sit!=setOfBlocks.end();sit++) {
1838 
1839  feRhs.get_op_to_do_Rhs().push_back(new OpGetGradReAtGaussPts(re_field_name,commonData));
1840  feRhs.get_op_to_do_Rhs().push_back(new OpGetTetPressureReAtGaussPts(re_field_name,commonData));
1841  feRhs.get_op_to_do_Rhs().push_back(new OpHelmholtzRhs_Re(re_field_name,re_field_name,F,sit->second,commonData));
1842 
1843  feRhs.get_op_to_do_Rhs().push_back(new OpGetGradImAtGaussPts(im_field_name,commonData));
1844  feRhs.get_op_to_do_Rhs().push_back(new OpGetTetPressureImAtGaussPts(im_field_name,commonData));
1845  feRhs.get_op_to_do_Rhs().push_back(new OpHelmholtzRhs_Im(im_field_name,im_field_name,F,sit->second,commonData));
1846 
1847  //cout << "\n useImpedance = \n" << useImpedance << std::endl;
1848  //FIXE ME, NOT WORKING
1849  //if(useImpedance) {
1850  // feIncidentWave.get_op_to_do_Rhs().push_back(new OpHelmholtzRhs_impedance(re_field_name,re_field_name,F,sit->second,commonData,true));
1851  // feIncidentWave.get_op_to_do_Rhs().push_back(new OpHelmholtzRhs_impedance(im_field_name,im_field_name,F,sit->second,commonData,false));
1852  //}
1853  //add finite element
1854  }
1855 
1856  PetscFunctionReturn(0);
1857  }
map< int, BlockData > setOfBlocks
maps block set id with appropiate BlockData
MyVolumeFE feRhs
cauclate right hand side for tetrahedral elements

◆ setHelmholtzFluxFiniteElementRhsOperators()

PetscErrorCode MoFEM::HelmholtzElement::setHelmholtzFluxFiniteElementRhsOperators ( string  re_field_name,
string  im_field_name,
Vec &  F,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)

Definition at line 1876 of file HelmholtzElementObsolete.hpp.

1876  {
1877  PetscFunctionBegin;
1878  bool ho_geometry = false;
1879  if(mField.check_field(mesh_nodals_positions)) {
1880  ho_geometry = true;
1881  }
1882  map<int,FluxData>::iterator sit = setOfFluxes.begin();
1883  for(;sit!=setOfFluxes.end();sit++) {
1884  //add finite element
1885  feFlux.get_op_to_do_Rhs().push_back(new OpHelmholtzFlux(re_field_name,im_field_name,F,blockData,sit->second,ho_geometry));
1886  }
1887  PetscFunctionReturn(0);
1888  }
map< int, FluxData > setOfFluxes
maps side set id with appropiate FluxData
virtual bool check_field(const std::string &name) const =0
check if field is in database

◆ setHelmholtzImpedanceFiniteElementLhsOperators()

PetscErrorCode MoFEM::HelmholtzElement::setHelmholtzImpedanceFiniteElementLhsOperators ( string  re_field_name,
string  im_field_name,
Mat  A,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)

Definition at line 1912 of file HelmholtzElementObsolete.hpp.

1912  {
1913  PetscFunctionBegin;
1914  bool ho_geometry = false;
1915  //if(mField.check_field(mesh_nodals_positions)) {
1916  // ho_geometry = true;
1917  //}
1918  map<int,ImpedanceData>::iterator sit = setOfImpedance.begin();
1919 
1920  if(mField.check_field(mesh_nodals_positions)) {
1921  // ho_geometry = true;
1922  feIncidentWave.get_op_to_do_Rhs().push_back(new OpHoCoordTri(mesh_nodals_positions,hoCoordsTri));
1923  }
1924 
1925  for(;sit!=setOfImpedance.end();sit++) {
1926  //add finite element
1927  feImpedanceLhs.get_op_to_do_Lhs().push_back(new OpImpedanceLhs_D(re_field_name,re_field_name,A,sit->second,blockData,hoCoordsTri,ho_geometry));
1928  feImpedanceLhs.get_op_to_do_Lhs().push_back(new OpImpedanceLhs_D(im_field_name,im_field_name,A,sit->second,blockData,hoCoordsTri,ho_geometry));
1929  feImpedanceLhs.get_op_to_do_Lhs().push_back(new OpImpedanceLhs_reimC(re_field_name,im_field_name,A,sit->second,blockData,hoCoordsTri,ho_geometry));
1930  feImpedanceLhs.get_op_to_do_Lhs().push_back(new OpImpedanceLhs_imreC(im_field_name,re_field_name,A,sit->second,blockData,hoCoordsTri,ho_geometry));
1931  }
1932  PetscFunctionReturn(0);
1933  }
map< int, ImpedanceData > setOfImpedance
virtual bool check_field(const std::string &name) const =0
check if field is in database

◆ setHelmholtzIncidentWaveFiniteElementRhsOperators()

PetscErrorCode MoFEM::HelmholtzElement::setHelmholtzIncidentWaveFiniteElementRhsOperators ( string  re_field_name,
string  im_field_name,
Vec &  F,
const string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)

this function is used in case of statonary for helmholtz incident wave flux terms

Definition at line 1893 of file HelmholtzElementObsolete.hpp.

1893  {
1894  PetscFunctionBegin;
1895  bool ho_geometry = false;
1896  map<int,IncidentData>::iterator sit = setOfIncident.begin();
1897 
1898  if(mField.check_field(mesh_nodals_positions)) {
1899 
1900  feIncidentWave.get_op_to_do_Rhs().push_back(new OpHoCoordTri(mesh_nodals_positions,hoCoordsTri));
1901  }
1902 
1903  for(;sit!=setOfIncident.end();sit++) {
1904  //add finite element
1905  feIncidentWave.get_op_to_do_Rhs().push_back(new OpHelmholtzIncidentWave(re_field_name,re_field_name,F,blockData,sit->second,hoCoordsTri,true,ho_geometry));
1906  feIncidentWave.get_op_to_do_Rhs().push_back(new OpHelmholtzIncidentWave(im_field_name,im_field_name,F,blockData,sit->second,hoCoordsTri,false,ho_geometry));
1907 
1908  }
1909  PetscFunctionReturn(0);
1910  }
map< int, IncidentData > setOfIncident
maps side set id with appropiate FluxData
virtual bool check_field(const std::string &name) const =0
check if field is in database

Member Data Documentation

◆ blockData

BlockData MoFEM::HelmholtzElement::blockData

Definition at line 120 of file HelmholtzElementObsolete.hpp.

◆ commonData

CommonData MoFEM::HelmholtzElement::commonData

Definition at line 172 of file HelmholtzElementObsolete.hpp.

◆ feFlux

MyTriFE MoFEM::HelmholtzElement::feFlux

Definition at line 93 of file HelmholtzElementObsolete.hpp.

◆ feImpedanceLhs

MyTriFE MoFEM::HelmholtzElement::feImpedanceLhs

Definition at line 99 of file HelmholtzElementObsolete.hpp.

◆ feIncidentWave

MyTriFE MoFEM::HelmholtzElement::feIncidentWave

Definition at line 96 of file HelmholtzElementObsolete.hpp.

◆ feLhs

MyVolumeFE MoFEM::HelmholtzElement::feLhs

Definition at line 78 of file HelmholtzElementObsolete.hpp.

◆ feRhs

MyVolumeFE MoFEM::HelmholtzElement::feRhs

cauclate right hand side for tetrahedral elements

Definition at line 76 of file HelmholtzElementObsolete.hpp.

◆ feRhs_Tri

MyTriFE MoFEM::HelmholtzElement::feRhs_Tri

cauclate right hand side for tetrahedral elements

Definition at line 90 of file HelmholtzElementObsolete.hpp.

◆ hoCoordsTet

MatrixDouble MoFEM::HelmholtzElement::hoCoordsTet

Definition at line 378 of file HelmholtzElementObsolete.hpp.

◆ hoCoordsTri

MatrixDouble MoFEM::HelmholtzElement::hoCoordsTri

Definition at line 332 of file HelmholtzElementObsolete.hpp.

◆ mField

MoFEM::Interface& MoFEM::HelmholtzElement::mField

Definition at line 104 of file HelmholtzElementObsolete.hpp.

◆ setOfBlocks

map<int,BlockData> MoFEM::HelmholtzElement::setOfBlocks

maps block set id with appropiate BlockData

Definition at line 119 of file HelmholtzElementObsolete.hpp.

◆ setOfFluxes

map<int,FluxData> MoFEM::HelmholtzElement::setOfFluxes

maps side set id with appropiate FluxData

Definition at line 129 of file HelmholtzElementObsolete.hpp.

◆ setOfImpedance

map<int,ImpedanceData> MoFEM::HelmholtzElement::setOfImpedance

Definition at line 145 of file HelmholtzElementObsolete.hpp.

◆ setOfIncident

map<int,IncidentData> MoFEM::HelmholtzElement::setOfIncident

maps side set id with appropiate FluxData

Definition at line 135 of file HelmholtzElementObsolete.hpp.


The documentation for this struct was generated from the following file: