Commit 8f292b3d authored by hrchilds's avatar hrchilds
Browse files

Update from October 16, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@100 18c085ea-50e0-402c-830e-de6fd14e8384
parent ef1f7dea
......@@ -429,9 +429,9 @@ More information about building VisIt follows after that.
#
# Build and install it in the visit directory.
#
gunzip visit030922.tar.gz
tar xf visit030922.tar
cd visit030922/config-site
gunzip visit031020.tar.gz
tar xf visit031020.tar
cd visit031020/config-site
echo VISITHOME=`cat ../../visitpath` > `hostname`.conf
cat Template.conf >> `hostname`.conf
cd ..
......@@ -440,11 +440,11 @@ make
clearcase_bin/visit-bin-dist
# Use the appropriate install command based on the operating system on
# which you built VisIt.
clearcase_bin/visit-install 1.2.2 aix `cat ../visitpath`
clearcase_bin/visit-install 1.2.2 irix6 `cat ../visitpath`
clearcase_bin/visit-install 1.2.2 linux `cat ../visitpath`
clearcase_bin/visit-install 1.2.2 osf1 `cat ../visitpath`
clearcase_bin/visit-install 1.2.2 sunos5 `cat ../visitpath`
clearcase_bin/visit-install 1.2.3 aix `cat ../visitpath`
clearcase_bin/visit-install 1.2.3 irix6 `cat ../visitpath`
clearcase_bin/visit-install 1.2.3 linux `cat ../visitpath`
clearcase_bin/visit-install 1.2.3 osf1 `cat ../visitpath`
clearcase_bin/visit-install 1.2.3 sunos5 `cat ../visitpath`
When running the configure script you can enable or disable certain dependent
packages. All the configure options are listed at the beginning of the
......
......@@ -17,7 +17,7 @@ Unix:
where
"version" will be 1.2.2 for the current distribution.
"version" will be 1.2.3 for the current distribution.
"platform" will be one of the following: aix, irix6, linux, osf1,
or sunos5 depending on the machine. The one you use should match
......@@ -28,17 +28,17 @@ Unix:
For example
visit-install 1.2.2 irix6 /usr/local/visit
visit-install 1.2.3 irix6 /usr/local/visit
will install the irix6, 1.2.2 version of visit in the directory
will install the irix6, 1.2.3 version of visit in the directory
"/usr/local/visit". Note that you will need to have the file
"visit1_2_2.irix6.tar.gz" present in the current directory for this
"visit1_2_3.irix6.tar.gz" present in the current directory for this
to function properly. You can install multiple binaries into the
same directory. For example, you could then execute
visit-install -a 1.2.2 linux /usr/local/visit
visit-install -a 1.2.3 linux /usr/local/visit
to add a linux, 1.2.2 version of visit to the same directory.
to add a linux, 1.2.3 version of visit to the same directory.
2. Add the bin directory below the installation directory
(/usr/local/visit/bin in our example) to each user's search path.
......@@ -76,15 +76,15 @@ Unix:
Windows:
1. Copy the file visit1.2.2.exe to your desktop.
1. Copy the file visit1.2.3.exe to your desktop.
2. Right click on the visit1.2.2.exe icon using your mouse and selecting
"Extract to folder C:\...\Desktop\visit1.2.2" from the popup menu. A
2. Right click on the visit1.2.3.exe icon using your mouse and selecting
"Extract to folder C:\...\Desktop\visit1.2.3" from the popup menu. A
window will popup as the file is extracted into the directory. Once
the process is complete a "visit1.2.2" directory icon should appear on
the process is complete a "visit1.2.3" directory icon should appear on
your desktop.
3. Double click on the "visit1.2.2" directory icon bringing up a file
3. Double click on the "visit1.2.3" directory icon bringing up a file
system browsing window.
4. Double click on the SETUP icon with the computer display icon to run
......
......@@ -243,8 +243,14 @@ endif
# Determine the operating system.
#
if("$OSGiven" == "FALSE") then
set uname = `which uname`
set os = `$uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
if(-e /bin/uname) then
set os = `/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
else if(-e /usr/bin/uname) then
set os = `/usr/bin/uname -s | tr "[A-Z]" "[a-z]" | tr -d "[0-9]"`
else
echo "Can't find uname program!"
exit
endif
endif
#
......
......@@ -13,6 +13,8 @@ const char *AUXILIARY_DATA_SPATIAL_EXTENTS = "SPATIAL_EXTENTS";
const char *AUXILIARY_DATA_MIXED_VARIABLE = "MIXED_VARIABLE";
const char *AUXILIARY_DATA_DOMAIN_BOUNDARY_INFORMATION
= "DOMAIN_BOUNDARY_INFORMATION";
const char *AUXILIARY_DATA_DOMAIN_NESTING_INFORMATION
= "DOMAIN_NESTING_INFORMATION";
static const char *avtExtentType_strings[] = { "AVT_ORIGINAL_EXTENTS",
"AVT_ACTUAL_EXTENTS", "AVT_SPECIFIED_EXTENTS", "AVT_UNKNOWN_EXTENT_TYPE"};
......
......@@ -73,9 +73,10 @@ enum avtGhostType
enum SetState
{
NoneUsed = 0,
SomeUsed, /* 1 */
AllUsed /* 2 */
NoneUsed = 0,
SomeUsed, /* 1 */
AllUsed, /* 2 */
AllUsedOtherProc /* 3 */
};
......@@ -89,6 +90,7 @@ DBATTS_API extern const char * AUXILIARY_DATA_SPECIES;
DBATTS_API extern const char * AUXILIARY_DATA_SPATIAL_EXTENTS;
DBATTS_API extern const char * AUXILIARY_DATA_MIXED_VARIABLE;
DBATTS_API extern const char * AUXILIARY_DATA_DOMAIN_BOUNDARY_INFORMATION;
DBATTS_API extern const char * AUXILIARY_DATA_DOMAIN_NESTING_INFORMATION;
DBATTS_API std::string avtExtentType_ToString(avtExtentType);
DBATTS_API std::string avtExtentType_ToString(int);
......
......@@ -806,6 +806,44 @@ avtSILRestriction::Union(avtSILRestriction_p silr)
}
// ****************************************************************************
// Method: avtSILRestriction::RestrictDomains
//
// Purpose: Public interface to restrict domains
//
// Arguments:
// domains A list of domains to use.
//
// Programmer: Mark C. Miller
// Creation: October 15, 2003
//
// ****************************************************************************
void
avtSILRestriction::RestrictDomains(const vector<int> &domains)
{
RestrictDomains(domains, false);
}
// ****************************************************************************
// Method: avtSILRestriction::RestrictDomainsForLoadBalance
//
// Purpose: Public interface to restrict domains for load balancing
//
// Arguments:
// domains A list of domains to use.
//
// Programmer: Mark C. Miller
// Creation: October 15, 2003
//
// ****************************************************************************
void
avtSILRestriction::RestrictDomainsForLoadBalance(const vector<int> &domains)
{
RestrictDomains(domains, true);
}
// ****************************************************************************
// Method: avtSILRestriction::RestrictDomains
//
......@@ -830,10 +868,14 @@ avtSILRestriction::Union(avtSILRestriction_p silr)
// Hank Childs, Wed Dec 4 16:15:58 PST 2002
// Re-wrote for performance.
//
// Mark C. Miller, Wed Oct 15 16:24:13 PDT 2003
// Made private, added bool for special behavior if for load balancing
//
// ****************************************************************************
void
avtSILRestriction::RestrictDomains(const vector<int> &domains)
avtSILRestriction::RestrictDomains(const vector<int> &domains,
bool forLoadBalance)
{
int timingsHandle = visitTimer->StartTimer();
......@@ -918,7 +960,17 @@ avtSILRestriction::RestrictDomains(const vector<int> &domains)
setsToTurnOff.push_back(setsToProcess[i]);
for (int j = 0 ; j < setsToTurnOff.size() ; j++)
{
useSet[setsToTurnOff[j]] = NoneUsed;
if (forLoadBalance)
{
if (useSet[setsToTurnOff[j]] == AllUsed)
useSet[setsToTurnOff[j]] = AllUsedOtherProc;
else
useSet[setsToTurnOff[j]] = NoneUsed;
}
else
{
useSet[setsToTurnOff[j]] = NoneUsed;
}
avtSILSet_p set = GetSILSet(setsToTurnOff[j]);
const vector<int> &mapsOut = set->GetMapsOut();
for (int k = 0 ; k < mapsOut.size() ; k++)
......
......@@ -99,6 +99,8 @@ class DBATTS_API avtSILRestriction : public avtSIL
void Union(avtSILRestriction_p);
void RestrictDomains(const std::vector<int> &);
void RestrictDomainsForLoadBalance(
const std::vector<int> &);
SILRestrictionAttributes *MakeAttributes(void) const;
CompactSILRestrictionAttributes *
......@@ -117,6 +119,8 @@ class DBATTS_API avtSILRestriction : public avtSIL
void GetLeafSets(int, std::vector<int> &);
private:
void RestrictDomains(const std::vector<int> &,
bool forLoadBalance);
avtSILRestriction();
avtSILRestriction(const avtSILRestriction &);
const avtSILRestriction &operator=(const avtSILRestriction &);
......
......@@ -167,6 +167,38 @@ avtSILRestrictionTraverser::GetSpecies(vector<bool> &specList)
}
// ****************************************************************************
// Method: avtSILRestrictionTraverser::GetDomainList
//
// Purpose: Public interface to GetDomainList
//
// Programmer: Mark C. Miller
// Creation: October 15, 2003
//
// ****************************************************************************
void
avtSILRestrictionTraverser::GetDomainList(vector<int> &list)
{
GetDomainList(list, false);
}
// ****************************************************************************
// Method: avtSILRestrictionTraverser::GetDomainListAllProcs
//
// Purpose: Public interface to GetDomainList
//
// Programmer: Mark C. Miller
// Creation: October 15, 2003
//
// ****************************************************************************
void
avtSILRestrictionTraverser::GetDomainListAllProcs(vector<int> &list)
{
GetDomainList(list, true);
}
// ****************************************************************************
// Method: avtSILRestrictionTraverser::GetDomainList
//
......@@ -188,10 +220,13 @@ avtSILRestrictionTraverser::GetSpecies(vector<bool> &specList)
// Hank Childs, Fri Nov 22 14:06:36 PST 2002
// Moved into the SIL restriction traverser class.
//
// Mark C. Miller
// Made private, added bool for query on all procs or just owner
//
// ****************************************************************************
void
avtSILRestrictionTraverser::GetDomainList(vector<int> &list)
avtSILRestrictionTraverser::GetDomainList(vector<int> &list, bool allProcs)
{
int timingsHandle = visitTimer->StartTimer();
list.clear();
......@@ -218,9 +253,27 @@ avtSILRestrictionTraverser::GetDomainList(vector<int> &list)
int id = set->GetIdentifier();
if (id >= 0)
{
// If a set has an identifier, all subsets must have the same
// identifier.
list_with_repeats.push_back(id);
if (!allProcs)
{
if ((silr->useSet[setid] == AllUsed) ||
(silr->useSet[setid] == SomeUsed))
{
// If a set has an identifier, all subsets must have the same
// identifier.
list_with_repeats.push_back(id);
}
}
else
{
if ((silr->useSet[setid] == AllUsed) ||
(silr->useSet[setid] == AllUsedOtherProc) ||
(silr->useSet[setid] == SomeUsed))
{
// If a set has an identifier, all subsets must have the same
// identifier.
list_with_repeats.push_back(id);
}
}
}
else
{
......
......@@ -33,6 +33,7 @@ class DBATTS_API avtSILRestrictionTraverser
bool Equal(avtSILRestriction_p);
void GetDomainList(std::vector<int> &);
void GetDomainListAllProcs(std::vector<int> &);
bool UsesAllData(void);
bool UsesAllDomains(void);
......@@ -62,6 +63,7 @@ class DBATTS_API avtSILRestrictionTraverser
const avtSILRestrictionTraverser &
operator=(const avtSILRestrictionTraverser &t)
{ return t; };
void GetDomainList(std::vector<int> &, bool allProcs);
};
......
......@@ -33,6 +33,7 @@
#include <avtDatabaseMetaData.h>
#include <avtDatasetCollection.h>
#include <avtDomainBoundaries.h>
#include <avtDomainNesting.h>
#include <avtFileFormatInterface.h>
#include <avtMetaData.h>
#include <avtMixedVariable.h>
......@@ -239,8 +240,10 @@ avtGenericDatabase::GetOutput(avtDataSpecification_p spec,
//
avtSILRestriction_p silr = spec->GetRestriction();
avtSILRestrictionTraverser trav(silr);
vector<int> domains;
vector<int> domains, allDomains;
trav.GetDomainList(domains);
trav.GetDomainListAllProcs(allDomains);
//
// Set up a data tree for each of the domains.
......@@ -336,6 +339,12 @@ avtGenericDatabase::GetOutput(avtDataSpecification_p spec,
didGhosts = CommunicateGhosts(datasetCollection, domains, spec, src);
}
//
// Apply ghosting when domains nest within other domains (AMR meshes)
//
bool didNestingGhosts =
ApplyGhostForDomainNesting(datasetCollection, domains, allDomains, spec);
//
// Finally, do the material selection.
//
......@@ -3555,6 +3564,72 @@ avtGenericDatabase::CommunicateGhosts(avtDatasetCollection &ds,
return rv;
}
// ****************************************************************************
// Method: avtGenericDatabase::ApplyGhostForDomainNesting
//
// Purpose:
// When domains nest within each other (as for an AMR mesh), this method
// will apply the "vtkGhostLevels" label to any zones in coarser domains
// that have finer domains in the current selection.
//
// Note: In addition to knowing the list of domains being processed on
// this processor, we also need to know the list of domains being
// processed on all processors. The fact is, this processor may contain
// a coarse domain that should have zones ghosted out due to a finer
// patch in the current selection but living on another processor
//
// Arguments:
// ds The dataset collection.
// doms A list of domains.
// spec A data specification.
//
// Returns: True if any zones where ghosted. False otherwise.
//
// Programmer: Mark C. Miller
// Creation: October 13, 2003
//
// ****************************************************************************
bool
avtGenericDatabase::ApplyGhostForDomainNesting(avtDatasetCollection &ds,
vector<int> &doms, vector<int> &allDoms, avtDataSpecification_p &spec)
{
bool rv = false;
void_ref_ptr vr = cache.GetVoidRef("any_mesh",
AUXILIARY_DATA_DOMAIN_NESTING_INFORMATION,
spec->GetTimestep(), -1);
if (*vr != NULL)
{
int i;
avtDomainNesting *dn = (avtDomainNesting*)*vr;
vector<vtkDataSet *> list;
for (i = 0 ; i < doms.size() ; i++)
{
list.push_back(ds.GetDataset(i, 0));
list[i]->Register(NULL);
}
rv = dn->ApplyGhost(doms, allDoms, list);
//
// Tell everything downstream that we do have ghost zones.
//
if (rv)
{
int ts = spec->GetTimestep();
avtDatabaseMetaData *md = GetMetaData(ts);
string meshname = md->MeshForVar(spec->GetVariable());
GetMetaData(ts)->SetContainsGhostZones(meshname, AVT_CREATED_GHOSTS);
}
}
return rv;
}
// ****************************************************************************
// Method: avtGenericDatabase::MaterialSelect
//
......
......@@ -249,6 +249,9 @@ class DATABASE_API avtGenericDatabase : public avtDatasetDatabase
bool CommunicateGhosts(avtDatasetCollection &,
std::vector<int> &, avtDataSpecification_p &,
avtSourceFromDatabase *);
bool ApplyGhostForDomainNesting(avtDatasetCollection &,
std::vector<int> &, std::vector<int> &,
avtDataSpecification_p &);
void MaterialSelect(avtDatasetCollection &,
std::vector<int> &, avtDataSpecification_p &,
avtSourceFromDatabase *, bool);
......
#ifndef AVT_DOMAIN_NESTING_H
#define AVT_DOMAIN_NESTING_H
#include <database_exports.h>
#include <vector>
using std::vector;
class vtkDataSet;
// ****************************************************************************
// Class: avtDomainNesting
//
// Purpose:
// Encapsulate domain nesting information. The main purpose of this class
// is to add the "vtkGhostLevels" data array that is '1' in coarser
// domains where there is a finer (nested) domain also in the current
// selection.
//
// Programmer: Mark C. Miller
// Creation: October 13, 2003
//
// ****************************************************************************
class DATABASE_API avtDomainNesting
{
public:
avtDomainNesting() {};
virtual ~avtDomainNesting() {} ;
virtual bool ApplyGhost(vector<int> domainList, vector<int> allDomainList,
vector<vtkDataSet*> meshes) = 0;
};
#endif
#include <avtStructuredDomainNesting.h>
#include <VisItException.h>
#include <vtkFloatArray.h>
#include <vtkIntArray.h>
#include <vtkStructuredGrid.h>
// ****************************************************************************
// Destructor: avtStructuredDomainNesting::Destruct
//
// Programmer: Hank Childs
// Creation: September 25, 2002
//
// Modifications:
//
// Hank Childs, Tue Oct 8 14:45:46 PDT 2002
// Cleaned up stupid mistake where void pointer was being deleted.
//
// ****************************************************************************
void
avtStructuredDomainNesting::Destruct(void *p)
{
avtStructuredDomainNesting *sdn = (avtStructuredDomainNesting *) p;
delete sdn;
}
// ****************************************************************************
// Method: avtStructuredDomainNesting::ApplyGhost
//
// Purpose:
// Applies "vtkGhostLevels" array to the meshes passed in
//
// Programmer: Mark C. Miller
// Creation: October 13, 2003
//
// ****************************************************************************
bool
avtStructuredDomainNesting::ApplyGhost(vector<int> domainList,
vector<int> allDomainList,
vector<vtkDataSet*> meshes)
{
bool didGhost = false;
for (int i = 0; i < domainList.size(); i++)
{
int parentDom = domainList[i];
vtkUnsignedCharArray *ghostArray = vtkUnsignedCharArray::New();
int numCells = meshes[i]->GetNumberOfCells();
ghostArray->SetNumberOfTuples(numCells);
unsigned char *ghostData = (unsigned char *) ghostArray->GetVoidPointer(0);
memset(ghostData, 0x0, numCells);
//
// Look at each of the children of this domain.
// If in current selection, ghost the appropriate elements here
//
for (int j = 0; j < domainNesting[parentDom].childDomains.size(); j++)
{
bool thisChildIsOn = false;
for (int k = 0; k < allDomainList.size(); k++)
{
if (allDomainList[k] == domainNesting[parentDom].childDomains[j])
{
thisChildIsOn = true;
break;
}
}
if (thisChildIsOn)
{
int ratio[3];
int childDom = domainNesting[parentDom].childDomains[j];
int childLevel = domainNesting[childDom].level;
int Ni = domainNesting[parentDom].logicalExtents[3] -
domainNesting[parentDom].logicalExtents[0] + 1;
int Nj = domainNesting[parentDom].logicalExtents[4] -
domainNesting[parentDom].logicalExtents[1] + 1;
int Nk = domainNesting[parentDom].logicalExtents[5] -
domainNesting[parentDom].logicalExtents[2] + 1;
int I0 = domainNesting[parentDom].logicalExtents[0];
int I1 = domainNesting[parentDom].logicalExtents[3] + 1;
int J0 = domainNesting[parentDom].logicalExtents[1];
int J1 = domainNesting[parentDom].logicalExtents[4] + 1;
int K0 = domainNesting[parentDom].logicalExtents[2];
int K1 = domainNesting[parentDom].logicalExtents[5] + 1;
ratio[0] = levelRatios[childLevel][0];
ratio[1] = numDimensions >= 2 ? levelRatios[childLevel][1] : 1;
ratio[2] = numDimensions >= 3 ? levelRatios[childLevel][2] : 1;
int i0 = domainNesting[childDom].logicalExtents[0] / ratio[0];
int i1 = (domainNesting[childDom].logicalExtents[3] + 1) / ratio[0];
int j0 = domainNesting[childDom].logicalExtents[1] / ratio[1];
int j1 = (domainNesting[childDom].logicalExtents[4] + 1) / ratio[1];
int k0 = domainNesting[childDom].logicalExtents[2] / ratio[2];
int k1 = (domainNesting[childDom].logicalExtents[5] + 1) / ratio[2];
//
// Often a child domain spans multiple parents. So, we need to
// clip the bounds computed above to the parent's upper bounds
//
if (i1 > I1) i1 = I1;
if (j1 > J1) j1 = J1;
if (k1 > K1) k1 = K1;
if (i0 < I0) i0 = I0;
if (j0 < J0) j0 = J0;
if (k0 < K0) k0 = K0;
didGhost = true;
if (numDimensions == 3)
{
for (int ii = i0; ii < i1; ii++)
for (int jj = j0; jj < j1; jj++)
for (int kk = k0; kk < k1; kk++)
{
int a = ii - I0;
int b = jj - J0;
int c = kk - K0;
if ((c*Ni*Nj + b*Ni + a >= numCells) ||
(c*Ni*Nj + b*Ni + a < 0))