Commit 7f5611d9 authored by Benoit LE's avatar Benoit LE

Modifications to take into account recent commits in Xfiles.

parent 0cf3c5d9
...@@ -43,6 +43,7 @@ find_package(xExt REQUIRED ) ...@@ -43,6 +43,7 @@ find_package(xExt REQUIRED )
find_package(xGeom REQUIRED ) find_package(xGeom REQUIRED )
find_package(xTLS REQUIRED ) find_package(xTLS REQUIRED )
find_package(xDoubleCut REQUIRED ) find_package(xDoubleCut REQUIRED )
find_package(xLegacySimpleCut REQUIRED)
find_package(ANN REQUIRED ) find_package(ANN REQUIRED )
find_package(CGAL REQUIRED ) find_package(CGAL REQUIRED )
find_package(BLAS2 REQUIRED ) find_package(BLAS2 REQUIRED )
...@@ -73,12 +74,14 @@ list(APPEND EXTERNAL_INCLUDES ...@@ -73,12 +74,14 @@ list(APPEND EXTERNAL_INCLUDES
list(APPEND EXTERNAL_LIBRARIES list(APPEND EXTERNAL_LIBRARIES
TLSElementBased TLSElementBased
${xTLS_LIBRARIES} ${xTLS_LIBRARIES}
${xLegacySimpleCut_LIBRARIES}
${xDoubleCut_LIBRARIES} ${xDoubleCut_LIBRARIES}
${xExt_LIBRARIES} ${xExt_LIBRARIES}
${xGeom_LIBRARIES} ${xGeom_LIBRARIES}
${xFEM_LIBRARIES} ${xFEM_LIBRARIES}
${xExport_LIBRARIES} ${xExport_LIBRARIES}
${Trellis_LIBRARIES} ${Trellis_LIBRARIES}
${xInterfaceAOMDGeneral_LIBRARIES}
${xSolverBase_LIBRARIES} ${xSolverBase_LIBRARIES}
${xInterfaceLapack_LIBRARIES} ${xInterfaceLapack_LIBRARIES}
${LAPACK_LIBRARIES} ${LAPACK_LIBRARIES}
......
...@@ -89,11 +89,11 @@ int main(int argc, char* argv[]) { ...@@ -89,11 +89,11 @@ int main(int argc, char* argv[]) {
// level_set.load(p1); // level_set.load(p1);
// phi field // phi field
xDoubleManager double_manager; xValueManagerDist<double>::map_const_iterator double_manager;
xSpacePolynomialLagrange space("space", xSpace::SCALAR, 1); xSpacePolynomialLagrange space("space", xSpace::SCALAR, 1);
xField field(&double_manager, space); xField<> field(&double_manager, space);
DeclareInterpolation(field, xValueCreator<xValueDouble>(), all.begin(), all.end()); DeclareInterpolation<xField<>>(field, xValueCreator<xValueDouble>(), all.begin(), all.end());
DeclareState(field, xStateDofCreator<>(double_manager, "dofs"), all.begin(), all.end()); DeclareState<xField<>>(field, xStateDofCreator<>(double_manager, "dofs"), all.begin(), all.end());
for(xIter it=all.begin(0); it!=all.end(0); ++it) { for(xIter it=all.begin(0); it!=all.end(0); ++it) {
xFiniteElementKeysOnly keys; xFiniteElementKeysOnly keys;
keys.setKeys(*it, field.begin(), field.end()); keys.setKeys(*it, field.begin(), field.end());
......
...@@ -139,9 +139,9 @@ void PostProcessing::saveMesh(std::string export_name, int step, xMesh& mesh) { ...@@ -139,9 +139,9 @@ void PostProcessing::saveMesh(std::string export_name, int step, xMesh& mesh) {
} }
} }
void PostProcessing::saveField(std::string export_name, int step, const xField& field, xRegion reg) { void PostProcessing::saveField(std::string export_name, int step, const xField<>& field, xRegion reg) {
if(step>0 && export_manager.toExport("save", step, "")) { if(step>0 && export_manager.toExport("save", step, "")) {
xDoubleManager* double_manager=field.getDoubleManager(); xValueManagerDist<double>* double_manager=field.getDoubleManager();
std::ofstream oss(export_name+"_save.bin", ios::binary); std::ofstream oss(export_name+"_save.bin", ios::binary);
if(oss.is_open()) { if(oss.is_open()) {
const int info_size=2*reg.dim()*sizeof(int); const int info_size=2*reg.dim()*sizeof(int);
......
...@@ -7,17 +7,16 @@ ...@@ -7,17 +7,16 @@
#ifndef _TLSDuctile_Export_h_ #ifndef _TLSDuctile_Export_h_
#define _TLSDuctile_Export_h_ #define _TLSDuctile_Export_h_
#include "xField.h"
#include "xAlgorithm.h" #include "xAlgorithm.h"
#include "xExportManager.h" #include "xExportManager.h"
#include "xSensors.h" #include "xSensors.h"
#include "xExportAlgorithm.h"
#include "xExportGmsh.h" #include "xExportGmsh.h"
#include <chrono> #include <chrono>
#include <string> #include <string>
#include <stack> #include <stack>
namespace xfem {
class xField;
}
class Display { class Display {
public: public:
...@@ -138,7 +137,7 @@ public: ...@@ -138,7 +137,7 @@ public:
void exportOnTime(const std::string name, const double time, const xfem::xEval<xtensor::xTensor2<>>& eval); void exportOnTime(const std::string name, const double time, const xfem::xEval<xtensor::xTensor2<>>& eval);
void saveMesh(std::string export_name, int step, xfem::xMesh& mesh); void saveMesh(std::string export_name, int step, xfem::xMesh& mesh);
void saveField(std::string export_name, int step, const xfem::xField& field, xfem::xRegion reg); void saveField(std::string export_name, int step, const xfem::xField<>& field, xfem::xRegion reg);
template<typename ITER> template<typename ITER>
void saveDomain(std::string export_name, int step, ITER it, ITER end) { void saveDomain(std::string export_name, int step, ITER it, ITER end) {
......
...@@ -44,7 +44,7 @@ Formulation::Formulation(TLSGeom& geom, ...@@ -44,7 +44,7 @@ Formulation::Formulation(TLSGeom& geom,
size_disp_value(0) { size_disp_value(0) {
space_factory->setSpaceProductOrder(parse_data.getInt("disp_space_order")); space_factory->setSpaceProductOrder(parse_data.getInt("disp_space_order"));
disp_field.insert(space_factory->getSpace()); disp_field.insert(space_factory->getSpace());
disp_field.ResetStoragePolicy<xfem::xFieldStorageFull>(); disp_field.ResetStoragePolicy<xfem::xFieldStorageFull<double>>();
Observer::listen("step", 0); Observer::listen("step", 0);
} }
...@@ -62,7 +62,7 @@ std::string Formulation::getMaterialClass() const { ...@@ -62,7 +62,7 @@ std::string Formulation::getMaterialClass() const {
return props.astring("MATERIAL_CLASS"); return props.astring("MATERIAL_CLASS");
} }
const xField& Formulation::getDispField() const { const xField<>& Formulation::getDispField() const {
return disp_field; return disp_field;
} }
...@@ -76,7 +76,7 @@ void Formulation::deleteDispField(std::string name) { ...@@ -76,7 +76,7 @@ void Formulation::deleteDispField(std::string name) {
void Formulation::declareDispField(std::string name) { void Formulation::declareDispField(std::string name) {
treatmentOfRigidMotion(); treatmentOfRigidMotion();
DeclareInterpolation(disp_field, value_creator, geom.begin(name), geom.end(name)); DeclareInterpolation<xField<>>(disp_field, value_creator, geom.begin(name), geom.end(name));
} }
void Formulation::transferDispField(double coeff) { void Formulation::transferDispField(double coeff) {
...@@ -104,7 +104,7 @@ void Formulation::treatmentOfRigidMotion() { ...@@ -104,7 +104,7 @@ void Formulation::treatmentOfRigidMotion() {
int geom = env.Geom; int geom = env.Geom;
if(geom==RIGID_LINE || geom==RIGID_SURFACE) { if(geom==RIGID_LINE || geom==RIGID_SURFACE) {
xClassRegion bc(&mesh, env.Entity, env.getDimension()); xClassRegion bc(&mesh, env.Entity, env.getDimension());
DeclareInterpolationRigid(disp_field, value_creator, env.Phys, bc.begin(), bc.end()); DeclareInterpolationRigid<xField<>>(disp_field, value_creator, env.Phys, bc.begin(), bc.end());
} }
} }
} }
...@@ -115,7 +115,7 @@ void Formulation::deleteState() { ...@@ -115,7 +115,7 @@ void Formulation::deleteState() {
} }
void Formulation::declareDofs() { void Formulation::declareDofs() {
DeclareState(disp_field, xStateDofCreator<>(double_manager, dofs), geom.begin(), geom.end()); DeclareState<xField<>>(disp_field, xStateDofCreator<>(double_manager, dofs), geom.begin(), geom.end());
std::cout<<"disp nb dofs "<<double_manager.size(dofs)<<std::endl; std::cout<<"disp nb dofs "<<double_manager.size(dofs)<<std::endl;
} }
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
// Simple accessors // Simple accessors
int getNbDofs() const; int getNbDofs() const;
std::string getMaterialClass() const; std::string getMaterialClass() const;
const xfem::xField& getDispField() const; const xfem::xField<>& getDispField() const;
// Helper to add additional and specific outputs to a test case. // Helper to add additional and specific outputs to a test case.
void addMeasureFunction(std::function<void (int)>); void addMeasureFunction(std::function<void (int)>);
...@@ -132,9 +132,9 @@ protected: ...@@ -132,9 +132,9 @@ protected:
const xParseData& parse_data; const xParseData& parse_data;
PostProcessing& post_pro; PostProcessing& post_pro;
xfem::xDoubleManager double_manager; xfem::xValueManagerDist<double> double_manager;
xfem::xVariabManager variab_manager; xfem::xVariabManager variab_manager;
xfem::xField disp_field; xfem::xField<> disp_field;
std::string dofs; std::string dofs;
std::function<xfem::xValue<double>* (const xfem::xValKey&)> value_creator; std::function<xfem::xValue<double>* (const xfem::xValKey&)> value_creator;
......
...@@ -118,8 +118,8 @@ void QSFormulation::clearDispMeasField() { ...@@ -118,8 +118,8 @@ void QSFormulation::clearDispMeasField() {
void QSFormulation::declareDispMeasField() { void QSFormulation::declareDispMeasField() {
disp_field_meas.insert(space_factory->getSpace()); disp_field_meas.insert(space_factory->getSpace());
DeclareInterpolation(disp_field_meas, xValueCreator<xValueDouble>(), geom.begin("bnd_meas"), geom.end("bnd_meas")); DeclareInterpolation<xField<>>(disp_field_meas, xValueCreator<xValueDouble>(), geom.begin("bnd_meas"), geom.end("bnd_meas"));
DeclareState(disp_field_meas, xStateDofCreator<>(double_manager_meas, dofs), geom.begin("bnd_meas"), geom.end("bnd_meas")); DeclareState<xField<>>(disp_field_meas, xStateDofCreator<>(double_manager_meas, dofs), geom.begin("bnd_meas"), geom.end("bnd_meas"));
std::cout<<"disp meas nb dofs "<<double_manager_meas.size(dofs)<<std::endl; std::cout<<"disp meas nb dofs "<<double_manager_meas.size(dofs)<<std::endl;
} }
......
...@@ -83,8 +83,8 @@ protected: ...@@ -83,8 +83,8 @@ protected:
TLSSolver& tls_solver; TLSSolver& tls_solver;
// Field and its double manager dedicated to meas of external forces // Field and its double manager dedicated to meas of external forces
xfem::xDoubleManager double_manager_meas; xfem::xValueManagerDist<double> double_manager_meas;
xfem::xField disp_field_meas; xfem::xField<> disp_field_meas;
double old_load_factor, load_factor, load_factor_variation, max_load_factor, max_force_norm, dissipated_energy; double old_load_factor, load_factor, load_factor_variation, max_load_factor, max_force_norm, dissipated_energy;
xtensor::xVector<> old_ref_force, ref_force, old_ref_disp, ref_disp; xtensor::xVector<> old_ref_force, ref_force, old_ref_disp, ref_disp;
......
...@@ -124,7 +124,7 @@ else{ ...@@ -124,7 +124,7 @@ else{
} }
} }
void QSFormulRemeshAniso::xReadFromParaview(string fName, string targetData, xField &field, xMesh& mesh){ void QSFormulRemeshAniso::xReadFromParaview(string fName, string targetData, xField<> &field, xMesh& mesh){
const bool debug{false}; const bool debug{false};
const char * line_c; const char * line_c;
...@@ -199,7 +199,7 @@ void QSFormulRemeshAniso::xReadFromParaview(string fName, string targetData, xFi ...@@ -199,7 +199,7 @@ void QSFormulRemeshAniso::xReadFromParaview(string fName, string targetData, xFi
f.clear();// Whooooooo tricky ! If eof was raised, seekg can't go enywhere. We must clear f before or re-open it... f.clear();// Whooooooo tricky ! If eof was raised, seekg can't go enywhere. We must clear f before or re-open it...
f.seekg(LocalistionTarget); f.seekg(LocalistionTarget);
xDoubleManager* double_manager=field.getDoubleManager(); xValueManagerDist<double>* double_manager=field.getDoubleManager();
double val; double val;
...@@ -378,7 +378,7 @@ void QSFormulRemeshAniso::buildLSAdaptationField(){ ...@@ -378,7 +378,7 @@ void QSFormulRemeshAniso::buildLSAdaptationField(){
void QSFormulRemeshAniso::projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *, double> &projectedValues){ void QSFormulRemeshAniso::projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *, double> &projectedValues){
xMesh* mesh_old=&geom.getMesh("comp"); xMesh* mesh_old=&geom.getMesh("comp");
xField &phi_field = tls_solver.getField(); xField<> &phi_field = tls_solver.getField();
Trellis_Util::mPoint bbmin, bbmax; Trellis_Util::mPoint bbmin, bbmax;
mesh_old->compute_bounding_box(bbmin, bbmax); mesh_old->compute_bounding_box(bbmin, bbmax);
...@@ -447,8 +447,8 @@ void QSFormulRemeshAniso::projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *, ...@@ -447,8 +447,8 @@ void QSFormulRemeshAniso::projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *,
return; return;
} }
void QSFormulRemeshAniso::xAssignPhiValues(xField &field, xMesh *mesh, std::map<mEntity *, double> &projectedValues){ void QSFormulRemeshAniso::xAssignPhiValues(xField<> &field, xMesh *mesh, std::map<mEntity *, double> &projectedValues){
xDoubleManager* double_manager=field.getDoubleManager(); xValueManagerDist<double>* double_manager=field.getDoubleManager();
for(xIter it = mesh->begin(0); it != mesh->end(0); ++it ){ for(xIter it = mesh->begin(0); it != mesh->end(0); ++it ){
mEntity *e = *it; mEntity *e = *it;
...@@ -584,7 +584,7 @@ void QSFormulRemeshAniso::remesh() { ...@@ -584,7 +584,7 @@ void QSFormulRemeshAniso::remesh() {
// begin clean up // begin clean up
deleteState(); deleteState();
deleteDispField(); deleteDispField();
disp_field.ResetStoragePolicy<xfem::xFieldStorageFull>(); disp_field.ResetStoragePolicy<xfem::xFieldStorageFull<double>>();
deleteMaterialVariables(); deleteMaterialVariables();
tls_solver.deleteState(); tls_solver.deleteState();
tls_solver.deleteField("tls"); //tls_solver.clearField(); tls_solver.deleteField("tls"); //tls_solver.clearField();
......
...@@ -15,7 +15,6 @@ class TLSSolver; ...@@ -15,7 +15,6 @@ class TLSSolver;
#include "xField.h" #include "xField.h"
using xfem::xMesh; using xfem::xMesh;
using xfem::xField;
using AOMD::mEntity; using AOMD::mEntity;
class QSFormulRemeshAniso : public QSFormulation { class QSFormulRemeshAniso : public QSFormulation {
...@@ -35,13 +34,13 @@ public: ...@@ -35,13 +34,13 @@ public:
private: private:
void updateLevelSetField(); void updateLevelSetField();
void xReadFromParaview(std::string, std::string, xfem::xField&,xMesh&); void xReadFromParaview(std::string, std::string, xfem::xField<>&,xMesh&);
//void xReadFromParaviewxLevelSet(std::string, std::string, xfem::xLevelSet&,xMesh&); //void xReadFromParaviewxLevelSet(std::string, std::string, xfem::xLevelSet&,xMesh&);
void xReadFromParaviewxLevelSet(std::string, std::string, xfem::xLevelSet&); void xReadFromParaviewxLevelSet(std::string, std::string, xfem::xLevelSet&);
void remesh(); void remesh();
void buildLSAdaptationField(); void buildLSAdaptationField();
void projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *, double> &projectedValues); void projectPhiOnMesh(xMesh *mesh_new, std::map<mEntity *, double> &projectedValues);
void xAssignPhiValues(xField &field, xMesh *mesh, std::map<mEntity *, double> &projectedValues); void xAssignPhiValues(xfem::xField<> &field, xMesh *mesh, std::map<mEntity *, double> &projectedValues);
std::list<AOMD::mEntity*> constructDelocalizedList(xfem::xLevelSet&); std::list<AOMD::mEntity*> constructDelocalizedList(xfem::xLevelSet&);
bool doRestart; bool doRestart;
......
...@@ -203,9 +203,9 @@ void PreProcessing::loadMesh(std::string mesh_name, xMesh& mesh) { ...@@ -203,9 +203,9 @@ void PreProcessing::loadMesh(std::string mesh_name, xMesh& mesh) {
system(filename.c_str()); system(filename.c_str());
} }
void PreProcessing::loadField(std::string field_name, xMesh& mesh, xField& field) { void PreProcessing::loadField(std::string field_name, xMesh& mesh, xField<>& field) {
const int dim=mesh.dim(); const int dim=mesh.dim();
xDoubleManager* double_manager=field.getDoubleManager(); xValueManagerDist<double>* double_manager=field.getDoubleManager();
std::string filename=getFilename(field_name); std::string filename=getFilename(field_name);
std::ifstream iss(filename, ios::binary); std::ifstream iss(filename, ios::binary);
if(iss.is_open()) { if(iss.is_open()) {
......
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
#define _TLSDuctile_Import_h_ #define _TLSDuctile_Import_h_
#include <string> #include <string>
#include <xField.h>
namespace xfem { namespace xfem {
class xData; class xData;
class xField;
class xMesh; class xMesh;
} }
class xParseData; class xParseData;
...@@ -27,7 +28,7 @@ public: ...@@ -27,7 +28,7 @@ public:
bool fileExists(std::string) const; bool fileExists(std::string) const;
int getStep() const; int getStep() const;
void loadMesh(std::string, xfem::xMesh&); void loadMesh(std::string, xfem::xMesh&);
void loadField(std::string, xfem::xMesh&, xfem::xField&); void loadField(std::string, xfem::xMesh&, xfem::xField<>&);
void loadDomain(std::string, xfem::xMesh&, std::list<AOMD::mEntity*>&); void loadDomain(std::string, xfem::xMesh&, std::list<AOMD::mEntity*>&);
private: private:
void registerFilename(std::string, std::string); void registerFilename(std::string, std::string);
......
...@@ -106,12 +106,12 @@ void TLSSolver::deleteField(std::string name) { ...@@ -106,12 +106,12 @@ void TLSSolver::deleteField(std::string name) {
} }
void TLSSolver::declareField(std::string name) { void TLSSolver::declareField(std::string name) {
DeclareInterpolation(field, xValueCreator<ValueOldAndCurrentDouble_c>(), geom.begin(0, name), geom.end(0, name)); DeclareInterpolation<xField<>>(field, xValueCreator<ValueOldAndCurrentDouble_c>(), geom.begin(0, name), geom.end(0, name));
} }
void TLSSolver::declareState() { void TLSSolver::declareState() {
// PARA : see commit tagged WITHMODIF // PARA : see commit tagged WITHMODIF
DeclareState(field, xStateDofCreator<>(double_manager, dofs), geom.begin(0, "tls"), geom.end(0, "tls")); DeclareState<xField<>>(field, xStateDofCreator<>(double_manager, dofs), geom.begin(0, "tls"), geom.end(0, "tls"));
const int nb_dofs=double_manager.size(dofs); const int nb_dofs=double_manager.size(dofs);
buf_nodal_vec.resize(nb_dofs); buf_nodal_vec.resize(nb_dofs);
std::cout << "tls solver field nb dofs " << nb_dofs << std::endl; std::cout << "tls solver field nb dofs " << nb_dofs << std::endl;
...@@ -409,7 +409,7 @@ bool TLSSolver::isCrackable() { ...@@ -409,7 +409,7 @@ bool TLSSolver::isCrackable() {
return true; return true;
} }
const double lc=parse_data.getDouble("lc"); // TODO only on nonlocal ? const double lc=parse_data.getDouble("lc"); // TODO only on nonlocal ?
for(xDoubleManager::vIter it=double_manager.begin(dofs); it!=double_manager.end(dofs); ++it) { for(xValueManagerDist<double>::vIter it=double_manager.begin(dofs); it!=double_manager.end(dofs); ++it) {
if((*it)->getVal()>lc) { if((*it)->getVal()>lc) {
return true; return true;
} }
......
...@@ -76,7 +76,7 @@ public: ...@@ -76,7 +76,7 @@ public:
bool isCrackable(); bool isCrackable();
void cutCrack(); void cutCrack();
xfem::xField& getField() { return field; } xfem::xField<>& getField() { return field; }
const xtls::xEvalTLSDamageFunction& getDamageEval() const; const xtls::xEvalTLSDamageFunction& getDamageEval() const;
const xtls::xEvalTLSDamageFirstDerivativeFunction& getDamageDerivativeEval() const; const xtls::xEvalTLSDamageFirstDerivativeFunction& getDamageDerivativeEval() const;
const xfem::xEval<double>& getPhiEval() const; const xfem::xEval<double>& getPhiEval() const;
...@@ -94,8 +94,8 @@ private: ...@@ -94,8 +94,8 @@ private:
PostProcessing& post_pro; PostProcessing& post_pro;
xfem::xSpaceFactoryBase* space_factory; xfem::xSpaceFactoryBase* space_factory;
xfem::xDoubleManager double_manager; xfem::xValueManagerDist<double> double_manager;
xfem::xField field; xfem::xField<> field;
std::string dofs; std::string dofs;
std::map<std::string, xlinalg::xCSRVector*> mean_modal_vecs; std::map<std::string, xlinalg::xCSRVector*> mean_modal_vecs;
......
...@@ -252,8 +252,8 @@ std::ostream& CustomValueDoubleDynamics::printVal(std::ostream& o) const { ...@@ -252,8 +252,8 @@ std::ostream& CustomValueDoubleDynamics::printVal(std::ostream& o) const {
// TODO coded to impose traction along Y for other boundary condition, one need // TODO coded to impose traction along Y for other boundary condition, one need
// to generalize this. // to generalize this.
void RadialDirichletBoundaryCondition(const xField& field, std::vector<AOMD::mEntity*>::const_iterator it, std::vector<AOMD::mEntity*>::const_iterator end, double val) { void RadialDirichletBoundaryCondition(const xField<>& field, std::vector<AOMD::mEntity*>::const_iterator it, std::vector<AOMD::mEntity*>::const_iterator end, double val) {
xDoubleManager* double_manager=field.getDoubleManager(); xValueManagerDist<double>* double_manager=field.getDoubleManager();
std::string str[2]={"Y"}; std::string str[2]={"Y"};
for(; it!=end; ++it) { for(; it!=end; ++it) {
AOMD::mEntity* n=*it; AOMD::mEntity* n=*it;
...@@ -268,7 +268,7 @@ void RadialDirichletBoundaryCondition(const xField& field, std::vector<AOMD::mEn ...@@ -268,7 +268,7 @@ void RadialDirichletBoundaryCondition(const xField& field, std::vector<AOMD::mEn
for(std::vector<xValue<double>*>::const_iterator itv=vals.begin(); itv!=vals.end(); ++itv) { for(std::vector<xValue<double>*>::const_iterator itv=vals.begin(); itv!=vals.end(); ++itv) {
(*itv)->setVal(val*coeff[i]); (*itv)->setVal(val*coeff[i]);
} }
std::transform(FEM.beginKey(), FEM.endKey(), vals.begin(), vals.begin(), xStateFixedCreator()); std::transform(FEM.beginKey(), FEM.endKey(), vals.begin(), vals.begin(), xStateFixedCreator<>());
} }
} }
} }
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#ifndef _TLSDuctile_util_hpp_ #ifndef _TLSDuctile_util_hpp_
#define _TLSDuctile_util_hpp_ #define _TLSDuctile_util_hpp_
#include "xField.h"
#include "Material.h" #include "Material.h"
#include "xSpacePolynomial.h" #include "xSpacePolynomial.h"
#include "xSpaceFactory.h" #include "xSpaceFactory.h"
...@@ -89,7 +90,7 @@ private: ...@@ -89,7 +90,7 @@ private:
// For 2D purpose only, for disk centered on point of coordinate (0,0,0), it // For 2D purpose only, for disk centered on point of coordinate (0,0,0), it
// imposes radial displacement // imposes radial displacement
void RadialDirichletBoundaryCondition(const xfem::xField&, std::vector<AOMD::mEntity*>::const_iterator, std::vector<AOMD::mEntity*>::const_iterator, double=0.); void RadialDirichletBoundaryCondition(const xfem::xField<>&, std::vector<AOMD::mEntity*>::const_iterator, std::vector<AOMD::mEntity*>::const_iterator, double=0.);
// class xAttachableMapping : public AOMD::mAttachableData { // class xAttachableMapping : public AOMD::mAttachableData {
// public: // public:
......
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
#include "xTensorOperations.h" #include "xTensorOperations.h"
struct MeasureDisp { struct MeasureDisp {
MeasureDisp(const xfem::xField& disp_field, PostProcessing& post_pro) : MeasureDisp(const xfem::xField<>& disp_field, PostProcessing& post_pro) :
comp_1(0), eval_disp_1(disp_field, comp_1), post_pro(post_pro) {} comp_1(0), eval_disp_1(disp_field, comp_1), post_pro(post_pro) {}
void operator()(int step) { void operator()(int step) {
post_pro.exportOnTime("CMOD", (double)step, eval_disp_1); post_pro.exportOnTime("CMOD", (double)step, eval_disp_1);
} }
xfem::xExtractCompVector comp_1; xfem::xExtractCompVector<> comp_1;
xfem::xEvalField<xfem::xExtractCompVector> eval_disp_1; xfem::xEvalField<xfem::xExtractCompVector<>> eval_disp_1;
PostProcessing& post_pro; PostProcessing& post_pro;
}; };
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "main.h" #include "main.h"
#include "xAlgorithm.h" #include "xAlgorithm.h"
#include "xData.h" #include "xData.h"
#include "xDoubleManager.h" #include "xValueManagerDist<double>::map_const_iterator.h"
#include "xCSRMatrix.h" #include "xCSRMatrix.h"
#include "xCSRVector.h" #include "xCSRVector.h"
#include "xLinearSystemSolverSuperLU.h" #include "xLinearSystemSolverSuperLU.h"
...@@ -120,10 +120,10 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) { ...@@ -120,10 +120,10 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) {
xSpaceLagrange lagy("DISPLACEMENT_Y", xSpace::VECTOR_Y, xSpaceLagrange::DEGREE_ONE); xSpaceLagrange lagy("DISPLACEMENT_Y", xSpace::VECTOR_Y, xSpaceLagrange::DEGREE_ONE);
xSpaceComposite lagrange(lagx, lagy); xSpaceComposite lagrange(lagx, lagy);
xField disp_l(&double_manager, lagrange); xField<> disp_l(&double_manager, lagrange);
xValueCreator<xValueDouble> creator; xValueCreator<xValueDouble> creator;
DeclareInterpolation(disp_l, creator, all.begin(), all.end()); DeclareInterpolation<xField<>>(disp_l, creator, all.begin(), all.end());
double_manager.PrintForDebug("dcl.dbg"); double_manager.PrintForDebug("dcl.dbg");
std::vector<string> vars_ess; std::vector<string> vars_ess;
...@@ -136,7 +136,7 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) { ...@@ -136,7 +136,7 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) {
double_manager.PrintForDebug("ess.dbg"); double_manager.PrintForDebug("ess.dbg");
xStateDofCreator<> snh(double_manager, "dofs"); xStateDofCreator<> snh(double_manager, "dofs");
DeclareState(disp_l, snh, all.begin(), all.end()); DeclareState<xField<>>(disp_l, snh, all.begin(), all.end());
double_manager.PrintForDebug("sym.dbg"); double_manager.PrintForDebug("sym.dbg");
...@@ -201,7 +201,7 @@ Assemble(diffusive, assembler, integration_rule, disp_l, disp_l, all.begin(), al ...@@ -201,7 +201,7 @@ Assemble(diffusive, assembler, integration_rule, disp_l, disp_l, all.begin(), al
xEvalField<xtool::xIdentity<xtensor::xVector> > eval_disp(disp_l); xEvalField<xtool::xIdentity<xtensor::xVector> > eval_disp(disp_l);
Export(eval_disp, pexport, "DISPLACEMENT", integration_rule, all.begin(), all.end()); Export(eval_disp, pexport, "DISPLACEMENT", integration_rule, all.begin(), all.end());
xEvalGradField<xtensor::xSymmetrize> eval_strain(disp_l); xEvalGradField<xtensor::xSymmetrize<>> eval_strain(disp_l);
xEvalBinary< xtool::xMult<xtensor::xTensor4, xtensor::xTensor2, xtensor::xTensor2> > stress(hooke, eval_strain); xEvalBinary< xtool::xMult<xtensor::xTensor4, xtensor::xTensor2, xtensor::xTensor2> > stress(hooke, eval_strain);
Export(stress, pbinexport, "STRESS", integration_rule, all.begin(), all.end()); Export(stress, pbinexport, "STRESS", integration_rule, all.begin(), all.end());
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifndef _MECHANICS_H #ifndef _MECHANICS_H
#define _MECHANICS_H #define _MECHANICS_H
#include "xDoubleManager.h" #include "xValueManagerDist<double>::map_const_iterator.h"
#include "xData.h" #include "xData.h"
#include "xField.h" #include "xField.h"
#include "xAssembler.h" #include "xAssembler.h"
...@@ -22,7 +22,7 @@ public : ...@@ -22,7 +22,7 @@ public :
void TreatmentOfFormulation (xData *data); void TreatmentOfFormulation (xData *data);
private: private:
xDoubleManager double_manager; xValueManagerDist<double>::map_const_iterator double_manager;
}; };
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "main.h" #include "main.h"
#include "xAlgorithm.h" #include "xAlgorithm.h"
#include "xData.h" #include "xData.h"
#include "xDoubleManager.h" #include "xValueManagerDist<double>::map_const_iterator.h"
#include "xCSRMatrix.h" #include "xCSRMatrix.h"
#include "xCSRVector.h" #include "xCSRVector.h"
#include "xLinearSystemSolverSuperLU.h" #include "xLinearSystemSolverSuperLU.h"
...@@ -120,10 +120,10 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) { ...@@ -120,10 +120,10 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) {
xSpaceLagrange lagy("DISPLACEMENT_Y", xSpace::VECTOR_Y, xSpaceLagrange::DEGREE_ONE); xSpaceLagrange lagy("DISPLACEMENT_Y", xSpace::VECTOR_Y, xSpaceLagrange::DEGREE_ONE);
xSpaceComposite lagrange(lagx, lagy); xSpaceComposite lagrange(lagx, lagy);
xField disp_l(&double_manager, lagrange); xField<> disp_l(&double_manager, lagrange);
xValueCreator<xValueDouble> creator; xValueCreator<xValueDouble> creator;
DeclareInterpolation(disp_l, creator, all.begin(), all.end()); DeclareInterpolation<xField<>>(disp_l, creator, all.begin(), all.end());
double_manager.PrintForDebug("dcl.dbg"); double_manager.PrintForDebug("dcl.dbg");
std::vector<string> vars_ess; std::vector<string> vars_ess;
...@@ -136,7 +136,7 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) { ...@@ -136,7 +136,7 @@ void Mechanics_c :: TreatmentOfFormulation (xData *data) {
double_manager.PrintForDebug("ess.dbg"); double_manager.PrintForDebug("ess.dbg");
xStateDofCreator<> snh(double_manager, "dofs"); xStateDofCreator<> snh(double_manager, "dofs");
DeclareState(disp_l, snh, all.begin(), all.end()); DeclareState<xField<>>(disp_l, snh, all.begin(), all.end());
double_manager.PrintForDebug("sym.dbg"); double_manager.PrintForDebug("sym.dbg");
...@@ -201,7 +201,7 @@ Assemble(diffusive, assembler, integration_rule, disp_l, disp_l, all.begin(), al ...@@ -201,7 +201,7 @@ Assemble(diffusive, assembler, integration_rule, disp_l, disp_l, all.begin(), al
xEvalField<xtool::xIdentity<xtensor::xVector> > eval_disp(disp_l); xEvalField<xtool::xIdentity<xtensor::xVector> > eval_disp(disp_l);
Export(eval_disp, pexport, "DISPLACEMENT", integration_rule, all.begin(), all.end()); Export(eval_disp, pexport, "DISPLACEMENT", integration_rule, all.begin(), all.end());
xEvalGradField<xtensor::xSymmetrize> eval_strain(disp_l); xEvalGradField<xtensor::xSymmetrize<>> eval_strain(disp_l);
xEvalBinary< xtool::xMult<xtensor::xTensor4, xtensor::xTensor2, xtensor::xTensor2> > stress(hooke, eval_strain); xEvalBinary< xtool::xMult<xtensor::xTensor4, xtensor::xTensor2, xtensor::xTensor2> > stress(hooke, eval_strain);
Export(stress, pbinexport, "STRESS", integration_rule, all.begin(), all.end()); Export(stress, pbinexport, "STRESS", integration_rule, all.begin(), all.end());
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#ifndef _MECHANICS_H #ifndef _MECHANICS_H
#define _MECHANICS_H #define _MECHANICS_H