Commit ed067520 authored by perego's avatar perego
Browse files

cleaning

parent bebc349b
......@@ -42,6 +42,11 @@
#include <life/lifealg/LinearEpetraOperator.hpp>
#include <boost/numeric/ublas/matrix.hpp>
// Tell the compiler to ignore specific kind of warnings:
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wextra"
#include <Epetra_Import.h>
// Tell the compiler to ignore specific kind of warnings:
......@@ -74,7 +79,6 @@ public:
typedef boost::shared_ptr<raw_vector> vector_ptr;
typedef std::vector<vector_ptr> vector_container;
enum Structure {Diagonal, LowerTriangular, UpperTriangular, NoStructure, Rectangular};
//@}
......
......@@ -848,12 +848,6 @@ void CurrentFE::computeQuadNodes()
GeoVector quadNode(coorMap(M_quadRule->quadPointCoor(iterQuadNode)));
for(UInt i=0; i< quadNode.size(); i++)
M_quadNodes[iterQuadNode][i] = quadNode[i];
/* coorMap( M_quadNodes[iterQuadNode][0],
M_quadNodes[iterQuadNode][1],
M_quadNodes[iterQuadNode][2],
M_quadRule->quadPointCoor( iterQuadNode, 0 ),
M_quadRule->quadPointCoor( iterQuadNode, 1 ),
M_quadRule->quadPointCoor( iterQuadNode, 2 ) );*/
}
M_quadNodesUpdated=true;
}
......
......@@ -51,8 +51,7 @@ DOF::DOF( const DOFLocalPattern& fePattern) : M_elementDofPattern( fePattern ),
M_numElement( 0 ), M_nbLocalPeaks( 0 ), M_nbLocalRidges( 0 ), M_nbLocalFacets( 0 ), M_localToGlobal(),
M_localToGlobalByBdFacet()
{
//Getting the face
for ( UInt i = 0; i < 5; ++i )
for ( UInt i = 0; i < 5; ++i )
M_dofPositionByEntity[ i ] = 0;
}
......
......@@ -314,7 +314,6 @@ void DOF::update( MeshType& mesh )
UInt i, l, ie;
// Total number of degree of freedom for each element
UInt nldof = nbLocalDofPerElement
+ nbLocalDofPerRidge * M_nbLocalRidges
+ nbLocalDofPerPeak * M_nbLocalPeaks
......@@ -329,17 +328,10 @@ void DOF::update( MeshType& mesh )
+ nbGlobalPeaks * nbLocalDofPerPeak
+ nbGlobalFacets * nbLocalDofPerFacet;
// Reshape the container to fit the needs
M_localToGlobal.reshape( nldof, M_numElement );
// Make sure the mesh has everything needed
UInt gcount( 0 );
UInt lcount;
UInt lc;
bool update_ridges( nbLocalDofPerRidge != 0 && ! mesh.hasLocalRidges() && (MeshType::geoDimensions == 3));
if ( update_ridges )
mesh.updateElementRidges();
......@@ -348,37 +340,49 @@ void DOF::update( MeshType& mesh )
if ( update_facets )
mesh.updateElementFacets();
UInt gcount( 0 );
UInt lcount;
UInt lc;
// Peak Based DOFs
M_dofPositionByEntity[ 0 ] = gcount;
if ( nbLocalDofPerPeak > 0 )
for ( ie = 0; ie < M_numElement; ++ie )//for each element
{
lc = 0;
for ( i = 0; i < M_nbLocalPeaks; ++i )//for each vertex in the element
{
ID pID = mesh.element( ie ).point( i ).id();
for ( l = 0; l < nbLocalDofPerPeak; ++l )//for each degree of freedom per vertex
{
// label of the ith point of the mesh element
M_localToGlobal( lc++, ie ) = gcount + mesh.element( ie ).point( i ).id() * nbLocalDofPerPeak + l;
M_localToGlobal( lc++, ie ) = gcount + pID * nbLocalDofPerPeak + l;
}
}
}
// Ridge Based DOFs
gcount += nbLocalDofPerPeak * nbGlobalPeaks;//dof per vertex * total # vertices
lcount = nbLocalDofPerPeak * M_nbLocalPeaks;
// Ridge Based DOFs
M_dofPositionByEntity[ 1 ] = gcount;
if ( nbLocalDofPerRidge > 0 )
for ( ie = 0; ie < M_numElement; ++ie )
{
lc = lcount;
for ( i = 0; i < M_nbLocalRidges; ++i )
{
UInt eID = mesh.ridge(mesh.localRidgeId(ie, i)).id();
UInt rID = mesh.ridge(mesh.localRidgeId(ie, i)).id();
for ( l = 0; l < nbLocalDofPerRidge; ++l )
M_localToGlobal( lc++, ie ) = gcount + eID * nbLocalDofPerRidge + l;
M_localToGlobal( lc++, ie ) = gcount + rID * nbLocalDofPerRidge + l;
}
}
gcount += nbGlobalRidges * nbLocalDofPerRidge;
lcount += nbLocalDofPerRidge * M_nbLocalRidges;
//Facet based DOFs
//Facet based DOFs
gcount += nbGlobalRidges * nbLocalDofPerRidge;
lcount += nbLocalDofPerRidge * M_nbLocalRidges;
M_dofPositionByEntity[ 2 ] = gcount;
if ( nbLocalDofPerFacet > 0 )
for ( ie = 0; ie < M_numElement; ++ie )
{
......@@ -391,25 +395,29 @@ void DOF::update( MeshType& mesh )
M_localToGlobal( lc++, ie ) = gcount + fID * nbLocalDofPerFacet + l;
}
}
// Element Based DOFs
gcount += nbGlobalFacets * nbLocalDofPerFacet;
lcount += nbLocalDofPerFacet * M_nbLocalFacets;
// Element Based DOFs
M_dofPositionByEntity[ 3 ] = gcount;
if ( nbLocalDofPerElement > 0 )
for ( ie = 0; ie < M_numElement; ++ie )
{
lc = lcount;
ID eID = mesh.element( ie ).id();
for ( l = 0; l < nbLocalDofPerElement; ++l )
M_localToGlobal( lc++, ie ) = gcount + mesh.element( ie ).id() * nbLocalDofPerElement + l;
M_localToGlobal( lc++, ie ) = gcount + eID * nbLocalDofPerElement + l;
}
gcount += nbGlobalElements * nbLocalDofPerElement;
UInt nBElemRidges = geoBShape_Type::S_numRidges; // Number of boundary facet's vertices
UInt nBElemFacets = geoBShape_Type::S_numFacets; // Number of boundary facet's edges
M_dofPositionByEntity[ 4 ] = gcount;
ASSERT_POS( gcount == M_totalDof , "Something wrong in Dof Setup " << gcount << " " << M_totalDof ) ;
//Building map of global DOF on boundary facets
UInt nBElemRidges = geoBShape_Type::S_numRidges; // Number of boundary facet's vertices
UInt nBElemFacets = geoBShape_Type::S_numFacets; // Number of boundary facet's edges
std::vector<ID> globalDOFOnBdFacet(nbLocalDofPerPeak*nBElemRidges + nBElemFacets*nbLocalDofPerRidge + nbLocalDofPerFacet);
M_localToGlobalByBdFacet.resize(mesh.numBFacets());
......@@ -451,8 +459,8 @@ void DOF::update( MeshType& mesh )
if ( update_ridges )
mesh.cleanElementRidges();
if ( update_facets )
mesh.cleanElementRidges();
if ( update_facets )
mesh.cleanElementFacets();
}
......
......@@ -32,6 +32,7 @@
@date 00-11-2002
@contributor Samuel Quinodoz <samuel.quinodoz@epfl.ch>
@contributor Mauro Perego <mperego@fsu.edu>
@mantainer Samuel Quinodoz <samuel.quinodoz@epfl.ch>
This file contains the class which may be used to update and hold the connections between the dof
......@@ -63,7 +64,8 @@ namespace LifeV
/*!
\class DOFInterface3Dto3D
Base class which holds the connections of the dof in two matching meshes
Base class which builds and holds the connections of the DOF associated with matching facets with given flags.
The connections can be between two different matching meshes, or within the same mesh (having matching boundary facets).
In order to hold the interface connections the user must give the
ReferenceFE elements and DOF used in both meshes. The connections may be
......@@ -80,7 +82,6 @@ public:
//@{
typedef boost::numeric::ublas::vector<Real> Vector;
typedef boost::function<bool ( const std::vector<Real>&, const std::vector<Real>&, const Real& )> fct;
//@}
//! @name Constructor & Destructor
......@@ -150,12 +151,20 @@ public:
const Real& tol,
Int const* const flag3 = 0 );
//! This method builds the DOF connections between two matching surfaces belonging to the same mesh
/*!
\param mesh the mesh in which we want to make the computations
\param flag1 the marker of the first set of facets in the mesh
\param flag2 the marker of facets to be connected with facets marked with flag1
\param tol tolerance for connecting points of both meshes at the interface
\param coupled a function of points p1 and p2, that returns true if the points are coupled, false otherwise.
points p1 and p2 are constituted of std::vector<Real>(3) containing the coordinates.
*/
template <typename MeshType>
void update( MeshType& mesh,
const markerID_Type& flag1,
const markerID_Type& flag2,
const fct& coupled, const Real& tol );
const Real& tol, const fct& coupled );
//! This method interpolate data when using different FE
......@@ -180,6 +189,7 @@ public:
//! This method returns the corresponding dof object when interpolation is used
const UInt& numTotalDof() const {return M_dof->numTotalDof();}
//! reference to the list of connected facets.
const std::list< std::pair<ID, ID> >& connectedFacetMap() const {return M_facetToFacetConnectionList;}
//@}
......@@ -189,6 +199,7 @@ private:
//! STL iterator type for the lists
typedef std::list< std::pair<ID, ID> >::iterator Iterator;
//! @name Private Methods
//@{
......@@ -199,6 +210,8 @@ private:
\param mesh2 the mesh which provides de data at the interface
\param flag2 the marker of the interface in the mesh2
\param tol tolerance for connecting points of both meshes at the interface
\param coupled a function of points p1 and p2, that returns true if the points are coupled, false otherwise.
points p1 and p2 are constituted of std::vector<Real>(3) containing the coordinates.
*/
template <typename MeshType>
void updateFacetConnections( const MeshType& mesh1, const markerID_Type& flag1,
......@@ -210,11 +223,15 @@ private:
\param mesh2 the mesh which provides de data at the interface
\param dof2 the DOF object of the mesh which provides de data at the interface
\param tol tolerance for connecting points of both meshes at the interface
*/
\param coupled a function of points p1 and p2, that returns true if the points are coupled, false otherwise.
points p1 and p2 are constituted of std::vector<Real>(3) containing the coordinates.
\param flag3 the marker of a region of interface in the mesh1
\brief{The parameter flag3 is used in test_meshReorder to export the part of interface determined by flag3 on mesh2.}
*/
template <typename MeshType>
void updateDofConnections( const MeshType& mesh1, const DOF& dof1,
const MeshType& mesh2, const DOF& dof2, const Real& tol, const fct& coupled,
Int const* const flag1 = 0 );
Int const* const flag3 = 0 );
//@}
......@@ -278,7 +295,7 @@ void DOFInterface3Dto3D::update( MeshType& mesh1, const markerID_Type& flag1,
template <typename MeshType>
void DOFInterface3Dto3D::update( MeshType& mesh, const markerID_Type& flag1,
const markerID_Type& flag2, const fct& coupled, const Real& tol )
const markerID_Type& flag2, const Real& tol, const fct& coupled)
{
// Updating facet connections at the interface
updateFacetConnections( mesh, flag1, mesh, flag2, tol, coupled );
......@@ -441,7 +458,7 @@ void DOFInterface3Dto3D::updateFacetConnections( const MeshType& mesh1, const ma
UInt bdnF1 = mesh1.numBFacets(); // Number of boundary facets in mesh1
UInt bdnF2 = mesh2.numBFacets(); // Number of boundary facets mesh2
markerID_Type marker1, marker2;
markerID_Type marker1;
std::set<ID> facetsFlagged2;
......@@ -526,13 +543,10 @@ void DOFInterface3Dto3D::updateFacetConnections( const MeshType& mesh1, const ma
\param mesh2 the mesh which provides the data at the interface
\param dof2 the DOF object of the mesh which provides the data at the interface
\param tol tolerance for connecting points of both meshes at the interface
\param flag1 the marker of a region of interface in the mesh1
\brief{The parameter flag1 is used in test_meshReorder to export the part of interface determined by flag1 on mesh2.}
*/
template <typename Mesh>
void DOFInterface3Dto3D::updateDofConnections( const Mesh& mesh1, const DOF& dof1,
const Mesh& mesh2, const DOF& dof2, const Real& tol, const fct& coupled, Int const* const flag1)
const Mesh& mesh2, const DOF& dof2, const Real& tol, const fct& coupled, Int const* const flag3)
{
CurrentBoundaryFE feBd1( M_refFE1->boundaryFE(), getGeometricMap( mesh1 ).boundaryMap() );
CurrentBoundaryFE feBd2( M_refFE2->boundaryFE(), getGeometricMap( mesh2 ).boundaryMap() );
......@@ -542,6 +556,8 @@ void DOFInterface3Dto3D::updateDofConnections( const Mesh& mesh1, const DOF& dof
// Loop on facets at the interface (matching facets)
for ( Iterator i = M_facetToFacetConnectionList.begin(); i != M_facetToFacetConnectionList.end(); ++i )
{
if ( flag3 != 0 && Int(mesh1.boundaryFacet(i->first).marker()) != *flag3) continue;
feBd1.update( mesh1.boundaryFacet( i->first ) ); // Updating facet information on mesh1
feBd2.update( mesh2.boundaryFacet( i->second ) ); // Updating facet information on mesh2
......@@ -576,200 +592,6 @@ void DOFInterface3Dto3D::updateDofConnections( const Mesh& mesh1, const DOF& dof
M_dofToDofConnectionList.clear();
}
/*
* template <typename Mesh>
void DOFInterface3Dto3D::updateDofConnections( const Mesh& mesh1, const DOF& dof1,
const Mesh& mesh2, const DOF& dof2, const Real& tol, const fct& coupled, Int const* const flag1)
{
typedef typename Mesh::elementShape_Type GeoShape;
typedef typename Mesh::facetShape_Type GeoBShape;
UInt nbVertexPerFacet = GeoBShape::S_numVertices; // Number of facet's vertices
UInt nbRidgePerFacet = GeoBShape::S_numRidges; // Number of facet's ridges
UInt nbDofPerVertex1 = M_refFE1->nbDofPerVertex(); // number of DOF per vertices on mesh1
UInt nbDofPerRidge1 = M_refFE1->nbDofPerRidge(); // number of DOF per ridges on mesh1
UInt nbDofPerFacet1 = M_refFE1->nbDofPerFacet(); // number of DOF per facets on mesh1
UInt nbDofPerVertex2 = M_refFE2->nbDofPerVertex(); // number of DOF per vertices on mesh2
UInt nbDofPerRidge2 = M_refFE2->nbDofPerRidge(); // number of DOF per ridges on mesh2
UInt nbDofPerFacet2 = M_refFE2->nbDofPerFacet(); // number of DOF per facets on mesh2
UInt nbVertexPerElement = GeoShape::S_numVertices; // Number of element's vertices
UInt nbRidgePerElement = GeoShape::S_numRidges; // Number of element's ridges
UInt nbVertexDofPerFacet1 = nbDofPerVertex1 * nbVertexPerFacet; // number of vertex's DOF on a facet on mesh1
UInt nbRidgeDofPerFacet1 = nbDofPerRidge1 * nbRidgePerFacet; // number of ridge's DOF on a facet on mesh1
UInt nbVertexDofPerFacet2 = nbDofPerVertex2 * nbVertexPerFacet; // number of vertex's DOF on a facet on mesh2
UInt nbRidgeDofPerFacet2 = nbDofPerRidge2 * nbRidgePerFacet; // number of ridge's DOF on a facet on mesh2
UInt nbVertexDofPerElement1 = nbVertexPerElement * nbDofPerVertex1; // number of vertex's DOF on a Element on mesh1
UInt nbRidgeDofPerElement1 = nbRidgePerElement * nbDofPerRidge1; // number of ridge's DOF on a Element on mesh1
UInt nbVertexDofPerElement2 = nbVertexPerElement * nbDofPerVertex2; // number of vertex's DOF on a Element on mesh2
UInt nbRidgeDofPerElement2 = nbRidgePerElement * nbDofPerRidge2; // number of ridge's DOF on a Element on mesh2
ID iElAd1, iVeEl1, iFaEl1, iEdEl1, iElAd2, iVeEl2, iFaEl2, iEdEl2, lDof1, lDof2, gDof1, gDof2;
std::vector<Real> p1( nDimensions ), p2( nDimensions );
bool test = false;
CurrentBoundaryFE feBd1( M_refFE1->boundaryFE(), getGeometricMap( mesh1 ).boundaryMap() );
CurrentBoundaryFE feBd2( M_refFE2->boundaryFE(), getGeometricMap( mesh2 ).boundaryMap() );
// Loop on facets at the interface (matching facets)
for ( Iterator i = M_facetToFacetConnectionList.begin(); i != M_facetToFacetConnectionList.end(); ++i )
{
feBd1.update( mesh1.boundaryFacet( i->first ) ); // Updating facet information on mesh1
feBd2.update( mesh2.boundaryFacet( i->second ) ); // Updating facet information on mesh2
iElAd1 = mesh1.boundaryFacet( i->first ).firstAdjacentElementIdentity(); // id of the element adjacent to the facet (mesh1)
iElAd2 = mesh2.boundaryFacet( i->second ).firstAdjacentElementIdentity(); // id of the element adjacent to the facet (mesh2)
iFaEl1 = mesh1.boundaryFacet( i->first ).firstAdjacentElementPosition(); // local id of the facet in its adjacent element (mesh1)
iFaEl2 = mesh2.boundaryFacet( i->second ).firstAdjacentElementPosition(); // local id of the facet in its adjacent element (mesh2)
// Vertex based DOF on mesh1
if ( nbDofPerVertex1 )
{
// loop on facet vertices (mesh1)
for ( ID iVeFa1 = 0; iVeFa1 < nbVertexPerFacet; ++iVeFa1 )
{
iVeEl1 = GeoShape::facetToPoint( iFaEl1, iVeFa1 ); // local vertex number (in element)
if ( flag1 != 0 && Int(mesh1.boundaryFacet(i->first).point(iVeFa1).marker()) != *flag1) continue;
// Loop number of DOF per vertex (mesh1)
for ( ID l = 0; l < nbDofPerVertex1; ++l )
{
lDof1 = iVeFa1 * nbDofPerVertex1 + l ; // local Dof
feBd1.coorMap( p1[0], p1[1], p1[2], feBd1.refFE.xi( lDof1 ), feBd1.refFE.eta( lDof1 ) ); // Nodal coordinates on the current facet (mesh1)
// loop on facet vertices (mesh2)
for ( ID iVeFa2 = 0; iVeFa2 < nbVertexPerFacet; ++iVeFa2 )
{
iVeEl2 = GeoShape::facetToPoint( iFaEl2, iVeFa2 ); // local vertex number (in element)
// Loop on number of DOF per vertex (mesh2)
for ( ID k = 0; k < nbDofPerVertex2; ++k )
{
lDof2 = iVeFa2 * nbDofPerVertex2 + k ; // local Dof
feBd2.coorMap( p2[0], p2[1], p2[2], feBd2.refFE.xi( lDof2 ), feBd2.refFE.eta( lDof2 ) ); // Nodal coordinates on the current facet (mesh2)
// Do the nodal points match?
if ( (test = coupled( p1, p2, tol )) )
{
gDof1 = dof1.localToGlobalMap( iElAd1, iVeEl1 * nbDofPerVertex1 + l ); // Global DOF on mesh1
gDof2 = dof2.localToGlobalMap( iElAd2, iVeEl2 * nbDofPerVertex2 + k ); // Global DOF on mesh2
std::pair<ID, ID> locDof( gDof1, gDof2 );
M_dofToDofConnectionList.push_front( locDof ); // Updating the list of dof connections
break;
}
}
// Exit the loop on facet vertices on mesh2?
if ( test )
{
test = false;
break;
}
}
}
}
}
// Ridge based DOF on mesh1
if ( nbDofPerRidge1 )
{
// loop on facet ridges (mesh1)
for ( ID iEdFa1 = 0; iEdFa1 < nbRidgePerFacet; ++iEdFa1 )
{
iEdEl1 = GeoShape::facetToRidge( iFaEl1, iEdFa1 ); // local ridge number (in element)
// Loop number of DOF per ridge (mesh1)
for ( ID l = 0; l < nbDofPerRidge1; ++l )
{
lDof1 = nbVertexDofPerFacet1 + iEdFa1 * nbDofPerRidge1 + l ; // local Dof
feBd1.coorMap( p1[0], p1[1], p1[2], feBd1.refFE.xi( lDof1 ), feBd1.refFE.eta( lDof1 ) ); // Nodal coordinates on the current facet (mesh1)
// loop on facet ridges (mesh2)
for ( ID iEdFa2 = 0; iEdFa2 < nbVertexPerFacet; ++iEdFa2 )
{
iEdEl2 = GeoShape::facetToRidge( iFaEl2, iEdFa2 ); // local ridge number (in element)
// Loop number of DOF per ridge (mesh1)
for ( ID k = 0; k < nbDofPerRidge2; ++k )
{
lDof2 = nbVertexDofPerFacet2 + iEdFa2 * nbDofPerRidge2 + k; // local Dof
feBd2.coorMap( p2[0], p2[1], p2[2], feBd2.refFE.xi( lDof2 ), feBd2.refFE.eta( lDof2 ) ); // Nodal coordinates on the current facet (mesh2)
// Do the nodal points match?
if ( (test = coupled( p1, p2, tol )) )
{
gDof1 = dof1.localToGlobalMap( iElAd1, nbVertexDofPerElement1 + iEdEl1 * nbDofPerRidge1 + l ); // Global Dof on mesh1
gDof2 = dof2.localToGlobalMap( iElAd2, nbVertexDofPerElement2 + iEdEl2 * nbDofPerRidge2 + k ); // Global Dof on mesh2
std::pair<ID, ID> locDof( gDof1, gDof2 );
M_dofToDofConnectionList.push_front( locDof ); // Updating the list of dof connections
break;
}
}
// Exit the loop on facet ridges on mesh2?
if ( test )
{
test = false;
break;
}
}
}
}
}
// Facet based DOF on mesh1
for ( ID l = 0; l < nbDofPerFacet1; ++l )
{
lDof1 = nbRidgeDofPerFacet1 + nbVertexDofPerFacet1 + l; // local Dof
feBd1.coorMap( p1[0], p1[1], p1[2], feBd1.refFE.xi( lDof1 ), feBd1.refFE.eta( lDof1 ) ); // Nodal coordinates on the current facet (mesh1)
for ( ID k = 0; k < nbDofPerFacet2; ++k )
{
lDof2 = nbRidgeDofPerFacet2 + nbVertexDofPerFacet2 + k; // local Dof
feBd2.coorMap( p2[0], p2[1], p2[2], feBd2.refFE.xi( lDof2), feBd2.refFE.eta( lDof2 ) ); // Nodal coordinates on the current facet (mesh2)
// Do the nodal points match?
if ( coupled( p1, p2, tol ) )
{
gDof1 = dof1.localToGlobalMap( iElAd1, nbRidgeDofPerElement1 + nbVertexDofPerElement1 + iFaEl1 * nbDofPerFacet1 + l ); // Global Dof in mesh1
gDof2 = dof2.localToGlobalMap( iElAd2, nbRidgeDofPerElement2 + nbVertexDofPerElement2 + iFaEl2 * nbDofPerFacet2 + k ); // Global Dof in mesh2
std::pair<ID, ID> locDof( gDof1, gDof2 );
M_dofToDofConnectionList.push_front( locDof ); // Updating the list of dof connections
break;
}
}
}
}
// Updating the map containter with the connections
for ( Iterator i = M_dofToDofConnectionList.begin(); i != M_dofToDofConnectionList.end(); ++i )
{
M_localDofMap[ i->first ] = i->second;
}
// Saving memory
M_dofToDofConnectionList.clear();
}
*/
}
#endif
......@@ -184,50 +184,48 @@ public:
//! Return the number of degrees of freedom located on the edges (1D structures)
const UInt& nbDofPerEdge() const
{
ASSERT(M_dim >=1, "No edge available for that dimension");
return M_nbDofPerDimEntity[1];
};
//! Return the number of degrees of freedom located on the edges (1D structures)
//! Return the number of degrees of freedom located on the peak (vertex in 3D).
UInt nbDofPerPeak() const
{
return (M_dim >= 3) ? M_nbDofPerDimEntity[M_dim-3] : 0;
};
//! Return the number of degrees of freedom located on the ridge. (edge in 3D)
UInt nbDofPerRidge() const
{
return (M_dim >= 2) ? M_nbDofPerDimEntity[M_dim-2] : 0;
};
//! Return the number of degrees of freedom located on the facet. (face in 3D)
UInt nbDofPerFacet() const
{
return (M_dim >= 1) ? M_nbDofPerDimEntity[M_dim-1] : 0;
};
//! Return the number of degrees of freedom located on the element. (volume in 3D)
const UInt& nbDofPerElement() const
{
return M_nbDofPerDimEntity[M_dim];
};
//! Return the number of degrees of freedom located on the faces (2D structures).
/*!Beware that in the 2D case, the face of a triangle is the triangle itself
(use edges or vertices if you want to access substructures).
*/
const UInt& nbDofPerFace() const
{
ASSERT(M_dim >=2, "No face available for that dimension");
return M_nbDofPerDimEntity[2];
};
UInt nbDofPerFacet() const
{
return (M_dim >= 1) ? M_nbDofPerDimEntity[M_dim-1] : 0;
};
//! Return the number of degrees of freedom located in the volume (3D structures).
const UInt& nbDofPerVolume() const
{
// ASSERT(M_dim >=3, "No volume available for that dimension");
return M_nbDofPerDimEntity[3];
};
//! Return the number of degrees of freedom located in the volume (3D structures).
const UInt& nbDofPerElement() const
{
return M_nbDofPerDimEntity[M_dim];
};
//! Return the number of degrees of freedom located per structDim object.
/*! For example, if we want to access the vertices, structDim should be 0,
if we want the edges, then it should be 1,...
......
......@@ -327,7 +327,6 @@ public:
vector_type feToFEInterpolate(const FESpace<mesh_Type,map_Type>& originalSpace,
const vector_type& originalVector, const MapEpetraType& outputMapType = Unique) const;
//! This method reconstruct a gradient of a solution in the present FE space.
/*!
The goal of this method is to build an approximation of the gradient of a given
......@@ -423,7 +422,6 @@ private:
//! @name Private Methods
//@{
//! copy constructor
FESpace( const FESpace& fespace );
......@@ -1919,7 +1917,6 @@ RT0ToP0Interpolate(const FESpace<mesh_Type,map_Type>& OriginalSpace,
UInt iGlobalFacet( mesh()->localFacetId( elemId, iter_dof ) );
// Select if the current facet is coherent or not with the orientation. If yes use +, if not use -.
//if ( mesh()->faceElement( iGlobalFacet, 0 ) != iElem )
if ( mesh()->facet( iGlobalFacet ).firstAdjacentElementIdentity() != iElem )
{
// Loop on each component of the selected finite element.
......
......@@ -324,7 +324,7 @@ PostProcessingBoundary<MeshType>::PostProcessingBoundary( meshPtr_Type meshPtr,
M_vectorNumberingPerFacetVector(M_numFESpaces), M_dofGlobalIdVector(M_numFESpaces),
M_currentBdFEPtrVector(currentBdFEVector), M_dofPtrVector(dofVector),
M_meshPtr( meshPtr ), M_epetraMapPtr( new MapEpetra(epetraMap) ),
M_geoDimension(MeshType::ElementShape_Type::S_nDimensions)
M_geoDimension(MeshType::geoDimensions)
{
for (UInt iFESpace=0; iFESpace<M_numFESpaces; ++iFESpace)
{
......@@ -363,7 +363,7 @@ PostProcessingBoundary<MeshType>::PostProcessingBoundary( meshPtr_Type mesh,
M_vectorNumberingPerFacetVector(M_numFESpaces), M_dofGlobalIdVector(M_numFESpaces),
M_currentBdFEPtrVector(M_numFESpaces), M_dofPtrVector(M_numFESpaces),
M_meshPtr( mesh ), M_epetraMapPtr( new MapEpetra(epetraMap) ),
M_geoDimension(MeshType::ElementShape_Type::S_nDimensions)
M_geoDimension(MeshType::geoDimensions)
{
M_currentBdFEPtrVector[0]=currentBdFE;
M_dofPtrVector[0]=dof;
......@@ -401,7 +401,7 @@ PostProcessingBoundary<MeshType>::PostProcessingBoundary( meshPtr_Type mesh,
M_vectorNumberingPerFacetVector(M_numFESpaces), M_dofGlobalIdVector(M_numFESpaces),
M_currentBdFEPtrVector(M_numFESpaces), M_dofPtrVector(M_numFESpaces),
M_meshPtr( mesh ), M_epetraMapPtr( new MapEpetra(epetraMap) ),