Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence warnings from itensor #5

Merged
merged 7 commits into from
Feb 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/env-ctmrg/env-ctmrg.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#include "p-ipeps/config.h"
#include <string>
#include <iostream>
#include <fstream>
#include <chrono>
#include "json.hpp"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS
#include "p-ipeps/ctm-cluster-env_v2.h"
#include "p-ipeps/cluster-ev-builder.h"
#include "p-ipeps/ctm-cluster-io.h"
Expand Down
1 change: 1 addition & 0 deletions examples/opt-fu-adaptive/opt-fu-adaptive.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "p-ipeps/config.h"
#include <string>
#include <iostream>
#include <fstream>
Expand Down
3 changes: 3 additions & 0 deletions examples/opt-su-adaptive/opt-su-adaptive.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#include "p-ipeps/config.h"
#include <string>
#include <iostream>
#include <fstream>
#include <chrono>
#include "json.hpp"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS
#include "p-ipeps/ctm-cluster-env_v2.h"
#include "p-ipeps/cluster-ev-builder.h"
#include "p-ipeps/ctm-cluster-io.h"
Expand Down
3 changes: 3 additions & 0 deletions include/p-ipeps/cluster-ev-builder.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#ifndef __CLS_EV_BUILDER_
#define __CLS_EV_BUILDER_

#include "p-ipeps/config.h"
#include <string>
#include <iostream>
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS
#include "p-ipeps/ctm-cluster-global.h"
#include "p-ipeps/ctm-cluster.h"
#include "p-ipeps/ctm-cluster-env_v2.h"
Expand Down
3 changes: 2 additions & 1 deletion include/p-ipeps/cluster-factory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __CLUSTER_FACTORY_
#define __CLUSTER_FACTORY_

#include "p-ipeps/config.h"
#include "json.hpp"
#include "p-ipeps/ctm-cluster.h"

Expand All @@ -19,4 +20,4 @@ class ClusterFactory {
std::map<std::string, TCreateMethod> s_methods;
};

#endif
#endif
5 changes: 4 additions & 1 deletion include/p-ipeps/ctm-cluster-basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
#define __CLS_BASIC_H_


#include "p-ipeps/config.h"
#include <iostream>
#include <vector>
#include <map>
#include "json.hpp"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS
#include "p-ipeps/ctm-cluster.h"

namespace itensor {
Expand Down Expand Up @@ -96,4 +99,4 @@ struct Cluster_2x2_ABCD : Cluster {

} //

#endif
#endif
3 changes: 3 additions & 0 deletions include/p-ipeps/ctm-cluster-env.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
#ifndef __CTM_CLS_ENV_H_
#define __CTM_CLS_ENV_H_

#include "p-ipeps/config.h"
#include <string>
#include <iostream>
#include <vector>
#include <cmath>
#include <chrono>
#include "p-ipeps/ctm-cluster-io.h"
#include "p-ipeps/ctm-cluster-global.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

class CtmEnv
{
Expand Down
3 changes: 3 additions & 0 deletions include/p-ipeps/ctm-cluster-env_v2.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifndef __CTM_CLS_ENV_H_
#define __CTM_CLS_ENV_H_

#include "p-ipeps/config.h"
#include <string>
#include <iostream>
#include <vector>
Expand All @@ -13,7 +14,9 @@
#include "p-ipeps/ctm-cluster-io.h"
#include "p-ipeps/ctm-cluster-global.h"
#include "p-ipeps/linalg/itensor-svd-solvers.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS


class CtmEnv
Expand Down
5 changes: 4 additions & 1 deletion include/p-ipeps/ctm-cluster-global.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#ifndef __CTM_CLS_GLOBAL_
#define __CTM_CLS_GLOBAL_

#include "p-ipeps/config.h"
#include <string>
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

/*
* ENVironment of nxm cluster
Expand Down Expand Up @@ -73,4 +76,4 @@ const std::string TAG_T_R = "T_R";
const std::string TAG_T_D = "T_D";
const std::string TAG_T_L = "T_L";

#endif
#endif
3 changes: 3 additions & 0 deletions include/p-ipeps/ctm-cluster-io.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __CTM_CLS_IO_
#define __CTM_CLS_IO_

#include "p-ipeps/config.h"
#include <complex>
#include <vector>
#include <string>
Expand All @@ -14,7 +15,9 @@
#include "p-ipeps/ctm-cluster-basic.h"
#include "p-ipeps/ctm-cluster-global.h"
#include "p-ipeps/cluster-factory.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

const std::string WS4(4,' ');

Expand Down
5 changes: 4 additions & 1 deletion include/p-ipeps/ctm-cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
#ifndef __CTM_CLS_H_
#define __CTM_CLS_H_

#include "p-ipeps/config.h"
#include <iostream>
#include <vector>
#include <map>
#include "p-ipeps/lattice.h"
#include "json.hpp"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

// ############################################################################
// IO for cluster definition using JSON data format
Expand Down Expand Up @@ -180,4 +183,4 @@ void setSites(Cluster & c, std::string option, bool dbg = false);
std::ostream&
operator<<(std::ostream& s, Cluster const& c);

#endif
#endif
3 changes: 2 additions & 1 deletion include/p-ipeps/engine-factory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __ENGINE_FACTORY_
#define __ENGINE_FACTORY_

#include "p-ipeps/config.h"
#include "json.hpp"
#include "p-ipeps/engine.h"

Expand All @@ -21,4 +22,4 @@ class EngineFactory {
std::map<std::string, TCreateMethod> s_methods;
};

#endif
#endif
5 changes: 4 additions & 1 deletion include/p-ipeps/engine.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#ifndef __ENGINE_
#define __ENGINE_

#include "p-ipeps/config.h"
#include <string>
#include "json.hpp"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS
#include "p-ipeps/cluster-ev-builder.h"
#include "p-ipeps/ctm-cluster.h"
#include "p-ipeps/ctm-cluster-global.h"
Expand Down Expand Up @@ -96,4 +99,4 @@ template<> itensor::Args TrotterEngine<MPO_2site>::performFullUpdate(
// template<> itensor::Args TrotterEngine<OpNS>::performFullUpdate(
// Cluster & cls, CtmEnv const& ctmEnv, itensor::Args const& args);

#endif
#endif
3 changes: 3 additions & 0 deletions include/p-ipeps/fu-3site-corboz.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __FULL_UPDT_3S_H_CORBOZ_
#define __FULL_UPDT_3S_H_CORBOZ_

#include "p-ipeps/config.h"
#include <cmath>
#include <limits>
#include <chrono>
Expand All @@ -10,7 +11,9 @@
#include "p-ipeps/ctm-cluster.h"
#include "p-ipeps/su2.h"
#include "p-ipeps/linalg/itensor-linsys-solvers.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

const int IOFFSET = 100;

Expand Down
5 changes: 4 additions & 1 deletion include/p-ipeps/full-update.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifndef __FULL_UPDT_H_
#define __FULL_UPDT_H_

#include "p-ipeps/config.h"
#include <cmath>
#include <limits>
#include <chrono>
Expand All @@ -13,7 +14,9 @@
#include "p-ipeps/ctm-cluster.h"
#include "p-ipeps/su2.h"
#include "p-ipeps/linalg/itensor-linsys-solvers.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

itensor::ITensor pseudoInverse(itensor::ITensor const& M,
itensor::Args const& args = itensor::Args::global());
Expand Down Expand Up @@ -106,4 +109,4 @@ struct FU4SiteGradMin {
void gradient(std::vector< itensor::ITensor > & grad);
};

#endif
#endif
3 changes: 2 additions & 1 deletion include/p-ipeps/lattice.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __LATTICE_H_
#define __LATTICE_H_

#include "p-ipeps/config.h"
#include <iostream>
#include <array>

Expand Down Expand Up @@ -107,4 +108,4 @@ operator<<(std::ostream& os, Vertex const& v);

// }

#endif
#endif
1 change: 1 addition & 0 deletions include/p-ipeps/linalg/arpack-rcdn.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __ARPACK_RCI_H_
#define __ARPACK_RCI_H_

#include "p-ipeps/config.h"
// #include "arpack.hpp"

#include <array>
Expand Down
5 changes: 4 additions & 1 deletion include/p-ipeps/linalg/itensor-linsys-solvers.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#ifndef _ITENSOR_LINSYS_SOLVERS_H
#define _ITENSOR_LINSYS_SOLVERS_H

#include "p-ipeps/config.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

namespace itensor {

Expand Down Expand Up @@ -190,4 +193,4 @@ linsystemMatVec(

} // namespace itensor

#endif
#endif
5 changes: 4 additions & 1 deletion include/p-ipeps/linalg/itensor-svd-solvers.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#ifndef _ITENSOR_SVD_SOLVERS_H
#define _ITENSOR_SVD_SOLVERS_H

#include "p-ipeps/config.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

namespace itensor {

Expand Down Expand Up @@ -200,4 +203,4 @@ SVDRef(MatRefc<T> const& M,

} // itensor

#endif
#endif
3 changes: 2 additions & 1 deletion include/p-ipeps/linalg/lapacksvd-solver.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _PEPS_LAPACK_SVD_SOLVERS_H
#define _PEPS_LAPACK_SVD_SOLVERS_H

#include "p-ipeps/config.h"
#include "p-ipeps/linalg/itensor-svd-solvers.h"

namespace itensor {
Expand Down Expand Up @@ -235,4 +236,4 @@ struct GESDDSolver : SvdSolver {

} // namespace itensor

#endif
#endif
3 changes: 2 additions & 1 deletion include/p-ipeps/linalg/linsyssolvers-lapack.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _ITENSOR_LAPACK_LINSYS_SOLVERS_H
#define _ITENSOR_LAPACK_LINSYS_SOLVERS_H

#include "p-ipeps/config.h"
#include "p-ipeps/linalg/itensor-linsys-solvers.h"


Expand Down Expand Up @@ -198,4 +199,4 @@ struct CholeskySolver : LinSysSolver {

} //namespace detail

#endif
#endif
3 changes: 2 additions & 1 deletion include/p-ipeps/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ install_headers(['cluster-ev-builder.h',
'rsvd-solver.h',
'simple-update_v2.h',
'su2.h',
'svdsolver-factory.h'],
'svdsolver-factory.h',
'warnings.h'],
subdir:'p-ipeps')

subdir('linalg')
Expand Down
3 changes: 2 additions & 1 deletion include/p-ipeps/model-factory.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __MODEL_FACTORY_
#define __MODEL_FACTORY_

#include "p-ipeps/config.h"
#include "json.hpp"
#include "p-ipeps/models.h"

Expand All @@ -21,4 +22,4 @@ class ModelFactory {
std::map<std::string, TCreateMethod> s_methods;
};

#endif
#endif
5 changes: 4 additions & 1 deletion include/p-ipeps/models.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef __MODELS_
#define __MODELS_

#include "p-ipeps/config.h"
#include <string>
#include <iostream>
#include <chrono>
Expand All @@ -10,7 +11,9 @@
#include "p-ipeps/ctm-cluster.h"
#include "p-ipeps/ctm-cluster-global.h"
#include "p-ipeps/mpo.h"
DISABLE_WARNINGS
#include "itensor/all.h"
ENABLE_WARNINGS

// ----- Trotter gates (3site, ...) MPOs ------------------------------
MPO_3site getMPO3s_Ising3Body(double tau, double J1, double J2, double h);
Expand Down Expand Up @@ -69,4 +72,4 @@ std::unique_ptr<Model> getModel_J1Q(nlohmann::json & json_model);
std::unique_ptr<Model> getModel(nlohmann::json & json_model);
// ----- END Model Definitions ----------------------------------------

#endif
#endif
Loading