Commit a77e9612 authored by Gilles MARCKMANN's avatar Gilles MARCKMANN

Transfert Trellis functions in xQuadrature to reduces dependency of xFEM on Trellis.

parent 588adff4
......@@ -64,6 +64,7 @@ if(BUILD_XFEM)
option(USE_DEBUG_FLAG "use DEBUG print" OFF)
add_subdirectory(xTensor "${CMAKE_CURRENT_BINARY_DIR}/xTensor")
add_subdirectory(xMapping "${CMAKE_CURRENT_BINARY_DIR}/xMapping")
add_subdirectory(xQuadrature "${CMAKE_CURRENT_BINARY_DIR}/xQuadrature")
add_subdirectory(xFEM "${CMAKE_CURRENT_BINARY_DIR}/xFEM")
add_subdirectory(xExport "${CMAKE_CURRENT_BINARY_DIR}/xExport")
......
......@@ -14,6 +14,7 @@ add_library(xAnalyticalSolution ${BUILD_SHARED_LIBS} ${sources} )
find_package(Trellis REQUIRED)
find_package(xTool REQUIRED)
find_package(xFEM REQUIRED)
find_package(xQuadrature)
find_package(xInterfaceAOMDGeneral)
find_package(Boost REQUIRED)
......@@ -22,7 +23,8 @@ list(APPEND EXTERNAL_INCLUDES
${Boost_INCLUDE_DIRS}
${xTool_INCLUDE_DIR}
${xFEM_INCLUDE_DIR}
${Trellis_INCLUDE_DIR}
${xQuadrature_INCLUDE_DIR}
${Trellis_INCLUDE_DIR}
${xInterfaceAOMDGeneral_INCLUDE_DIR}
${MPI_CXX_INCLUDE_PATH}
)
......
......@@ -9,6 +9,7 @@ message_verbose(text)
find_package(xTool REQUIRED)
find_package(xInterfaceAOMDGeneral REQUIRED)
find_package(Trellis REQUIRED)
find_package(xQuadrature )
find_package(xLegacySimpleCut REQUIRED)
find_package(xFEM REQUIRED)
find_package(xSolverBase REQUIRED)
......@@ -36,14 +37,15 @@ include_directories(
${Boost_INCLUDE_DIR}
${xTool_INCLUDE_DIR}
${xInterfaceAOMDGeneral_INCLUDE_DIR}
${xFEM_INCLUDE_DIR}
${xLegacySimpleCut_INCLUDE_DIR}
${xFEM_INCLUDE_DIR}
${xLegacySimpleCut_INCLUDE_DIR}
${Trellis_INCLUDE_DIR}
${xSolverBase_INCLUDE_DIR}
${xInterfaceSuperLu_INCLUDE_DIR}
${xInterfaceLapack_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
)
${xQuadrature_INCLUDE_DIR}
)
target_link_libraries(xCrack xLegacySimpleCut )
......
......@@ -195,7 +195,7 @@ void IntegratorSingularCrack2D_c::accept(xfem::xCommandOnGeomElem& command, mEnt
Vert[SingPoint]->print();
s_Vert[SingPoint]->print();
SingularCrackMapping mapping(es_integ, SingPoint);
Trellis_Util::GaussIntegrator integrator(xinterface::aomd::mapTomType(mapping.getType()));
xquadrature::xGaussIntegrator integrator(mapping.getType());
xfem::xGeomElem geo_integ_es(es_integ, &mapping, &integrator);
geo_integ_es.SetIntegrationPointNumberForDegree(degree);
command.execute(&geo_integ_es);
......@@ -222,7 +222,7 @@ void IntegratorSingularCrack2D_c::accept(xfem::xCommandOnGeomElem& command, mEnt
if (sqrt(produitvectoriel * produitvectoriel) > 1.e-13)
{
SingularCrackMapping mapping(&fac1, 2);
Trellis_Util::GaussIntegrator integrator(xinterface::aomd::mapTomType(mapping.getType()));
xquadrature::xGaussIntegrator integrator(mapping.getType());
xfem::xGeomElem geo_elem_superpos(&fac1, &mapping, &integrator);
int provec_super = (produitvectoriel * orientation_es_integ > 0) ? 1 : -1;
geo_elem_superpos.SetOrientation(provec_super);
......
......@@ -19,6 +19,8 @@
#include "xVector.h"
// xmapping
#include "xMapping.h"
// xquadradure
#include "xReferenceElement.h"
// xcrack
#include "SingularCrackMapping.h"
......@@ -30,13 +32,13 @@ using std::endl;
namespace xcrack
{
SingularCrackMapping::SingularCrackMapping(AOMD::mEntity *e_, int singular_node_)
: xmapping::xMapping(xReferenceElementType::QUAD),
: xmapping::xMapping(xmapping::xReferenceElementType::QUAD),
mapping_regular(xinterface::aomd::getRefElementType(*e_), xinterface::aomd::getPoints(*e_)),
singular_node(singular_node_)
{
const bool debug = false;
if (debug) cout << "entering SingularCrackMapping.cc" << endl;
if (mapping_regular.getType() != xReferenceElementType::TRI)
if (mapping_regular.getType() != xmapping::xReferenceElementType::TRI)
{
std::cout << "SingularCrack only defined for TRI " << __LINE__ << __FILE__ << std::endl;
throw;
......
......@@ -4,9 +4,14 @@
See the NOTICE.md & LICENSE.md files for terms
and conditions.
*/
#include "xcFrontManager.h"
// std
#include <iostream>
// xcrack
#include "xcFrontManager.h"
// AOMD
#include "AOMD.h"
#include "mVertex.h"
// xfem
#include "ParUtil.h"
#include "xGatherMesh.h"
#include "xMesh.h"
......@@ -19,6 +24,7 @@
using std::cout;
using std::endl;
using namespace AOMD;
using namespace xfem;
......@@ -79,8 +85,8 @@ void xcFrontManager::createFronts()
{
int verbose = parameters.getInt("front_verbosity");
xMesh &front_mesh_mod = (const_cast<xMesh &>(front_mesh));
//front_mesh_mod.getMesh()->modifyAllState();
AOMD::mMesh& mmesh=front_mesh_mod.getMesh();
// front_mesh_mod.getMesh()->modifyAllState();
AOMD::mMesh &mmesh = front_mesh_mod.getMesh();
mmesh.modifyState(3, 2, true);
mmesh.modifyState(3, 1, true);
mmesh.modifyState(3, 0, true);
......
......@@ -5,6 +5,7 @@
and conditions.
*/
// AOMD
#include "AOMD.h"
#include "mEdge.h"
// xcrack
#include "xcFrontPart.h"
......
......@@ -7,9 +7,9 @@
#ifndef _xcFrontPart_
#define _xcFrontPart_
// std
#include <string>
// xfem
#include "xLevelSet.h"
#include "xMesh.h"
#include "xRegion.h"
......
......@@ -66,10 +66,11 @@ if(USE_XGEOM)
find_and_set(xGeom xGeom XDOUBLECUT_EXTERNAL_INCLUDES EXTERNAL_LIBRARIES REQUIRED )
endif()
find_and_set(xTool xTool XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xInterfaceAOMDGeneral xInterfaceAOMDGeneral XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(Trellis Trellis XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xFEM xFEM XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xTool xTool XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xInterfaceAOMDGeneral xInterfaceAOMDGeneral XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(Trellis Trellis XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xFEM xFEM XDOUBLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xQuadrature xQuadrature XDOUBLECUT_EXTERNAL_INCLUDES NOTHING )
list(APPEND XDOUBLECUT_EXTERNAL_INCLUDES ${MPI_CXX_INCLUDE_PATH})
if(USE_ANN)
......
......@@ -36,9 +36,10 @@ find_and_set(xInterfaceAOMDGeneral xInterfaceAOMDGeneral XLEGACYSIMPLECUT_EXTERN
find_and_set(Trellis Trellis XLEGACYSIMPLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xFEM xFEM XLEGACYSIMPLECUT_EXTERNAL_INCLUDES NOTHING )
find_and_set(Boost Boost XLEGACYSIMPLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xQuadrature xQuadrature XLEGACYSIMPLECUT_EXTERNAL_INCLUDES NOTHING )
list(APPEND XLEGACYSIMPLECUT_EXTERNAL_INCLUDES ${MPI_CXX_INCLUDE_PATH})
list(APPEND XLEGACYSIMPLECUT_EXTERNAL_INCLUDES ${MPI_CXX_INCLUDE_PATH})
#if(USE_ANN)
# find_and_set(ANN ANN XLEGACYSIMPLECUT_EXTERNAL_INCLUDES NOTHING REQUIRED )
......
......@@ -12,10 +12,11 @@ message_verbose(text)
set(XDOD_INCLUDES Solver Solver/Mumps DomainManager)
find_and_set(Boost Boost XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(Boost Boost XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(Trellis Trellis XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xTool xTool XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xFEM xFEM XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xQuadrature xQuadrature XDOD_EXTERNAL_INCLUDES NOTHING )
find_and_set(xSolverBase xSolverBase XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xInterfaceAOMDGeneral xInterfaceAOMDGeneral XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xInterfaceParMetis xInterfaceParMetis XDOD_EXTERNAL_INCLUDES NOTHING REQUIRED )
......
......@@ -18,6 +18,7 @@ find_package(xTool REQUIRED )
find_package(xInterfaceAOMDGeneral REQUIRED )
find_package(xTensor REQUIRED )
find_package(xFEM REQUIRED )
find_package(xQuadrature )
find_package(Trellis REQUIRED )
find_package(Boost REQUIRED )
......@@ -29,8 +30,9 @@ include_directories(
src
${xTool_INCLUDE_DIR}
${xInterfaceAOMDGeneral_INCLUDE_DIR}
${xFEM_INCLUDE_DIR}
${xTensor_INCLUDE_DIR}
${xQuadrature_INCLUDE_DIR}
${xFEM_INCLUDE_DIR}
${xTensor_INCLUDE_DIR}
${Trellis_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
......
......@@ -15,14 +15,15 @@ file( GLOB sources src/*.cc src/*.h )
find_package(xTool REQUIRED)
find_package(xInterfaceAOMDGeneral REQUIRED)
find_package(Trellis REQUIRED)
find_package(xFEM REQUIRED)
find_package(xLegacySimpleCut REQUIRED )
find_package(xSolverBase REQUIRED)
find_package(xInterfaceSuperLu REQUIRED)
find_package(Boost REQUIRED)
find_package(xTool REQUIRED )
find_package(xInterfaceAOMDGeneral REQUIRED )
find_package(Trellis REQUIRED )
find_package(xFEM REQUIRED )
find_package(xQuadrature )
find_package(xLegacySimpleCut REQUIRED )
find_package(xSolverBase REQUIRED )
find_package(xInterfaceSuperLu REQUIRED )
find_package(Boost REQUIRED )
if(USE_ANN)
find_package(ANN REQUIRED)
......@@ -37,7 +38,8 @@ list(APPEND EXTERNAL_INCLUDES
${xInterfaceAOMDGeneral_INCLUDE_DIR}
${Trellis_INCLUDE_DIR}
${xFEM_INCLUDE_DIR}
${xLegacySimpleCut_INCLUDE_DIR}
${xQuadrature_INCLUDE_DIR}
${xLegacySimpleCut_INCLUDE_DIR}
${xSolverBase_INCLUDE_DIR}
${SuperLu_INCLUDE_DIR}
)
......
......@@ -22,6 +22,7 @@ if(GZIPOUTPUT)
add_definitions( -DWITH_GZIPOUTPUT )
endif()
file(GLOB src_files src/*.cc )
add_library(xFEM ${BUILD_SHARED_LIBS} ${src_files} )
......@@ -43,6 +44,7 @@ find_package(Trellis REQUIRED )
find_package(Boost REQUIRED )
#only include
find_package(xMapping)
find_package(xQuadrature)
find_package(xReader)
......@@ -52,7 +54,8 @@ list(APPEND INCLUDES_DIR
${Boost_INCLUDE_DIRS}
${Trellis_INCLUDE_DIR}
${xMapping_INCLUDE_DIR}
${xTool_INCLUDE_DIR}
${xQuadrature_INCLUDE_DIR}
${xTool_INCLUDE_DIR}
${xTensor_INCLUDE_DIR}
${xInterfaceAOMDGeneral_INCLUDE_DIR}
${xSolverBase_INCLUDE_DIR}
......
/*
/*
This file is a part of eXlibris C++ Library
under the GNU Lesser General Public License.
See the NOTICE.md & LICENSE.md files for terms
See the NOTICE.md & LICENSE.md files for terms
and conditions.
*/
#ifndef __COMMAND_ongeomelem_H
#define __COMMAND_ongeomelem_H
#include "mAttachableDataContainer.h" ///
#include "xGeomElem.h"
#include "mAttachableDataContainer.h" ///
#include "xIntegrator.h"
//#include "mAOMD.h" ///
namespace xfem
{
class xForm;
class xCommandOnGeomElem
{
public:
virtual ~xCommandOnGeomElem()= default;
virtual void openApproxElem(xGeomElem* g_appro);
virtual void setIntegElem(xGeomElem* g_integ);
virtual void execute(xGeomElem* g_integ) = 0;
virtual void closeApproxElem(xGeomElem* g_appro);
xGeomElem *getApproxElem() {return geom_appro;};
protected:
xGeomElem* geom_appro;
xGeomElem* geom_integ;
public:
virtual ~xCommandOnGeomElem() = default;
virtual void openApproxElem(xGeomElem* g_appro);
virtual void setIntegElem(xGeomElem* g_integ);
virtual void execute(xGeomElem* g_integ) = 0;
virtual void closeApproxElem(xGeomElem* g_appro);
xGeomElem* getApproxElem() { return geom_appro; };
protected:
xGeomElem* geom_appro;
xGeomElem* geom_integ;
};
template <typename Eval, typename Compare=std::less<typename Eval::result_type> >
template <typename Eval, typename Compare = std::less<typename Eval::result_type>>
class xEvalMaxCommand : public xfem::xCommandOnGeomElem
{
public :
xEvalMaxCommand(Eval& e,typename Eval::result_type &r) : eval(e),res(r) {}
void execute(xGeomElem* geo_integ) override
{
const int nb = geo_integ->GetNbIntegrationPoints();
for(int k = 0; k < nb; k++){
geo_integ->setUVW(k);
if (geom_appro->getEntity() != geo_integ->getEntity()) geom_appro->setUVWForXYZ(geo_integ->getXYZ());
else geom_appro->setUVW(geo_integ->getUVW());
eval(geom_appro, geo_integ, val);
res = max (val, res,op);
}
}
private :
Eval& eval;
typename Eval::result_type val, &res;
Compare op;
public:
xEvalMaxCommand(Eval& e, typename Eval::result_type& r) : eval(e), res(r) {}
void execute(xGeomElem* geo_integ) override
{
const int nb = geo_integ->GetNbIntegrationPoints();
for (int k = 0; k < nb; k++)
{
geo_integ->setUVW(k);
if (geom_appro->getEntity() != geo_integ->getEntity())
geom_appro->setUVWForXYZ(geo_integ->getXYZ());
else
geom_appro->setUVW(geo_integ->getUVW());
eval(geom_appro, geo_integ, val);
res = max(val, res, op);
}
}
private:
Eval& eval;
typename Eval::result_type val, &res;
Compare op;
};
class xIntegrateFormCommand : public xCommandOnGeomElem
{
public:
xIntegrateFormCommand(xForm* f);
void execute(xGeomElem* geo_integ) override;
xForm* getForm() {return form;}
protected:
xForm* form;
public:
xIntegrateFormCommand(xForm* f);
void execute(xGeomElem* geo_integ) override;
xForm* getForm() { return form; }
protected:
xForm* form;
};
template <class Eval>
class xIntegrateEvalCommand : public xCommandOnGeomElem
{
public:
xIntegrateEvalCommand(const Eval& e,typename Eval::result_type &r) : eval(e),res(r) {}
public:
xIntegrateEvalCommand(const Eval& e, typename Eval::result_type& r) : eval(e), res(r) {}
void execute(xGeomElem* geo_integ) override
{
const int nb = geo_integ->GetNbIntegrationPoints();
// cout << "EXECUTE " << nb << endl;
for (int k = 0; k < nb; k++)
{
geo_integ->setUVW(k);
if (geom_appro->getEntity() != geo_integ->getEntity())
geom_appro->setUVWForXYZ(geo_integ->getXYZ());
else
geom_appro->setUVW(geo_integ->getUVW());
eval(geom_appro, geo_integ, val);
// cout << geo_integ->GetWeight() << " "<< geo_integ->GetDetJac() << endl;
res += val * geo_integ->GetWeight() * geo_integ->GetDetJac();
}
}
inline void reset_result() { res = typename Eval::result_type(); };
inline const typename Eval::result_type& get_result() const { return res; };
public:
const Eval& getEvalFunctor() const { return eval; };
void execute(xGeomElem* geo_integ) override
{
const int nb = geo_integ->GetNbIntegrationPoints();
// cout << "EXECUTE " << nb << endl;
for(int k = 0; k < nb; k++){
geo_integ->setUVW(k);
if (geom_appro->getEntity() != geo_integ->getEntity()) geom_appro->setUVWForXYZ(geo_integ->getXYZ());
else geom_appro->setUVW(geo_integ->getUVW());
eval(geom_appro, geo_integ, val);
//cout << geo_integ->GetWeight() << " "<< geo_integ->GetDetJac() << endl;
res += val *geo_integ->GetWeight() * geo_integ->GetDetJac();
}
}
inline void reset_result(){res= typename Eval::result_type();};
inline const typename Eval::result_type &get_result() const {return res;};
public:
const Eval & getEvalFunctor() const {return eval;};
private:
const Eval& eval;
typename Eval::result_type val, &res;
private:
const Eval& eval;
typename Eval::result_type val, &res;
};
} // end of namespace
} // namespace xfem
#endif
......@@ -21,6 +21,8 @@
#include "xElement.h"
// xmapping
#include "xLagrangeMapping.h"
#include "xReferenceElement.h"
namespace xfem
{
using AOMD::mEntity;
......@@ -323,13 +325,13 @@ void xElement::xyz2uvw(const xtensor::xPoint& xyz)
}
if (type == mEntity::QUAD)
{
xmapping::xLagrangeMapping mapping(xReferenceElementType::QUAD, p);
xmapping::xLagrangeMapping mapping(xmapping::xReferenceElementType::QUAD, p);
mapping.invert(xyz(0), xyz(1), xyz(2), uvw(0), uvw(1), uvw(2));
}
if (type == mEntity::HEX)
{
xmapping::xLagrangeMapping mapping(xReferenceElementType::HEX, p);
xmapping::xLagrangeMapping mapping(xmapping::xReferenceElementType::HEX, p);
mapping.invert(xyz(0), xyz(1), xyz(2), uvw(0), uvw(1), uvw(2));
}
}
......
......@@ -11,7 +11,6 @@
// AOMD trellis
#include "AOMD_Internals.h"
#include "GEntity.h"
#include "Integrator.h"
#include "mAOMD.h"
#include "mEntity.h"
#include "mVertex.h"
......@@ -21,6 +20,8 @@
#include "xVector.h"
// xmapping
#include "xMapping.h"
// xquadrature
#include "xIntegrator.h"
// xinterface
#include "xAOMDEntityUtil.h"
// xfem
......@@ -61,7 +62,7 @@ xGeomElem::xGeomElem(const xGeomElem& other)
mapping = other.mapping;
if (default_Integrator)
integration_points = new Trellis_Util::GaussIntegrator(xinterface::aomd::mapTomType(mapping->getType()));
integration_points = new xquadrature::xGaussIntegrator(mapping->getType());
else
integration_points = other.integration_points;
}
......@@ -99,7 +100,7 @@ xGeomElem& xGeomElem::operator=(const xGeomElem& other)
mapping = other.mapping;
if (default_Integrator)
integration_points = new Trellis_Util::GaussIntegrator(xinterface::aomd::mapTomType(mapping->getType()));
integration_points = new xquadrature::xGaussIntegrator(mapping->getType());
else
integration_points = other.integration_points;
}
......@@ -121,10 +122,10 @@ xGeomElem ::xGeomElem(mEntity* e) : pent(e), Ori(1), default_constructor(true),
if (debug) cout << "hello 2 in geomelem" << endl;
mapping = xMappingBuilderHolderSingleton::instance().buildMapping(*e);
if (debug) cout << "hello 3 in geomelem" << endl;
integration_points = new Trellis_Util::GaussIntegrator(xinterface::aomd::mapTomType(mapping->getType()));
integration_points = new xquadrature::xGaussIntegrator(mapping->getType());
}
xGeomElem ::xGeomElem(mEntity* e, xmapping::xMapping* m, Trellis_Util::Integrator* i)
xGeomElem ::xGeomElem(mEntity* e, xmapping::xMapping* m, xquadrature::xIntegrator* i)
: pent(e),
Ori(1),
default_constructor(false),
......@@ -480,7 +481,7 @@ xtensor::xTensor2<>& xGeomElem::PushBackRightTranspose(xtensor::xTensor2<>& inx)
return inx;
}
void xGeomElem::setIntegrator(Trellis_Util::Integrator* integrator)
void xGeomElem::setIntegrator(xquadrature::xIntegrator* integrator)
{
if (default_constructor)
{
......
......@@ -8,9 +8,9 @@
#ifndef _xGEOMETRICAL_ELEMENT_H
#define _xGEOMETRICAL_ELEMENT_H
// aomd trellis
#include "Integrator.h" // A supprimer par la suite, si tous les trellis_Util::integrator ont ete remplaces
#include "mEntity.h"
// xquadrature
#include "xIntegrator.h"
// xtensor
#include "xPoint.h"
#include "xTensor2.h"
......@@ -30,7 +30,7 @@ class xGeomElem
xGeomElem& operator=(const xGeomElem& other);
xGeomElem(AOMD::mEntity*); // Test K ¤ 12/02/09
xGeomElem(AOMD::mEntity* e, xmapping::xMapping* m, Trellis_Util::Integrator* i);
xGeomElem(AOMD::mEntity* e, xmapping::xMapping* m, xquadrature::xIntegrator* i);
~xGeomElem();
//
......@@ -77,7 +77,7 @@ class xGeomElem
const xmapping::xMapping* getMapping() const { return mapping; }
void setMapping(xmapping::xMapping* m);
void setIntegrator(Trellis_Util::Integrator* integrator);
void setIntegrator(xquadrature::xIntegrator* integrator);
private:
// \note : need to be a pointer to cope with operator =.
......@@ -87,7 +87,7 @@ class xGeomElem
bool default_Integrator;
bool default_Mapping;
xmapping::xMapping* mapping;
Trellis_Util::Integrator* integration_points;
xquadrature::xIntegrator* integration_points;
int order;
xtensor::xPoint uvw;
int CurrentIntegrationPoint;
......
......@@ -7,8 +7,13 @@
#ifndef __INTEGRATORS_ABST_H
#define __INTEGRATORS_ABST_H
// std
#include <iostream>
// xmapping
#include "xReferenceElement.h"
// aomd
#include "AOMD.h"
#include "mEntity.h"
// xfem
......@@ -19,7 +24,8 @@ namespace xfem
{
class xCommandOnGeomElem;
class xLevelSet;
class xRectangleIntegrator : public Trellis_Util::Integrator
class xRectangleIntegrator : public xquadrature::xIntegrator
{
public:
xRectangleIntegrator(AOMD::mEntity* bla) {}
......@@ -45,7 +51,7 @@ class xIntegrationRule
xIntegrationRule() : currentRule(GAUSS), integrator(nullptr){};
virtual void accept(xCommandOnGeomElem& command, AOMD::mEntity* e_integ) const = 0;
void setIntegrator(integrationRuleType rule) { currentRule = rule; };
Trellis_Util::Integrator* getIntegrator(AOMD::mEntity* e_integ) const
xquadrature::xIntegrator* getIntegrator(AOMD::mEntity* e_integ) const
{
if (integrator)
{
......@@ -56,7 +62,7 @@ class xIntegrationRule
{
case GAUSS:
{
integrator = new Trellis_Util::GaussIntegrator(e_integ);
integrator = new xquadrature::xGaussIntegrator(e_integ);
break;
}
case RECTANGLE:
......@@ -70,7 +76,7 @@ class xIntegrationRule
protected:
integrationRuleType currentRule;
mutable Trellis_Util::Integrator* integrator;
mutable xquadrature::xIntegrator* integrator;
};
// gives local coordinates of integration points, for integration with rectangle method
......@@ -182,7 +188,7 @@ class xIntegrationRulePartitionExport : public xIntegrationRule
xGetPartition getpartition;
};
class xNodalIntegrationPoints : public Trellis_Util::Integrator
class xNodalIntegrationPoints : public xquadrature::xIntegrator
{
// pEntity ent;
AOMD::mEntity::mType entityType;
......
......@@ -21,11 +21,11 @@ void xIntegrationRuleStoredBasic::accept(xCommandOnGeomElem& command, AOMD::mEnt
{
if (!filter(e_integ)) return;
xmapping::xMapping* mapping = xMappingBuilderHolderSingleton::instance().buildMapping(*e_integ);
Trellis_Util::Integrator* integrator = nullptr;
xquadrature::xIntegrator* integrator = nullptr;
xAttachableGaussPoints* agp = (xAttachableGaussPoints*)e_integ->getData(gp_tag);
if (!agp)
{
integrator = new Trellis_Util::GaussIntegrator(e_integ);
integrator = new xquadrature::xGaussIntegrator(e_integ);
}
else
{
......@@ -51,7 +51,7 @@ void xIntegrationRuleStoredBasicFallBackPartition::accept(xCommandOnGeomElem& co
{
if (debug) cout << "Stored\n";
xmapping::xMapping* mapping = xMappingBuilderHolderSingleton::instance().buildMapping(*e_integ);
Trellis_Util::Integrator* integrator = nullptr;
xquadrature::xIntegrator* integrator = nullptr;
integrator = new xStoredIntegrationPoints(agp->gauss_points);
xGeomElem geo_integ(e_integ, mapping, integrator);
......@@ -103,11 +103,11 @@ void xIntegrationRuleStoredPartition::accept(xCommandOnGeomElem& command, AOMD::
if (debug) std::cout << "partition found inside sub\n";
if (debug) es_integ->print();
xmapping::xMapping* mapping = xMappingBuilderHolderSingleton::instance().buildMapping(*es_integ);
Trellis_Util::Integrator* integrator = nullptr;
xquadrature::xIntegrator* integrator = nullptr;
xAttachableGaussPoints* agp = (xAttachableGaussPoints*)es_integ->getData(gp_tag);
if (!agp)
{
integrator = new Trellis_Util::GaussIntegrator(es_integ);
integrator = new xquadrature::xGaussIntegrator(es_integ);
}
else
{
......
......@@ -8,8 +8,8 @@
#ifndef _XATTACHABLE_I_RULE_H
#define _XATTACHABLE_I_RULE_H
// Trellis include
#include "Integrator.h"
// xquadrature
#include "xIntegrator.h"
// xfem include
#include "xIntegrationRule.h"
// xinterface aomd
......@@ -18,7 +18,7 @@
namespace xfem
{
/// Class to get the integration points attached to the elements
class xStoredIntegrationPoints : public Trellis_Util::Integrator
class xStoredIntegrationPoints : public xquadrature::xIntegrator
{
typedef std::vector<std::pair<xtensor::xPoint, double>> Container;
const Container& gauss_points;
......
......@@ -20,14 +20,14 @@ if(TIME_MONITORING)
endif()
#find_and_set(xTensor xTensor XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xTool xTool XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xInterfaceAOMDGeneral xInterfaceAOMDGeneral XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
if(USE_AOMD)
find_and_set(Trellis Trellis XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xFEM xFEM XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
list(APPEND XGEOM_EXTERNAL_INCLUDES ${MPI_CXX_INCLUDE_PATH} )
find_and_set(Trellis Trellis XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xFEM xFEM XGEOM_EXTERNAL_INCLUDES NOTHING REQUIRED )
find_and_set(xQuadrature xQuadrature XGEOM_EXTERNAL_INCLUDES NOTHING )
list(APPEND XGEOM_EXTERNAL_INCLUDES ${MPI_CXX_INCLUDE_PATH} )
add_definitions( -DHAVE_AOMD)
endif(USE_AOMD)
......
......@@ -9,6 +9,7 @@
#include "xPoint.h"
// xmapping
#include "xReferenceElement.h"
namespace xinterface
{
namespace aomd
......@@ -104,61 +105,66 @@ inline std::vector<xtensor::xPoint> getPoints(const AOMD::mEntity &e)
return points;
}
inline mType mapTomType(xReferenceElementType in)
inline mType mapTomType(xmapping::xReferenceElementType in)
{
using namespace xmapping;
switch (in)
{
case xReferenceElementType::VERTEX:
case xmapping::xReferenceElementType::VERTEX:
return VERTEX;
case xReferenceElementType::EDGE:
case xmapping::xReferenceElementType::EDGE: