Commit 61fa3020 authored by Gilles MARCKMANN's avatar Gilles MARCKMANN

use XlegacySimpleCut : backup with partial updates

parent 8388bf4a
......@@ -57,7 +57,7 @@ list(APPEND EXTERNAL_INCLUDES
${EXLIBRISTOOLS_INCLUDE_DIR}
${XAOMDInterfaceGeneral_INCLUDE_DIR}
${DISTMESH_INCLUDE_DIR}
${TRELLIS_INCLUDE_DIR}
${Trellis_INCLUDE_DIR}
${SolverBase_INCLUDE_DIR}
${InterfaceSuperLu_INCLUDE_DIR}
${InterfaceTaucs_INCLUDE_DIR}
......@@ -78,7 +78,7 @@ list(APPEND EXTERNAL_LIBRARIES
${XEXT_LIBRARIES}
${GEOM_LIBRARIES}
${XFEM_LIBRARIES}
${TRELLIS_LIBRARIES}
${Trellis_LIBRARIES}
${SolverBase_LIBRARIES}
${InterfaceLapack_LIBRARIES}
${LAPACK_LIBRARIES}
......
......@@ -48,8 +48,8 @@ int main(int argc, char* argv[]) {
// xPlane p1(Trellis_Util::mPoint(0.1,0.1,0.), xtensor::xVector(1.,0.,0.));
// xPlane p2(Trellis_Util::mPoint(0.205,0.205,0.), xtensor::xVector(-1.,0.,0.));
// xLevelSet level_set(&mesh, xUnion(p1, p2));
xPhysSurfByTagging phys_surf(level_set);
xEntityFilter filter=std::bind1st(std::mem_fun(&xPhysSurfByTagging::strictOut), &phys_surf);
xcut::xPhysSurfByTagging phys_surf(level_set);
xEntityFilter filter=std::bind1st(std::mem_fun(&xcut::xPhysSurfByTagging::strictOut), &phys_surf);
xSubMesh domain("domain", mesh);
xSubMesh bnd("bnd", mesh);
xSubMesh interior("interior", mesh);
......
......@@ -56,7 +56,7 @@ class PostProcessing {
public:
PostProcessing(const xParseData&,xexport::xExport &, xfem::xEntityFilter=xfem::xAcceptAll() );
// init and reinit xGeomElem used by xexport::xSensors to measure.
// init and reinit xfem::xGeomElem used by xexport::xSensors to measure.
void init(xfem::xMesh&);
void reinit(xfem::xMesh&);
......
......@@ -57,7 +57,7 @@ void Formulation::addMeasureFunction(std::function<void (int)> measure_fct) {
}
std::string Formulation::getMaterialClass() const {
xGeomElem geo_integ(*geom.begin());// this is a hack to get the (unique) material.
xfem::xGeomElem geo_integ(*geom.begin());// this is a hack to get the (unique) material.
const xTensors& props = *(xMaterialManagerSingleton::instance().getMaterial(&geo_integ)->getProperties());
return props.astring("MATERIAL_CLASS");
}
......@@ -291,7 +291,7 @@ void Formulation::exportStep(int step) {
auto begin=geom.begin();
auto end=geom.end();
xGeomElem geo_integ(*begin);// this is a hack to get the (unique) material.
xfem::xGeomElem geo_integ(*begin);// this is a hack to get the (unique) material.
xTensorsSignature& tensor_sig = *(xMaterialManagerSingleton::instance().getMaterial(&geo_integ)->getVariablesSignature());
for(xTensorsSignature::const_iterator it=tensor_sig.begin_scalar(); it!=tensor_sig.end_scalar(); ++it) {
SmoothMaterialVariable_c<double> eval(it->first, variab_manager);
......
......@@ -109,7 +109,7 @@ void DynFormulation::computeDeltaLevelSetField(double time_step) {
const xCSRVector& Yc=tls_solver.getMeanVector("mean_Yc");
const xCSRVector& Dd=tls_solver.getMeanVector("mean_Dd");
xCSRVector& delta_phi=tls_solver.getMeanVector("delta_phi");
xGeomElem geo_integ(*geom.begin());// this is a hack to get the (unique) material.
xfem::xGeomElem geo_integ(*geom.begin());// this is a hack to get the (unique) material.
xUniformMaterialSensitivity<double> eval_celerity("rayleigh_celerity");
double cr;
eval_celerity(&geo_integ, &geo_integ, cr);
......@@ -122,7 +122,7 @@ void DynFormulation::computeDeltaLevelSetField(double time_step) {
}
double DynFormulation::getTimeStep() const {
xGeomElem geo_integ(*geom.begin());// this is a hack to get the (unique) material.
xfem::xGeomElem geo_integ(*geom.begin());// this is a hack to get the (unique) material.
xUniformMaterialSensitivity<double> eval_celerity("long_celerity");
double c;
eval_celerity(&geo_integ, &geo_integ, c);
......
......@@ -413,7 +413,7 @@ void QSFormulRemeshAniso::projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *,
if(!bndLeft && !bndRight && !bndTop && !bndBottom){
mEntity *elt = e->get(2,0);
xGeomElem geo(elt);
xfem::xGeomElem geo(elt);
Trellis_Util::mPoint CGD = geo.getCDGxyz();
xtensor::xVector toCDG(p,CGD);
//toCDG.norm();
......@@ -435,7 +435,7 @@ void QSFormulRemeshAniso::projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *,
//Get the value of the field at this location
assert(!elts_old.empty());
xGeomElem geo_old(*(elts_old.begin()));
xfem::xGeomElem geo_old(*(elts_old.begin()));
geo_old.setUVWForXYZ(p);
double old_value{0};
phi_field.getVal(&geo_old, &geo_old, old_value);
......@@ -723,7 +723,7 @@ void QSFormulRemeshAniso::remesh() {
// for(xIter itBnd = geom.begin(dimBC); itBnd != geom.end(dimBC); ++itBnd){
// //check filter
// xGeomElem geo(*itBnd);
// xfem::xGeomElem geo(*itBnd);
// if(filter(geo.getCDGxyz())){
// (*itBnd)->classify(mesh->getGEntity(tagnum,dimBC));
......
......@@ -58,7 +58,7 @@ public :
xEvalOnOtherMesh(const xfem::xEval<T> &evalInit_, xMesh& meshInit_) : evalInit(evalInit_),meshInit(meshInit_) {}
//Operateur *****************
void operator()(const xGeomElem* geo_appro, const xGeomElem* geo_integ, T& resu) const
void operator()(const xfem::xGeomElem* geo_appro, const xfem::xGeomElem* geo_integ, T& resu) const
{
//On recupere les coordonnees globales
Trellis_Util::mPoint xyz = geo_integ->getXYZ(); //On recupere les coordonnees du point considere
......@@ -97,14 +97,14 @@ public :
elemIntegInit=*it;
delete mapping;
}
xGeomElem geoApproInit(eltInit); //Espace d'approximation (l'element entier)
xGeomElem geoIntegInit(elemIntegInit);//Espace d'inegration (sous-element)
xfem::xGeomElem geoApproInit(eltInit); //Espace d'approximation (l'element entier)
xfem::xGeomElem geoIntegInit(elemIntegInit);//Espace d'inegration (sous-element)
//MAJ des coordonnees du point de calcul sur geo_Fine !
geoApproInit.setUVWForXYZ(xyz);
geoIntegInit.setUVWForXYZ(xyz);
#else
xGeomElem geoApproInit(eltInit);
xGeomElem geoIntegInit(eltInit);
xfem::xGeomElem geoApproInit(eltInit);
xfem::xGeomElem geoIntegInit(eltInit);
geoApproInit.setUVWForXYZ(xyz);
geoIntegInit.setUVWForXYZ(xyz);
#endif
......
......@@ -31,7 +31,7 @@ QSFormulationSuperimposed::~QSFormulationSuperimposed() {}
class MyNormal : public xEval<xtensor::xVector> {
public:
void operator()(const xGeomElem* appro, const xGeomElem* integ, xtensor::xVector& vec) const {
void operator()(const xfem::xGeomElem* appro, const xfem::xGeomElem* integ, xtensor::xVector& vec) const {
auto pt=integ->getXYZ();
double theta=atan2(pt(1), pt(0));
vec(0)=cos(theta);
......
......@@ -42,7 +42,7 @@ IntegrationPointCreator::IntegrationPointCreator(mEntity* e_model,
}
void IntegrationPointCreator::operator()(mEntity* e_appro) const {
xGeomElem geo_appro(e_appro);
xfem::xGeomElem geo_appro(e_appro);
geo_appro.SetIntegrationPointNumberForDegree(gauss_degree);
int nb_gauss_points=geo_appro.GetNbIntegrationPoints();
......@@ -81,7 +81,7 @@ void IntegrationPointCreator::operator()(mEntity* e_appro) const {
AddFromPartition(partition_tag, partition)(e_appro);
lalg::xCSRVector vec(nb_gauss_points);
for(auto ep: partition) {
xGeomElem geo_integ(ep);
xfem::xGeomElem geo_integ(ep);
geo_integ.SetIntegrationPointNumberForDegree(rhs_degree);
const int nb=geo_integ.GetNbIntegrationPoints();
for(int k=0; k<nb; ++k) {
......
......@@ -49,9 +49,9 @@ void TLSMaterial::checkProperties() {
TransferMaterialVariablesCommand_c::TransferMaterialVariablesCommand_c(xVariabManager& vold, xVariabManager& vnew, xEntityToEntity new2old) :
mat_manager(xMaterialManagerSingleton::instance()), vold(vold), vnew(vnew), new2old(new2old) {}
void TransferMaterialVariablesCommand_c::execute(xGeomElem* geo_integ) {
void TransferMaterialVariablesCommand_c::execute(xfem::xGeomElem* geo_integ) {
const int nb=geo_integ->GetNbIntegrationPoints();
xGeomElem geo_integ_old(new2old(geo_integ->getEntity()));
xfem::xGeomElem geo_integ_old(new2old(geo_integ->getEntity()));
geo_integ_old.SetIntegrationPointNumberForDegree(10); // TODO arbitrary, horrible but we don't know degree!!!
for(int k=0; k<nb; ++k) {
geo_integ->setUVW(k);
......
......@@ -654,7 +654,7 @@ void TLSGeom::buildFullyDamagedSupport(const xEval<double>& eval_phi_minus_lc) {
auto& mesh=getMesh();
xRegion tls(&mesh.getSubMesh("tls"));
xEntityFilter is_in_fds=[&eval_phi_minus_lc](mEntity* e) {
xGeomElem geom_appro(e);
xfem::xGeomElem geom_appro(e);
std::vector<double> vals(e->size(0), -1.);
for(int i=0; i<e->size(0); ++i) {
geom_appro.setUVWForVertex(i);
......@@ -772,7 +772,7 @@ void TLSGeom::buildLinearAndNonLinear(const xEval<double>& eval_phi) {
for(auto e: comp) {
if(is_in_tls(e)) {
double val_max=-1.;
xGeomElem geom(e);
xfem::xGeomElem geom(e);
for(int i=0; i<e->size(0); ++i) {
auto n=static_cast<mVertex*>(e->get(0,i));
geom.setUVWForXYZ(n->point());
......@@ -869,9 +869,9 @@ void TLSGeom::buildIntegMesh(const xEval<double>& eval_phi_minus_lc) {
// Create partition, filter elt on fully damaged zone
xEntityFilter is_in_neg=[&eval_phi_minus_lc](mEntity* e) {
xCreator creator;
xGeomElem geom_integ(e);
xfem::xGeomElem geom_integ(e);
mEntity* ec=creator(e);
xGeomElem geom_appro(ec);
xfem::xGeomElem geom_appro(ec);
std::vector<double> vals(e->size(0), -1.);
for(int i=0; i<e->size(0); ++i) {
geom_integ.setUVWForVertex(i);
......
......@@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {
//loop over Bnd entities
for(xfem::xIter itBnd = mesh.begin(dimBC); itBnd != mesh.end(dimBC); ++itBnd){
//check filter
xGeomElem geo(*itBnd);
xfem::xGeomElem geo(*itBnd);
if(filter(geo.getCDGxyz())){
(*itBnd)->classify(mesh.getGEntity(tagnum,dimBC));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment