20 #include "linalg/Matrix.h"
30 void SampleVisualization(ParMesh *pmesh, set<int>
const& elems,
31 set<int>
const& intElems, set<int>
const& faces,
32 set<int>
const& edges, set<int>
const& vertices,
33 string const& filename,
34 mfem::Vector *elemCount=
nullptr,
35 double elementScaling=1.0);
61 string visFileName=
"",
double visScale=1.0);
74 void RegisterSampledVariable(
const string variable,
const int space,
75 vector<int>
const& sample_dofs_v, vector<int>
const& num_sample_dofs_per_proc);
80 void ConstructSampleMesh();
93 void GatherDistributedMatrixRows(
const string variable,
CAROM::Matrix const& B,
104 return spfespace[space];
113 MFEM_VERIFY(finalized,
"Sample mesh is not constructed");
124 int GetNumVarSamples(
const string variable)
const;
135 void GetSampledValues(
const string variable, mfem::Vector
const& v,
157 void WriteVariableSampleMap(
const string variable,
string file_name)
const;
164 for (
int i=0; i<nspaces; ++i)
171 void CreateSampleMesh();
173 int GetVariableIndex(
const string variable)
const;
175 void SetSampleMaps();
176 void FinishSampleMaps();
183 map<string, int> vmap;
188 vector<ParFiniteElementSpace*> fespace;
189 vector<ParFiniteElementSpace*> spfespace;
191 ParMesh *pmesh =
nullptr;
192 ParMesh *sample_pmesh =
nullptr;
194 vector<vector<set<int>>> sample_dofs_proc;
196 vector<int> sample_dofs;
198 vector<int> num_sample_dofs_per_proc_merged;
200 vector<int> varSpace;
201 vector<vector<int>> sample_dofs_var;
202 vector<vector<int>> num_sample_dofs_per_proc_var;
203 vector<vector<int>> s2sp_var;
204 vector<int> s2sp, st2sp;
207 vector<int> all_sprows;
209 vector<int> spaceTOS, spaceOS, spaceOSSP;
210 vector<vector<int>> spaceOSall;
238 void ReadMapFromFile(
const string variable,
string file_name);
250 void GetSampledValues(
const string variable, mfem::Vector
const& v,
261 map<string, int> vmap;
262 vector<vector<int>> s2sp_var;
264 int GetVariableIndex(
const string variable)
const;
~SampleDOFSelector()
Destructor.
ParMesh * GetSampleMesh() const
Returns the sample mesh.
~SampleMeshManager()
Destructor.
ParFiniteElementSpace * GetSampleFESpace(const int space) const
Returns a sample mesh space.
set< int > * GetSampleElements()
Returns a set of indices of local FOM mesh elements corresponding to sample elements.